A371194 a(n) = smallest penholodigital prime in base n.
3, 5, 103, 823, 10061, 157427, 2439991, 49100173, 1123465789, 31148488997, 816695154683, 25401384476191, 859466293047623, 33373273595699879, 1234907033823334111, 51892599148660469993, 2322058300483667372689, 115713970660820468376569, 5533344265927977839343539
Offset: 2
Keywords
Examples
The corresponding base-n representations are: n a(n) in base n ------------------------ 2 11 3 12 4 1213 5 11243 6 114325 7 1223654 8 11235467 9 112345687 10 1123465789 11 1223456789a 12 11234567a98b 13 112345678abc9 14 112345678cadb9 15 1223456789adcbe 16 1123456789abcedf 17 1123456789abdgfec 18 1123456789abcehfgd 19 1223456789abcdefghi 20 1123456789abcdefhigj 21 1123456789abcdefgihjk 22 1123456789abcdefgjhikl 23 1223456789abcdefghjimlk 24 1123456789abcdefghkmijln 25 1123456789abcdefghijklnom 26 1123456789abcdefghijkmnpol 27 1223456789abcdefghijklmqnop 28 1123456789abcdefghijklmnqorp 29 1123456789abcdefghijklmnrqspo 30 1123456789abcdefghijklmnosqprt 31 1223456789abcdefghijklmnoptusrq 32 1123456789abcdefghijklmnopqrvust 33 1123456789abcdefghijklmnopqsrtuvw 34 1123456789abcdefghijklmnopqrstuxwv 35 1223456789abcdefghijklmnopqrstuxwvy 36 1123456789abcdefghijklmnopqrstuwzyxv
Links
- Chai Wah Wu, Table of n, a(n) for n = 2..387
- Chai Wah Wu, Pandigital and penholodigital numbers, arXiv:2403.20304 [math.GM], 2024. See p. 3.
Programs
-
Python
from math import gcd from sympy import nextprime from sympy.ntheory import digits def A371194(n): m, j = 1, 0 if n > 3: for j in range(1,n): if gcd((n*(n-1)>>1)+j,n-1) == 1: break if j == 0: for i in range(2,n): m = n*m+i elif j == 1: for i in range(1,n): m = n*m+i else: for i in range(2,1+j): m = n*m+i for i in range(j,n): m = n*m+i m -= 1 while True: s = digits(m:=nextprime(m),n)[1:] if 0 not in s and len(set(s))==n-1: return m
Formula
a(n) >= A023811(n).
Comments