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-10 of 11 results. Next

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.

A084716 a(1) = 1, a(n) = smallest multiple of a(n-1) > a(n-1) such that a(n) + 1 is a prime.

Original entry on oeis.org

1, 2, 4, 12, 36, 72, 432, 1296, 2592, 10368, 72576, 508032, 1524096, 12192768, 73156608, 146313216, 438939648, 2633637888, 23702740992, 142216445952, 1991030243328, 37829574623232, 416125320855552, 1664501283422208, 6658005133688832, 126502097540087808
Offset: 1

Views

Author

Amarnath Murthy, Jun 11 2003

Keywords

Crossrefs

Programs

  • Mathematica
    a[1] = 1; a[n_] := a[n] = Catch[For[k = 2, True, k++, an = k*a[n - 1]; If[PrimeQ[an + 1], Throw[an]]]]; Table[a[n], {n, 1, 23}] (* Jean-François Alcover, Nov 27 2012 *)

Extensions

Edited by Don Reble, Jun 19 2003

A084717 a(1) = 3 then a(n) = smallest multiple of a(n-1) > a(n-1) such that a(n) - 1 is a prime.

Original entry on oeis.org

3, 6, 12, 24, 48, 192, 384, 1152, 6912, 27648, 138240, 691200, 3456000, 34560000, 138240000, 414720000, 2073600000, 16588800000, 364953600000, 4744396800000, 66421555200000, 132843110400000, 664215552000000, 3321077760000000, 6642155520000000, 132843110400000000
Offset: 1

Views

Author

Amarnath Murthy, Jun 11 2003

Keywords

Crossrefs

Programs

  • Mathematica
    a[1] = 3; a[n_] := a[n] = Catch[For[k = 2, True, k++, an = k*a[n - 1]; If[PrimeQ[an - 1], Throw[an]]]]; Table[a[n], {n, 1, 22}](* Jean-François Alcover, Nov 27 2012 *)
    smp[n_]:=Module[{k=2},While[!PrimeQ[k*n-1],k++];k*n]; NestList[smp,3,30] (* Harvey P. Dale, Jun 03 2015 *)

Extensions

Edited by Don Reble, Jun 19 2003

A084718 a(n) = A084717(n+1)/A084717(n).

Original entry on oeis.org

2, 2, 2, 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
Offset: 1

Views

Author

Amarnath Murthy, Jun 11 2003

Keywords

Comments

Equals A084402 without the first term. - R. J. Mathar, Sep 17 2008

Crossrefs

Extensions

Edited by Don Reble, Jun 19 2003

A084401 n-th partial product + 1 is a prime, where a(n)>1 for n>1.

Original entry on oeis.org

1, 2, 2, 3, 3, 2, 6, 3, 2, 4, 7, 7, 3, 8, 6, 2, 3, 6, 9, 6, 14, 19, 11, 4, 4, 19, 4, 13, 3, 10, 13, 15, 4, 11, 9, 2, 5, 26, 19, 52, 21, 20, 63, 4, 19, 17, 6, 29, 19, 3, 5, 51, 11, 14, 15, 7, 12, 44, 34, 7, 21, 32, 3, 22, 10, 19, 19, 7, 20, 4, 22, 4, 17, 35, 47, 40, 14, 5, 14, 36, 39, 16
Offset: 1

Views

Author

Amarnath Murthy, May 31 2003

Keywords

Comments

Except for the first term, same as A036012. - David Wasserman, Dec 22 2004

Examples

			1+1 =2, 1*2+1=3, 1*2*2 +1=5 etc. are primes.
		

Crossrefs

Cf. A084402.

Programs

  • Mathematica
    a[1] = p = 1; a[n_] := a[n] = Catch[For[k = 2, True, k++, If[PrimeQ[p*k + 1], p = p*k; Throw[k]]]]; Table[a[n], {n, 1, 82}] (* Jean-François Alcover, May 14 2012 *)

Extensions

More terms from David Wasserman, Dec 22 2004

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).

A236465 Smallest prime a(n) such that 1 + a(1)*a(2)*...*a(n) is prime.

Original entry on oeis.org

2, 2, 3, 3, 2, 13, 2, 11, 19, 2, 2, 5, 11, 2, 31, 53, 3, 31, 43, 19, 13, 11, 43, 23, 7, 5, 13, 5, 29, 2, 29, 17, 53, 157, 13, 13, 3, 5, 127, 7, 97, 5, 97, 2, 89, 61, 7, 71, 61, 5, 127, 113, 37, 191, 107, 17, 197, 37, 101, 2, 5, 7, 17, 457, 3, 19, 29, 103, 227
Offset: 1

Views

Author

Thomas Ordowski, Jan 26 2014

Keywords

Examples

			a(1) = 2 because 1 + 2 = 3, which is prime.
a(2) = 2 because 1 + 2 * 2 = 5, which is prime.
a(3) = 3 because 2 doesn't work, since 1 + 2 * 2 * 2 = 9 = 3^2, but 3 does work, giving 1 + 2 * 2 * 3 = 13, which is prime.
		

Crossrefs

Programs

  • Mathematica
    pr = 1; Table[p = 2; While[! PrimeQ[p * pr + 1], p = NextPrime@p]; pr *= p; p, {n, 100}] (* Giovanni Resta, Jan 26 2014 *)

Extensions

a(11)-a(69) from Giovanni Resta, Jan 26 2014

A290585 a(n) is the largest number <= n such that 1 + a(1)*a(2)*...*a(n) is prime.

Original entry on oeis.org

1, 2, 3, 3, 4, 6, 6, 4, 7, 7, 3, 10, 13, 12, 10, 9, 13, 14, 15, 16, 13, 21, 22, 11, 25, 26, 27, 17, 29, 23, 7, 11, 30, 24, 34, 1, 1, 1, 1, 1, 1, 1, 1, 1, 45, 39, 23, 48, 32, 25, 44, 49, 53, 31, 1, 1, 1, 1, 59, 46, 53, 55, 62, 40, 62, 59, 46, 41, 9, 62, 59, 64, 1, 1, 1, 1, 1, 1, 1, 80, 57, 78, 80, 1, 85
Offset: 1

Views

Author

Thomas Ordowski, Aug 07 2017

Keywords

Comments

a(n) = n for n = 1, 2, 3, 6, 13, 25, 26, 27, 29, 45, 48, 53, 59, 80, 85, ...
If a(n) = 1, then the next entry > 1 is a(m) = m for the least m > n such that 1 + m * Product_{j=1..n-1} a_j is prime. By Dirichlet's theorem such m exists. - Robert Israel, Aug 07 2017

Crossrefs

Programs

  • Maple
    A[1]:= 1: P:= 1:
    for n from 2 to 200 do
      for k from n to 0 by -1 do
        if isprime(1+k*P) then
          A[n]:= k;
          P:= P*k;
          break
        fi
      od;
    od:
    seq(A[i],i=1..200); # Robert Israel, Aug 07 2017
  • Mathematica
    p = 1; Table[t = SelectFirst[Range[n, 1, -1], PrimeQ[1 + p #] &]; p *= t; t, {n, 85}] (* Giovanni Resta, Aug 08 2017 *)
  • PARI
    first(n) = { my(i = 1, res = vector(n)); res[1]=1; for(x=2, n, forstep(k=x, 0, -1, if(ispseudoprime(1+k*i), res[x]=k; i*=k; break()))); res; } \\ Iain Fox, Nov 15 2017
  • Python
    from sympy import isprime
    A=[0, 1]
    p=1
    for n in range(2, 201):
        for k in range(n, -1, -1):
            if isprime(1 + k*p):
                A.append(k)
                p*=k
                break
    print(A[1:]) # Indranil Ghosh, Aug 10 2017
    

Extensions

More terms from Robert Israel, Aug 07 2017

A290639 a(n) = largest number <= prime(n) such that 1 + a(1)*a(2)*...*a(n) is prime.

Original entry on oeis.org

2, 3, 5, 7, 11, 11, 16, 15, 21, 22, 30, 36, 41, 43, 34, 36, 56, 60, 48, 55, 54, 59, 57, 75, 42, 93, 93, 103, 104, 75, 126, 123, 133, 129, 148, 104, 146, 162, 159, 128, 177, 159, 153, 175, 184, 187, 193, 223, 210, 151, 164, 170, 240, 239, 254, 261, 201, 261, 253, 254, 170, 255, 297, 257, 270, 291, 309, 267, 341, 310, 261, 316, 363, 329, 373, 361, 327, 381, 373, 401, 346, 351, 379
Offset: 1

Views

Author

Thomas Ordowski, Aug 08 2017

Keywords

Comments

a(n) = prime(n) for n = 1, 2, 3, 4, 5, 13, 14, ...
If a(n) = 1 and a(n+1) > 1, then prime(n) < a(n+1) <= prime(n+1).
Conjecture: a(n) > 1 for every n. - Thomas Ordowski, Aug 08 2017
Indeed, a(n) > n for all n <= 460. - Robert Israel, Aug 08 2017

Crossrefs

Programs

  • Maple
    A[1]:= 2: P:= 2:
    for n from 2 to 200 do
      for k from ithprime(n) by -1 do
        if isprime(1+P*k) then A[n]:= k; P:= P*k; break fi
      od;
    od:
    seq(A[i],i=1..200); # Robert Israel, Aug 08 2017
  • Mathematica
    a[1] = 2; a[n_] := a[n] = Module[{k = Prime[n], r = Product[a[i], {i, 1, n - 1}]}, While[! PrimeQ[1 + k*r], k--]; k]; Array[a, 100] (* Amiram Eldar, Jan 19 2023 *)
    nxt[{n_,p_,a_}]:=Module[{k=Prime[n+1]},While[!PrimeQ[1+p*k],k--];{n+1,p*k,k}]; NestList[nxt,{1,2,2},85][[;;,3]] (* Harvey P. Dale, Jul 27 2025 *)

Extensions

More terms from Robert Israel, Aug 08 2017

A173910 a(n) = smallest number >= a(n-1) such that a(1)*a(2)*...*a(n)+1 is prime; a(1)=2.

Original entry on oeis.org

2, 2, 3, 3, 3, 4, 5, 7, 10, 14, 15, 18, 30, 32, 46, 56, 58, 59, 84, 86, 99, 101, 103, 106, 122, 126, 128, 128, 136, 152, 157, 170, 190, 208, 281, 282, 284, 320, 393, 406, 459, 479, 526, 529, 530, 540, 559, 601, 639, 640, 709, 789, 828, 900, 917, 949, 1029, 1029
Offset: 1

Views

Author

Dmitry Kamenetsky, Mar 02 2010

Keywords

Crossrefs

Programs

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

Extensions

More terms from Amiram Eldar, Jan 19 2023
Showing 1-10 of 11 results. Next