|
|
A054258
|
|
Concatenation of n in base 2 up to base 10 and n in base 10 down to base 2 is prime, all numbers are interpreted as decimals.
|
|
3
|
|
|
2607, 4007, 4069, 7597, 12411, 13583, 23041, 31113, 32619, 46187, 48469, 55777, 61411, 64387, 71143, 73837, 84761, 103559, 123797, 124043, 126613, 136509, 142019, 147449, 183981, 186889, 200183, 204219, 214819, 221101, 224123, 230977, 235493, 249049, 256489
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
a(1) = 2607 is a term since both 10100010111110120120220233404122002310413505735162607 and
26073516505710413200234041222023310120120101000101111 are prime.
|
|
MATHEMATICA
|
Select[Range[250000], AllTrue[{FromDigits[Flatten[Table[IntegerDigits[#, b], {b, 2, 10}]]], FromDigits[ Flatten[Table[IntegerDigits[#, b], {b, 10, 2, -1}]]]}, PrimeQ]&] (* Harvey P. Dale, May 28 2023 *)
|
|
PROG
|
(Python)
from gmpy2 import digits, is_prime
def ok(n): return is_prime(int("".join(digits(n, b) for b in list(range(2, 11))))) and is_prime(int("".join(digits(n, b) for b in list(range(10, 1, -1)))))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|