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.

A354748 a(n) is the prime reached after A354747(n) steps when repeatedly applying the map x -> 3*x+2 to 2*n-1, or 0 if no prime is ever reached.

Original entry on oeis.org

5, 11, 17, 23, 29, 107, 41, 47, 53, 59, 197, 71, 233, 83, 89, 863, 101, 107, 113, 359, 2480057, 131, 137, 431, 149, 467, 4373, 167, 173, 179, 557, 191, 197, 5507, 1889, 647, 1997, 227, 233, 239, 2213, 251, 257, 263, 269, 827, 281, 863, 293, 2699, 2753, 311, 317
Offset: 1

Views

Author

Felix Fröhlich, Jun 06 2022

Keywords

Comments

Is a(100943) = 0?
If not 0, a(100943) >= 10^10000. - Michael S. Branicky, Jun 07 2022

Crossrefs

Programs

  • PARI
    a(n) = my(x=2*n-1); while(1, x=3*x+2; if(ispseudoprime(x), return(x)))
    
  • Python
    from sympy import isprime
    def f(x): return 3*x + 2
    def a(n):
        fn, c = f(2*n-1), 1
        while not isprime(fn): fn, c = f(fn), c+1
        return fn
    print([a(n) for n in range(1, 54)]) # Michael S. Branicky, Jun 07 2022