A235629 Primes whose base-9 representation also is the base-5 representation of a prime.
2, 3, 11, 19, 29, 31, 101, 109, 181, 191, 199, 281, 337, 739, 751, 769, 811, 821, 839, 919, 929, 991, 1459, 1489, 1549, 1721, 1741, 1811, 2269, 2281, 2371, 2389, 2441, 2459, 2531, 2539, 2551, 2953, 3089, 3109, 3251, 3271, 6571, 6599, 6661, 6907, 7309, 7321, 7489, 7537, 8039
Offset: 1
Examples
Both 11 = 12_9 and 12_5 = 7 are prime.
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..10000
- M. F. Hasler, Primes whose base c expansion is also the base b expansion of a prime
Crossrefs
Programs
-
Mathematica
pr95Q[n_]:=Module[{idn9=IntegerDigits[n,9]},Max[idn9]<5&&PrimeQ[ FromDigits[ idn9,5]]]; Select[Prime[Range[1100]],pr95Q] (* Harvey P. Dale, Nov 30 2022 *)
-
PARI
is(p,b=5,c=9)=vecmax(d=digits(p,c))
-
PARI
forprime(p=1,3e3,is(p,9,5)&&print1(vector(#d=digits(p,5),i,9^(#d-i))*d~,",")) \\ To produce the terms, this is more efficient than to select them using straightforwardly is(.)=is(.,5,9)
Comments