The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A348792 Numbers k such that the reverse concatenation of the first k binary numbers A098780(k) is prime. 1
2, 3, 4, 7, 11, 13, 25, 97, 110, 1939 (list; graph; refs; listen; history; text; internal format)
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])):
select(q, [$1..200])[]; # Alois P. Heinz, Dec 03 2021
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=", ")
afind(200) # Michael S. Branicky, Dec 03 2021
CROSSREFS
Sequence in context: A232543 A279071 A171027 * A064933 A060731 A238492
KEYWORD
nonn,base,hard,more
AUTHOR
N. J. A. Sloane, Dec 03 2021
EXTENSIONS
a(8)-a(10) from Amiram Eldar, Dec 03 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 17 01:28 EDT 2024. Contains 372555 sequences. (Running on oeis4.)