login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A379938
Numbers k such that the k-th prime is a power of two reversed.
0
1, 9, 18, 142, 575, 23652, 3633466, 10846595429, 802467018101, 2289255503212477
OFFSET
1,2
FORMULA
A000040(a(n)) = A102385(n).
a(n) = A000720(A102385(n)). - Michel Marcus, Jan 07 2025
EXAMPLE
The 9th prime is 23, 23 reversed is 32, and 32 = 2^5, so 9 is a term.
PROG
(Python)
import sympy
for (k, p) in enumerate(sympy.primerange(10**8)):
rev = int(str(p)[::-1])
# is rev a power of two (or zero)?
if rev & (rev - 1) == 0:
print(k + 1, end=", ")
print()
CROSSREFS
KEYWORD
base,nonn,more,new
AUTHOR
Kalle Siukola, Jan 06 2025
EXTENSIONS
a(8)-a(10) from Amiram Eldar, Jan 07 2025
STATUS
approved