cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A348792 Numbers k such that the reverse concatenation of the first k binary numbers A098780(k) is prime.

This page as a plain text file.
%I A348792 #20 Dec 03 2021 12:45:28
%S A348792 2,3,4,7,11,13,25,97,110,1939
%N A348792 Numbers k such that the reverse concatenation of the first k binary numbers A098780(k) is prime.
%e A348792 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.
%p A348792 q:= n-> isprime(Bits[Join](['Bits[Split](i)[]'$i=1..n])):
%p A348792 select(q, [$1..200])[];  # _Alois P. Heinz_, Dec 03 2021
%t A348792 f[n_] := FromDigits[Flatten @ IntegerDigits[Range[n, 1, -1], 2], 2]; Select[Range[120], PrimeQ[f[#]] &] (* _Amiram Eldar_, Dec 03 2021 *)
%o A348792 (Python)
%o A348792 from sympy import isprime
%o A348792 def afind(limit):
%o A348792     s, k = "", 1
%o A348792     for k in range(1, limit+1):
%o A348792         s += bin(k)[2:][::-1]
%o A348792         t = int(s[::-1], 2)
%o A348792         if isprime(t):
%o A348792             print(k, end=", ")
%o A348792 afind(200) # _Michael S. Branicky_, Dec 03 2021
%Y A348792 Cf. A000422, A007908, A098780, A176024.
%K A348792 nonn,base,hard,more
%O A348792 1,1
%A A348792 _N. J. A. Sloane_, Dec 03 2021
%E A348792 a(8)-a(10) from _Amiram Eldar_, Dec 03 2021