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.

A360508 Numbers k such that A300570(k) considered simply as a decimal string is prime.

Original entry on oeis.org

2, 4, 13, 57, 64, 349
Offset: 1

Views

Author

N. J. A. Sloane, Feb 19 2023

Keywords

Examples

			A300570(4) = 10011101 = A000040(665267) is prime, so 4 is a term.
A300570(5) = 10110011101 = 6389*1582409 is composite, so 5 is not a term.
		

Crossrefs

Cf. A300570, A098780 (A300570 converted to base 10), A348792 (primes in A098780).

Programs

  • Mathematica
    Select[Range[350], PrimeQ[FromDigits[Flatten[IntegerDigits[Range[#, 1, -1], 2]]]] &] (* Amiram Eldar, Feb 19 2023 *)
  • Python
    from sympy import isprime
    from itertools import count, islice
    def agen(): # generator of terms
        s = ""
        for k in count(1):
            s = bin(k)[2:] + s
            if isprime(int(s)): yield k
    print(list(islice(agen(), 5))) # Michael S. Branicky, Feb 19 2023

Extensions

a(6) from Alois P. Heinz, Feb 19 2023