login
A235395
Primes whose decimal representation is a valid number in base 9 and interpreted as such is again a prime.
68
2, 3, 5, 7, 41, 47, 67, 131, 151, 241, 331, 337, 461, 557, 601, 641, 661, 751, 757, 827, 887, 1031, 1181, 1217, 1231, 1321, 1327, 1367, 1471, 1637, 1877, 2027, 2081, 2111, 2131, 2207, 2281, 2287, 2351, 2357, 2647, 2731, 2861, 3037, 3121, 3181, 3187, 3307, 3347
OFFSET
1,1
MATHEMATICA
Select[FromDigits@# & /@ IntegerDigits[ Prime@ Range@ 270, 9], PrimeQ]
PROG
(PARI) fixBase(n, oldBase, newBase)=my(d=digits(n, oldBase), t=newBase-1); for(i=1, #d, if(d[i]>t, for(j=i, #d, d[j]=t); break)); fromdigits(d, newBase)
list(lim)=my(v=List(), t); forprime(p=2, fixBase(lim\1, 10, 9), if(isprime(t=fromdigits(digits(p, 9), 10)), listput(v, t))); Vec(v) \\ Charles R Greathouse IV, Nov 07 2016
KEYWORD
base,easy,nonn
AUTHOR
Robert G. Wilson v, Jan 09 2014
STATUS
approved