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.

A379938 Numbers k such that the k-th prime is a power of two reversed.

Original entry on oeis.org

1, 9, 18, 142, 575, 23652, 3633466, 10846595429, 802467018101, 2289255503212477
Offset: 1

Views

Author

Kalle Siukola, Jan 06 2025

Keywords

Examples

			The 9th prime is 23, 23 reversed is 32, and 32 = 2^5, so 9 is a term.
		

Crossrefs

Programs

  • 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()

Formula

A000040(a(n)) = A102385(n).
a(n) = A000720(A102385(n)). - Michel Marcus, Jan 07 2025

Extensions

a(8)-a(10) from Amiram Eldar, Jan 07 2025