A050289 Zeroless pandigital numbers: numbers containing the digits 1-9 (each appearing at least once) and no 0's.
123456789, 123456798, 123456879, 123456897, 123456978, 123456987, 123457689, 123457698, 123457869, 123457896, 123457968, 123457986, 123458679, 123458697, 123458769, 123458796, 123458967, 123458976, 123459678, 123459687, 123459768, 123459786, 123459867, 123459876, 123465789
Offset: 1
Links
- H. Fripertinger, Operate on "9" to display zeroless pandigitals
- James Grime and Brady Haran, Why 381,654,729 is awesome, Numberphile video (2013).
- Eric Weisstein's World of Mathematics, Pandigital Number
- Chai Wah Wu, Pandigital and penholodigital numbers, arXiv:2403.20304 [math.GM], 2024. See p. 1.
Programs
-
PARI
apply( {A050289(n)=if(n<=7!*81, fromdigits(Vec(numtoperm(9,n-1)))+(n-1)\9!*10^9, "not yet implemented")}, [1..25]) \\ M. F. Hasler, Jan 07 2020, corrected Aug 11 2022
-
Python
from itertools import count, islice, permutations, product def c(t): return len(set(t)) == 9 def t2i(t): return int("".join(map(str, t))) def agen(): yield from (t2i(p) for p in permutations(range(1, 10))) for d in count(10): yield from (t2i(p) for p in product(range(1, 10), repeat=d) if c(p)) print(list(islice(agen(), 25))) # Michael S. Branicky, May 30 2022, updated Aug 05 2022
Formula
a(n + 9!) = a(n) + 10^9 for 1 <= n <= 8! + 7!. - M. F. Hasler, Jan 08 2020, corrected Aug 11 2022
Extensions
Name clarified by Michael S. Branicky, Aug 05 2022
Comments