Files
fejkdata/docs/research/part1-names-finance-company.md
T
lilleman ad57bf0c54
Tests / vet + fmt + tests (pull_request) Successful in 1m52s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
Tests / vet + fmt + tests (push) Successful in 6s
Tests / Gitea release from CHANGELOG.md (push) Successful in 4s
Add the breadth and inertness goals, name the contributor in the audience, and move the handoff's contents into the repo
2026-09-19 13:30:29 +02:00

20 KiB
Raw Blame History

Part 1 — Names, finance, company: sources and rules

Researched 2026-09-17. "Embed" = ship as a data file in an MIT repo. Everything not marked UNVERIFIED was read from the cited page or file this session.

1. US person names and identifiers

SSA baby names (given names by year and sex)

Census 2010 surnames

Name prefixes / suffixes

  • No authoritative enumerated list exists. USPS Publication 28 §33 (https://pe.usps.com/text/pub28/28c3_011.htm) defines the fields: Name Prefix, First Name, Middle Name or Initial, Surname, Suffix Title = "maturity (e.g., JR, SR) and professional (e.g., PHD, DDS) suffixes"; example "MR. WALTER W. WITHERSPOON JR.".
  • Recommendation: hand-curate. Prefixes Mr., Mrs., Ms., Mx., Dr., Rev.; suffixes Jr., Sr., II, III, IV, PhD, MD, DDS, Esq.. Rule of thumb: generational suffix (Jr/Sr/II–IV) only with a male name in traditional US usage; never combine Jr. with Sr.; at most one generational suffix.

SSN

  • Structure: AAA-GG-SSSS (area 3, group 2, serial 4). No check digit (Wikipedia).
  • Randomization since 2011-06-25 (https://www.ssa.gov/employer/randomization.html): "Previously unassigned area numbers were introduced for assignment excluding area numbers 000, 666 and 900-999." Area no longer geographic.
  • Invalid per SSA POMS RM 10201.035 (https://secure.ssa.gov/apps10/poms.nsf/lnx/0110201035): area 000, 666, 900–999; group 00; serial 0000.
  • Generator rule: area ∈ [001,899] \ {666}; group ∈ [01,99]; serial ∈ [0001,9999].
  • Advertising SSNs (https://www.ssa.gov/history/ssn/misused.html): 078-05-1120 (Woolworth wallet card, 1938; > 40,000 people claimed it) and 219-09-9999 (1940 Social Security Board pamphlet). Both are structurally valid — exclude from output.
  • 987-65-4320–987-65-4329 "reserved for advertising": repeated by searchbug.com, ssn-check.org, a Missouri state standard (https://oa.mo.gov/sites/default/files/CC-SocialSecurityNumberNamingStandardV050305.pdf, which even misprints it as 987-54-4329). UNVERIFIED — not found on any ssa.gov page or POMS this session; Wikipedia no longer carries it. Safe to use these ten as the library's "obviously fake" examples, but do not cite SSA for it.

ITIN (IRS)

  • IRS Publication 4757 (Rev. 6-2026), p. 5 (https://www.irs.gov/pub/irs-pdf/p4757.pdf): "All valid ITINs are nine-digit numbers in the same format as the SSN (9XX-8X-XXXX), beginning with a "9" and the 4th and 5th digits ranging from 50 to 65, 70 to 88, 90 to 92, and 94 to 99."
  • Group 93 = ATIN (adoption TIN); 89 reserved (Intuit/TaxSlayer support pages, not IRS — UNVERIFIED).
  • Generator rule: 9 + 2 digits + group ∈ {50–65, 70–88, 90–92, 94–99} + 4 digits (serial 0000 not documented as invalid for ITIN; avoid it anyway).

EIN (IRS)

  • Format NN-NNNNNNN. Page: https://www.irs.gov/businesses/small-businesses-self-employed/how-eins-are-assigned-and-valid-ein-prefixes ("The first two digits of your EIN show the IRS campus that assigned it or if you applied online").
  • Valid prefixes (union of the table, 2026-09-17): 01 02 03 04 05 06 10 11 12 13 14 15 16 20 21 22 23 24 25 26 27 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 71 72 73 74 75 76 77 80 81 82 83 84 85 86 87 88 90 91 92 93 94 95 98 99 By campus: Andover 10,12 · Atlanta 60,67 · Austin 50,53 · Brookhaven 01–06,11,13,14,16,21–23,25,34,51,52,54–59,65 · Cincinnati 30,32,35–38,61 · Fresno 15,24 · Kansas City 40,44 · Memphis 94,95 · Ogden 80,90 · Philadelphia 33,39,41–43,46,48,62–64,66,68,71–77,85–88,91–93,98,99 · Internet 20,26,27,33,39,41,42,45–47,81–88,92,93,99 · SBA 31.
  • Not valid: 00, 07, 08, 09, 17, 18, 19, 28, 29, 49, 69, 70, 78, 79, 89, 96, 97. No check digit.

2. Finance

ABA routing number (RTN)

  • Wikipedia https://en.wikipedia.org/wiki/ABA_routing_transit_number: 9 digits; check: (3(d1+d4+d7) + 7(d2+d5+d8) + (d3+d6+d9)) mod 10 = 0.
  • First two digits: 00 US Government; 01–12 Federal Reserve districts (normal banks); 21–32 thrifts (historic, still valid); 61–72 non-bank payment processors/clearinghouses; 80 traveler's checks. Other prefixes unused (Wikipedia does not say so explicitly — inferred).
  • Generator rule: prefix ∈ {01–12, 21–32, 61–72}, 6 random digits, compute 9th as (10 − (3d1+7d2+d3+3d4+7d5+d6+3d7+7d8) mod 10) mod 10.
  • Open list of real RTNs: the Federal Reserve E-Payments Routing Directory (https://www.frbservices.org/resources/routing-number-directory/index.html) says "may not be sold, re-licensed, or otherwise used for commercial gain" → not embeddable. Generate synthetically.

Payment card numbers (Wikipedia "Payment card number", https://en.wikipedia.org/wiki/Payment_card_number; all Luhn-checked)

Network IIN ranges Length CVV
Visa 4 13, 16, 19 3
Mastercard 51–55, 2221–2720 16 3
American Express 34, 37 15 4 (front)
Discover 6011, 644–649, 65, 622126–622925 (UnionPay co-brand) 16–19 3
JCB 3528–3589 16–19 3
Diners Club International 30 (covers 300–305, 3095), 36, 38, 39 14–19 3
Diners Club US & Canada 55 (Mastercard co-brand) 16 3
UnionPay 62 16–19 3
Maestro 5018, 5020, 5038, 5893, 6304, 6759, 6761, 6762, 6763 12–19 3
Maestro UK 6759, 676770, 676774 12–19 3
Dankort 5019 · Mir 2200–2204 · RuPay 60,65,81,82,508 · Troy 65,9792 · UATP 1 (15) · Verve 506099–506198, 507865–507964, 650002–650027 (16/18/19)
  • CVV lengths: https://en.wikipedia.org/wiki/Card_security_code ("three-digit ... Visa, Mastercard, and Discover"; "American Express is a four-digit code on the front").
  • The requested "Maestro 50/56–58/6xxx" is a looser legacy rule; use Wikipedia's explicit IINs.
  • Wikipedia text is CC BY-SA 4.0 — copy the facts (not prose) into your table; facts are not copyrightable.

Published test cards

  • Stripe: https://docs.stripe.com/testing — Visa 4242424242424242, Mastercard 5555555555554444, Amex 378282246310005, Discover 6011111111111117, Diners 3056930009020004 (14), JCB 3566002020360505, UnionPay 6200000000000005; any future expiry, any CVC (4 for Amex).
  • PayPal: https://developer.paypal.com/tools/sandbox/card-testing/ — Visa 4005519200000004, 4012000033330026, 4012000077777777, 4012888888881881, 4217651111111119, 4500600000000061, 4772129056533503, 4915805038587737; Mastercard 2223000048400011; Amex 371449635398431, 376680816376961; Diners 36461510000039, 36461510000013; Maestro 6304000000000000, 5063516945005047; JCB 3636500000000260, 3636500000000989; CUP 6200680000000004, 6200680000000038.
  • Reuse: neither page carries an open licence (Stripe docs are under Stripe's site terms). The numbers themselves are Luhn-valid facts, widely reproduced; embedding the numbers with a "from Stripe/PayPal test docs" note is low-risk but UNVERIFIED as an explicit grant. Alternative: generate Luhn-valid numbers from the IIN table above — no dependency on either vendor.

BIC / SWIFT (ISO 9362)

ISIN (https://en.wikipedia.org/wiki/International_Securities_Identification_Number)

  • 12 chars: 2-letter country + 9 alphanumeric NSIN + 1 check digit.
  • Check: convert letters A=10…Z=35 (ASCII − 55) to produce a digit string, then Luhn over that string (double every second digit from the right, sum digits, check makes total ≡ 0 mod 10). Pitfall: work on the expanded digit string; a transposed letter pair can pass.

CUSIP (https://en.wikipedia.org/wiki/CUSIP)

  • 9 chars: 6 issuer + 2 issue + 1 check. Values: digits as-is, A=10…Z=35, *=36, @=37, #=38.
  • Check: for i in 1..8, v = value; if i even, v ×= 2; sum += v div 10 + v mod 10; check = (10 − sum mod 10) mod 10.
  • Real CUSIPs are proprietary (CGS/FactSet); generate synthetic ones only.

IBAN (ISO 13616)

Currencies (ISO 4217)

Crypto addresses

3. Company

NAICS 2022 (US Census)

SEC EDGAR company names

  • https://www.sec.gov/files/company_tickers.json: object keyed "0".."N" of {cik_str, ticker, title}; 10,422 entries (2026-09-17). company_tickers_exchange.json: {"fields":["cik","name","ticker","exchange"],"data":[...]}.
  • https://www.sec.gov/Archives/edgar/cik-lookup-data.txt: 40 MB, 1,059,372 lines, NAME:CIK: (COMPANY NAME:0001234567:), all filers incl. individuals — filter to the ticker list for company names.
  • Access: declare User-Agent: Company Name email@domain, ≤ 10 req/s (https://www.sec.gov/os/webmaster-faq). Licence: "All Government-created content on sec.gov and EDGAR public filing content are free to access and reuse" (same FAQ). Embeddable; the ticker file (~800 kB) is the practical one.

DUNS

  • https://en.wikipedia.org/wiki/Data_Universal_Numbering_System: 9 digits, no significance; shown NN-NNN-NNNN or plain. Had a mod-10 check digit until ~Dec 2006; dropped since (expanded the pool by 800 M). So: any 9 digits are structurally valid today; no validation rule to enforce. Optional DUNS+4 suffix (4 alphanumerics) is user-assigned.
  • GLEIF ISO 20275 Entity Legal Forms code list v1.6 (2026-02-19): page https://www.gleif.org/en/lei-data/code-lists/iso-20275-entity-legal-forms-code-list ; CSV https://www.gleif.org/lei-data/code-lists/iso-20275-entity-legal-forms-code-list/2026-02-19-elf-code-list-v1.6.csv (758 kB; xlsx alongside).
  • Columns: ELF Code, Country of formation, Country Code (ISO 3166-1), Jurisdiction of formation, Country sub-division code (ISO 3166-2), Entity Legal Form name Local name, Language, Language Code (ISO 639-1), Entity Legal Form name Transliterated name, Abbreviations Local language, Abbreviations transliterated, Date created, ELF Status ACTV/INAC, Modification, Modification date, Reason.
  • Counts: 4,002 rows; 130 countries; 3,790 ACTV / 212 INAC; 1,518 rows have a local abbreviation (e.g. US N.A., FSA; SE AB… multiple abbreviations separated by ;). US has 737 rows (per-state forms). Abbreviations are the field you want for Inc, LLC, GmbH, AB, SAS, Pty Ltd; many rows have none, so filter on non-empty abbreviation and status ACTV.
  • Licence: GLEIF Open Data page (https://www.gleif.org/en/about/open-data): "The data on GLEIF's website is provided under a Creative Commons (CC0) license"; LEI Data Terms of Use: "provided under the CC0 licence, see CC0 1.0 Universal". The ELF page itself names no licence — that CC0 explicitly covers this code list is UNVERIFIED, but GLEIF treats all its published data this way. Embeddable.

Quick embed verdict

Item Embed? Licence / attribution
SSA baby names yes CC0 (data.gov)
Census 2010 surnames yes US gov PD; cite Census
EIN prefixes, ITIN/SSN rules yes (rules) facts from IRS/SSA
NAICS 2022 yes US gov PD
SEC company_tickers.json yes free to reuse (SEC)
GLEIF ELF code list yes CC0 (GLEIF)
GLEIF BIC-LEI (real BICs) yes, with mandatory SWIFT notice custom permissive licence
ISO 4217 (SIX XML / datasets PDDL / npm MIT) yes free use (ISO), PDDL, MIT
Fed routing directory, SwiftRef BIC directory, CUSIP lists no restricted/proprietary — generate synthetically
php-iban / ibankit registries copy facts only LGPL-3.0 / Apache-2.0
Stripe / PayPal test cards numbers only, note source no explicit grant (UNVERIFIED)