OFFSET
1,1
LINKS
Paolo Xausa, Table of n, a(n) for n = 1..10000
EXAMPLE
Prime 131 = 10000011_2 is a term since 113 and 11000001_2 = 197 are prime.
Prime 5 = 101_2 is not a term because 110_2 = 6 is not prime.
MATHEMATICA
prQ[p_, b_] := PrimeQ[FromDigits[StringRotateRight[IntegerString[p, b]], b]];
Select[Prime[Range[2000]], prQ[#, 2] && prQ[#, 10] &] (* Paolo Xausa, Sep 29 2025 *)
PROG
(Python)
from sympy import isprime
def ok(n):
if not isprime(n): return False
s, b = str(n), bin(n)[2:]
return isprime(int(s[-1]+s[:-1])) and isprime(int(b[-1]+b[:-1], 2))
print([k for k in range(11300) if ok(k)]) # Michael S. Branicky, Sep 24 2025
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rhys Feltman, Sep 24 2025
STATUS
approved
