login
A360508
Numbers k such that A300570(k) considered simply as a decimal string is prime.
0
2, 4, 13, 57, 64, 349
OFFSET
1,1
EXAMPLE
A300570(4) = 10011101 = A000040(665267) is prime, so 4 is a term.
A300570(5) = 10110011101 = 6389*1582409 is composite, so 5 is not a term.
MATHEMATICA
Select[Range[350], PrimeQ[FromDigits[Flatten[IntegerDigits[Range[#, 1, -1], 2]]]] &] (* Amiram Eldar, Feb 19 2023 *)
PROG
(Python)
from sympy import isprime
from itertools import count, islice
def agen(): # generator of terms
s = ""
for k in count(1):
s = bin(k)[2:] + s
if isprime(int(s)): yield k
print(list(islice(agen(), 5))) # Michael S. Branicky, Feb 19 2023
CROSSREFS
Cf. A300570, A098780 (A300570 converted to base 10), A348792 (primes in A098780).
Sequence in context: A030968 A030862 A030923 * A328438 A039831 A173184
KEYWORD
nonn,base,more
AUTHOR
N. J. A. Sloane, Feb 19 2023
EXTENSIONS
a(6) from Alois P. Heinz, Feb 19 2023
STATUS
approved