|
|
A090710
|
|
Primes with digits less than 7 whose decimal representation is also a prime when interpreted in base 7.
|
|
9
|
|
|
2, 3, 5, 23, 41, 43, 61, 113, 131, 241, 313, 401, 421, 443, 461, 463, 661, 1013, 1033, 1051, 1123, 1231, 1301, 1433, 1453, 1543, 1613, 2111, 2131, 2153, 2203, 2333, 2441, 2531, 2551, 3121, 3163, 3251, 3323, 3433, 3541, 4001, 4111, 4153, 4201, 4241, 4421
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Note that the definition of, e.g., A090714 works "the other way round". - M. F. Hasler, Jan 03 2014
|
|
LINKS
|
|
|
EXAMPLE
|
23 is a prime and a valid number in base 7, and 23 [base 7] = 17 [base 10] is again a prime.
|
|
MATHEMATICA
|
Select[ FromDigits@# & /@ IntegerDigits[ Prime@ Range@ 270, 7], PrimeQ] (* Robert G. Wilson v, Jan 05 2014 *)
FromDigits/@Select[Tuples[{0, 1, 2, 3, 4, 5, 6}, 4], AllTrue[ {FromDigits[ #], FromDigits[ #, 7]}, PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Dec 29 2015 *)
|
|
PROG
|
(PARI) is_A090710(p, b=7)=vecmax(d=digits(p))<b&&isprime(vector(#d, i, b^(#d-i))*d~)&&isprime(p) \\ M. F. Hasler, Jan 03 2014
(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, 7), if(isprime(t=fromdigits(digits(p, 7), 10)), listput(v, t))); Vec(v) \\ Charles R Greathouse IV, Nov 07 2016
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
Name, example and offset corrected by M. F. Hasler, Jan 03 2014
|
|
STATUS
|
approved
|
|
|
|