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.

Showing 1-3 of 3 results.

A036013 a(n) = smallest number > 1 such that a(1)a(2)...a(n) - 1 is prime (or 1).

Original entry on oeis.org

2, 2, 2, 3, 2, 4, 2, 3, 6, 4, 5, 5, 5, 10, 4, 3, 5, 8, 22, 13, 14, 2, 5, 5, 2, 20, 9, 9, 24, 5, 26, 15, 14, 25, 25, 4, 9, 30, 9, 21, 12, 11, 10, 2, 40, 19, 8, 13, 11, 50, 3, 25, 25, 8, 5, 25, 46, 19, 47, 54, 9, 13, 14, 43, 4, 24, 28, 16, 33, 25, 152, 2, 11, 22, 6, 78, 87, 7, 10, 21
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A036012, A058000 (corresponding primes).

Programs

  • Mathematica
    sng1[{t_,a_}]:=Module[{k=2},While[CompositeQ[t k-1],k++];{t*k,k}]; NestList[sng1,{2,2},80][[;;,2]] (* Harvey P. Dale, May 20 2023 *)
  • Python
    from sympy import isprime
    from itertools import count
    a,p = [2],2
    for _ in range(100):
        q = next(filter(lambda x:isprime(x*p-1), count(2)))
        p = p*q
        a.append(q)
    print(a) # Nicholas Stefan Georgescu, Mar 06 2023

Extensions

More terms from Erich Friedman. More terms from Jud McCranie, Jan 26 2000.

A057999 a(n) is smallest prime such that a(n)-1 is a proper multiple of a(n-1)-1, with a(0) = 2.

Original entry on oeis.org

2, 3, 5, 13, 37, 73, 433, 1297, 2593, 10369, 72577, 508033, 1524097, 12192769, 73156609, 146313217, 438939649, 2633637889, 23702740993, 142216445953, 1991030243329, 37829574623233, 416125320855553, 1664501283422209, 6658005133688833, 126502097540087809, 506008390160351233
Offset: 0

Views

Author

Henry Bottomley, Nov 02 2000

Keywords

Crossrefs

Programs

  • Mathematica
    a[0] = 2; a[n_] := a[n] = Module[{k = 2*a[n - 1] - 2}, While[! PrimeQ[k + 1], k += (a[n - 1] - 1)]; k + 1]; Array[a, 25, 0] (* Amiram Eldar, Jan 19 2023 *)

Formula

a(n) = 1 + Product_{i=1..n} A036012(i) = a(n-1) * A036012(n) + 1 - A036012(n).

A346161 Prime numbers p such that the number of iterations of map A039634 required for p to reach 2 sets a new record.

Original entry on oeis.org

2, 3, 7, 23, 47, 191, 383, 1439, 2879, 11519, 23039, 261071, 1044287, 2949119, 31426559, 194224127, 1069493759, 8554807007, 31337349119, 68438456063, 136876912127, 547507648511, 8760122376191
Offset: 1

Views

Author

Ya-Ping Lu, Jul 08 2021

Keywords

Comments

It seems that the record number of iterations for a(n) is n-1.
Alternatively, prime numbers p such that the number of odd primes encountered under iteration of A004526 sets a new record. - Martin Ehrenstein, Aug 16 2021

Examples

			Terms in this sequence are indicated in square brackets in the tree below for primes up to 97. Note that a(n) is the smallest prime of depth n-1.
                 1                 ___________[2]____________
                 |                /        /   |   \    \    \
         _______[3]__       ____ 5 _     17   19   37   67   73
        /        |   \     /     |  \     |    |
     _[7]_      13   97   11    41  43   71   79
    /  |  \      |       /  \    |
  29  31  61    53    [23]  89  83
   |                    |
  59                  [47]
		

Crossrefs

Programs

  • Python
    from sympy import nextprime, isprime
    rec = -1; p1 = 1
    while p1 < 1000000000:
        p = nextprime(p1); m = p; ct = 0
        while m > 2:
            if isprime(m): ct += 1
            m //= 2
        if ct > rec: print(p); rec = ct
        p1 = p

Extensions

a(19)-a(23) from Martin Ehrenstein, Aug 22 2021
Showing 1-3 of 3 results.