|
|
A348792
|
|
Numbers k such that the reverse concatenation of the first k binary numbers A098780(k) is prime.
|
|
1
|
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
a(4) = 7 is because the binary number 111 110 101 100 11 10 1 (with no spaces), which is 128413 in decimal, is prime.
|
|
MAPLE
|
q:= n-> isprime(Bits[Join](['Bits[Split](i)[]'$i=1..n])):
|
|
MATHEMATICA
|
f[n_] := FromDigits[Flatten @ IntegerDigits[Range[n, 1, -1], 2], 2]; Select[Range[120], PrimeQ[f[#]] &] (* Amiram Eldar, Dec 03 2021 *)
|
|
PROG
|
(Python)
from sympy import isprime
def afind(limit):
s, k = "", 1
for k in range(1, limit+1):
s += bin(k)[2:][::-1]
t = int(s[::-1], 2)
if isprime(t):
print(k, end=", ")
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,hard,more
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|