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-8 of 8 results.

A038711 a(n) is the smallest m such that A002110(n) + m is prime.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 17, 19, 23, 37, 61, 1, 61, 71, 47, 107, 59, 61, 109, 89, 103, 79, 151, 197, 101, 103, 233, 223, 127, 223, 191, 163, 229, 643, 239, 157, 167, 439, 239, 199, 191, 199, 383, 233, 751, 313, 773, 607, 313, 383, 293, 443, 331, 283, 277, 271, 401, 307
Offset: 0

Views

Author

Labos Elemer, May 02 2000

Keywords

Comments

Any composite a(n) would disprove Fortune's conjecture, see A005235. - Jeppe Stig Nielsen, Oct 31 2003

Examples

			For n=11, 1 + A002110(11) = 200560490131 < 200560490197 = 67 + A002110(11); therefore, a(11)=1 but A005235(11)=67.
		

Crossrefs

Programs

  • Maple
    p:= proc(n) option remember; `if`(n<1, 1, p(n-1)*ithprime(n)) end:
    a:= n-> nextprime(p(n))-p(n):
    seq(a(n), n=0..60);  # Alois P. Heinz, Mar 16 2020
  • Mathematica
    nmax=2^16384; npd=1;n=1;npd=npd*Prime[n]; While[npdLei Zhou, Feb 15 2005 *)
  • PARI
    a(n) = my(P=vecprod(primes(n))); nextprime(P+1) - P; \\ Michel Marcus, Dec 12 2023

Formula

a(n) = Min(1, A005235(n)); a(n)=1 for n=1, 2, 3, 4, 5, 11, 75, ...
a(n) = 1 for n=0, 1, 2, 3, 4, 5, 11, 75, ... (A014545); a(n) = A005235(n) otherwise. - Jeppe Stig Nielsen, Oct 31 2003
a(n) = A038710(n) - A002110(n). - Alois P. Heinz, Mar 16 2020

Extensions

a(0)=1 prepended by Alois P. Heinz, Mar 16 2020

A007014 Largest prime <= Product prime(k).

Original entry on oeis.org

2, 5, 29, 199, 2309, 30029, 510481, 9699667, 223092827, 6469693189, 200560490057, 7420738134751, 304250263527209, 13082761331669941, 614889782588491343, 32589158477190044657, 1922760350154212638963, 117288381359406970983181, 7858321551080267055878989
Offset: 1

Views

Author

Keywords

Comments

A057705 contains terms of a(n) such that A002110(n) - a(n) = 1. -Michael De Vlieger, May 15 2017

Examples

			From _Michael De Vlieger_, May 15 2017: (Start)
a(1) = 2 since A002110(1) = 2. 2 is prime thus the largest prime <= 2 = 2.
a(2) = 5 since A002110(2) = 6. 5 is the largest prime <= 6. (End)
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Mathematica
    Array[Abs@ NextPrime[Product[Prime@ i, {i, #}], -1] &, 14] (* Michael De Vlieger, May 15 2017 *)
  • PARI
    lista(n) = {prd = 1; for (i=1, n, prd *= prime(i); print1(precprime(prd), ", "););} \\ Michel Marcus, Jun 17 2013
    
  • PARI
    a(n)=precprime(prod(i=1,n,prime(i))) \\ Charles R Greathouse IV, Jun 17 2013

Formula

From Michael De Vlieger, May 15 2017: (Start)
a(n) = prime(A000849(n)).
a(n) = A151799(A002110(n)). (End)

Extensions

Corrected by Jud McCranie, Jan 03 2001
More terms from Michael De Vlieger, May 15 2017

A060270 Distance of n-th primorial from previous prime.

Original entry on oeis.org

1, 1, 11, 1, 1, 29, 23, 43, 41, 73, 59, 1, 89, 67, 73, 107, 89, 101, 127, 97, 83, 89, 1, 251, 131, 113, 151, 263, 251, 223, 179, 389, 281, 151, 197, 173, 239, 233, 191, 223, 223, 293, 593, 293, 457, 227, 311, 373, 257, 307, 313, 607, 347, 317, 307, 677, 467, 317
Offset: 2

Views

Author

Labos Elemer, Mar 23 2001

Keywords

Examples

			Before 7th primorial 510481 is the largest prime. Its distance from 510510 is a(7)=29.
		

Crossrefs

Programs

  • Maple
    [seq(product(ithprime(j),j=1..n)-prevprime(product(ithprime(j),j=1..n)), n=2..50)];
  • Mathematica
    Map[# - NextPrime[#, -1] &, Rest@ FoldList[Times, Prime@ Range[59]]] (* Michael De Vlieger, Aug 10 2023 *)
  • PARI
    a(n) = my(P=vecprod(primes(n))); P-precprime(P-1); \\ Michel Marcus, Aug 11 2023

Formula

a(n)=1 for n=2, 3, 5, 6, 13, 24, 66, 68, 167, ... (A057704); a(n)=A055211(n) otherwise. - Jeppe Stig Nielsen, Oct 31 2003

Extensions

More terms from Jeppe Stig Nielsen, Oct 31 2003

A058044 Difference between the smallest prime following and largest prime preceding n-th primorial number.

Original entry on oeis.org

2, 2, 12, 2, 18, 48, 46, 80, 102, 74, 120, 72, 136, 174, 132, 168, 198, 190, 230, 176, 234, 286, 102, 354, 364, 336, 278, 486, 442, 386, 408, 1032, 520, 308, 364, 612, 478, 432, 382, 422, 606, 526, 1344, 606, 1230, 834, 624, 756, 550
Offset: 2

Views

Author

Labos Elemer, Nov 17 2000

Keywords

Crossrefs

Programs

  • Maple
    [seq(nextprime(product(ithprime(k), k=1..w))-prevprime (product(ithprime(k), k=1..w)), w=2..50)];
  • Mathematica
    Rest[NextPrime[#]-NextPrime[#,-1]&/@Rest[FoldList[Times,1,Prime[Range[ 50]]]]] (* Harvey P. Dale, Mar 24 2013 *)

Formula

a(n) = A038710(n)-A007014(n).

Extensions

Offset corrected by Alois P. Heinz, Jun 08 2014

A035345 Smallest prime > prime(1)*prime(2)*...*prime(n)+1.

Original entry on oeis.org

3, 5, 11, 37, 223, 2333, 30047, 510529, 9699713, 223092907, 6469693291, 200560490197, 7420738134871, 304250263527281, 13082761331670077, 614889782588491517, 32589158477190044789, 1922760350154212639131
Offset: 0

Views

Author

Keywords

Examples

			Next prime after 2*3*5 + 1 = 31 is 37, so a(3)=37.
		

Crossrefs

Programs

  • Mathematica
    Table[NextPrime[Product[Prime@ k, {k, n}] + 1], {n, 0, 17}] (* Michael De Vlieger, Dec 02 2015 *)
  • PARI
    a(n) = nextprime(2+factorback(primes(n))); \\ Michel Marcus, Dec 24 2022
    
  • Python
    from sympy import nextprime, primorial
    def a(n): return nextprime(1 + (primorial(n) if n else 1))
    print([a(n) for n in range(18)]) # Michael S. Branicky, Dec 24 2022

Formula

a(n) = A002110(n) + A005235(n) for n > 0. - Jonathan Sondow, Dec 02 2015

A060269 Distance of n-th primorial from closest prime.

Original entry on oeis.org

1, 1, 1, 1, 19, 23, 37, 41, 1, 59, 1, 47, 67, 59, 61, 89, 89, 103, 79, 83, 89, 1, 103, 131, 113, 127, 223, 191, 163, 179, 389, 239, 151, 167, 173, 239, 199, 191, 199, 223, 233, 593, 293, 457, 227, 311, 373, 257
Offset: 3

Views

Author

Labos Elemer, Mar 23 2001

Keywords

Examples

			7th primorial is surrounded by {510529,510481} primes in {19,71} distances of which the smaller is 19=a(7).
		

Crossrefs

Programs

  • Maple
    with(numtheory): [seq(min(nextprime(product(ithprime(j),j=1..n))-product(ithprime(j),j= >1..n),product(ithprime(j),j=1..n)-prevprime(product(ithprime(j),j=1..n >))), n=3..50)];
  • Mathematica
    dnp[n_]:=Module[{a=NextPrime[n,-1],b=NextPrime[n]},Min[n-a,b-n]]; dnp/@ FoldList[Times,Prime[Range[50]]] (* Harvey P. Dale, Jul 11 2017 *)

A058020 Difference between lcm(1,..,n) and the smallest prime > lcm(1,...,n) + 1, where n runs over A000961, lcm(n) runs through A051451.

Original entry on oeis.org

3, 5, 5, 7, 11, 13, 11, 13, 31, 23, 19, 37, 41, 29, 31, 43, 53, 41, 53, 79, 59, 97, 59, 61, 113, 97, 179, 73, 73, 97, 103, 101, 109, 101, 229, 109, 139, 113, 227, 131, 191, 163, 139, 199, 151, 139, 181, 223, 229, 367, 239, 499, 251, 509, 251, 227, 373, 281, 233
Offset: 1

Views

Author

Labos Elemer, Nov 14 2000

Keywords

Comments

Analogous to Fortunate numbers and like them so far proved to be primes. This holds for x<=421: if Q is the first follower prime, then Q(421)-lcm(1,...421) = 557. For first some cases when 1+LCM is also a prime, the 2nd primes give 3,5,5,7,11,11,.. deviations, i.e. give primes.

Crossrefs

Programs

  • PARI
    N=1; for(n=2,1e3, if(isprimepower(n,&p), N*=p; print1(nextprime(N+2)-N", "))) \\ Charles R Greathouse IV, Nov 18 2015

Extensions

Name corrected by Charles R Greathouse IV, Nov 18 2015

A277005 Least prime greater than n-th compositorial.

Original entry on oeis.org

2, 5, 29, 193, 1733, 17291, 207367, 2903041, 43545611, 696729629, 12541132817, 250822656001, 5267275776047, 115880067072017, 2781121609728037, 69528040243200079, 1807729046323200001, 48808684250726400031, 1366643159020339200397
Offset: 0

Views

Author

Walter Carlini, Sep 25 2016

Keywords

Examples

			a(0) = A151800(A036691(0)) = A151800(1) = 2; where the zeroth compositorial, A036691(0), is the empty product = 1.
a(3) = 193, which is the least prime number greater than the third compositorial number, 192 = 4 * 6 * 8.
		

Crossrefs

Programs

  • Mathematica
    findComp[n_] := FixedPoint[n + PrimePi@ # + 1 &, n + PrimePi@ n + 1] ; Table[NextPrime@ Product[findComp@ k, {k, n}], {n, 0, 18}] (* Michael De Vlieger, Sep 25 2016, after Robert G. Wilson v at A036691 *)

Formula

a(n) = A151800(A036691(n)). - Michel Marcus, Sep 25 2016

Extensions

a(18) corrected by Sean A. Irvine, Sep 26 2023
Showing 1-8 of 8 results.