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.

Previous Showing 11-20 of 28 results. Next

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

A038710 a(n) is the smallest prime > product of the first n primes (A002110(n)).

Original entry on oeis.org

2, 3, 7, 31, 211, 2311, 30047, 510529, 9699713, 223092907, 6469693291, 200560490131, 7420738134871, 304250263527281, 13082761331670077, 614889782588491517, 32589158477190044789, 1922760350154212639131, 117288381359406970983379, 7858321551080267055879179
Offset: 0

Views

Author

Labos Elemer, May 02 2000

Keywords

Examples

			for n=1,2,3,4,5,11,75, A002110(n)+1 gives smaller primes than A002110(n)+p, where p is a fortunate number (prime). At n=5, both 2311 and 2333 are primes but the first is smaller.
		

Crossrefs

Programs

  • Maple
    p:= proc(n) option remember; `if`(n<1, 1, p(n-1)*ithprime(n)) end:
    a:= n-> nextprime(p(n)):
    seq(a(n), n=0..20);  # Alois P. Heinz, Mar 16 2020
  • Mathematica
    nmax = 2^16384; npd = 1; n = 1; npd = npd*Prime[n]; While[npd < nmax, cp = npd + 1; While[ ! (PrimeQ[cp]), cp = cp + 2]; Print[cp]; n = n + 1; npd = npd*Prime[n]] (* Lei Zhou, Feb 15 2005 *)
    NextPrime/@FoldList[Times,1,Prime[Range[25]]] (* Harvey P. Dale, Dec 17 2010 *)
  • PARI
    a(n) = nextprime(1+factorback(primes(n))); \\ Michel Marcus, Sep 25 2016; Dec 24 2022
    
  • Python
    from sympy import nextprime, primorial
    def a(n): return nextprime(primorial(n) if n else 1)
    print([a(n) for n in range(20)]) # Michael S. Branicky, Dec 24 2022

Formula

a(n) = A002110(n) + A038711(n). - Alois P. Heinz, Mar 16 2020

Extensions

Offset corrected, incorrect comment and formula removed, and more terms added by Jinyuan Wang, Mar 16 2020

A104372 Primes of the form A104350(k) + 1.

Original entry on oeis.org

2, 3, 7, 13, 61, 181, 2521, 7561, 415801, 1247401, 1099944846001, 146100174169950001, 1156675078903494150001, 750321420485151941966263672363958662088980270355720625000001
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 06 2005

Keywords

Crossrefs

Intersection of A104365 and A000040.

Programs

  • Mathematica
    Select[FoldList[Times, Array[FactorInteger[#][[-1, 1]] &, 100]] + 1, PrimeQ] (* Amiram Eldar, Apr 08 2024 *)
  • PARI
    gpf(n) = {my(p = factor(n)[, 1]); if(n == 1, 1, p[#p]);}
    lista(nmax) = {my(r = 1); for(k = 1, nmax, r * = gpf(k); if(isprime(r+1), print1(r+1, ", ")));} \\ Amiram Eldar, Apr 08 2024

Extensions

a(14) from Amiram Eldar, Apr 09 2024

A113165 Numbers that divide primorial numbers plus one (p#+1).

Original entry on oeis.org

2, 3, 7, 19, 31, 59, 61, 73, 97, 131, 139, 149, 167, 173, 181, 211, 223, 271, 277, 307, 313, 317, 331, 347, 463, 467, 509, 571, 601, 673, 809, 827, 877, 881, 953, 983, 997, 1031, 1033, 1039, 1051, 1063, 1069, 1109, 1259, 1279, 1283, 1291, 1297, 1361, 1381
Offset: 1

Views

Author

Keywords

Comments

The smallest composite member of the sequence is 1843 (19 * 97), which divides 17#+1 (19 * 97 * 277). Based on Euclid's proof that there are infinitely many primes.

Examples

			59 is in the sequence because 13#+1 = 30031 = 59 * 509.
		

Crossrefs

Cf. A002110 (primorials), A018239 (primorial primes), A000945 (Euclid-Mullin sequence), A006862 (primorials plus one).

Programs

  • PARI
    n=0;for(i=2,1e5,p=Mod(1,i);forprime(q=2,factor(i)[1,1],if(p==-1,print(n++," ",i);break());p*=q)) \\ Jeppe Stig Nielsen, Mar 25 2017

A136351 Primorial numbers p# such that p# + 1 is a prime.

Original entry on oeis.org

1, 2, 6, 30, 210, 2310, 200560490130
Offset: 1

Views

Author

Enoch Haga, Dec 25 2007

Keywords

Comments

This sequence is different from A121069 and A002110.
a(8) = A002110(75) has 154 digits and is too long to be listed. - R. J. Mathar, Jul 23 2008

Examples

			a(6)=2310 is followed by prime 2311 whereas 30030 is not followed by a prime.
		

Crossrefs

Programs

  • Mathematica
    Select[FoldList[Times, 1, Prime[Range[18]]],PrimeQ[#+1]&] (* James C. McMahon, May 08 2025 *)
  • PARI
    S=[];for(n=0, 80, k=vecprod(primes(n)); if(isprime(k+1), S=concat(S,k))); S \\ Miles Englezou, Oct 28 2024

Formula

{A002110(j): A002110(j)+1 in A000040}. - R. J. Mathar, Jul 23 2008
a(n) = A002110(A014545(n)). - Michel Marcus, Apr 05 2021
a(n) = A018239(n) - 1. - James C. McMahon, May 08 2025

Extensions

Changed a(1) from 4 to 2 and edited by R. J. Mathar, Jul 23 2008
a(1)=1 inserted by James C. McMahon, May 08 2025

A177689 Sums of 2 distinct primorials.

Original entry on oeis.org

3, 7, 8, 31, 32, 36, 211, 212, 216, 240, 2311, 2312, 2316, 2340, 30031, 30032, 30036, 30060, 30240, 32340, 510511, 510512, 510516, 510540, 510720, 512820, 540540, 9699691, 9699692, 9699696, 9699720, 9699900, 9702000, 9729720, 10210200
Offset: 1

Views

Author

Jonathan Vos Post, May 11 2010

Keywords

Comments

This is to numbers that are the sum of 2 different primes (A038609) as primorials (A002110) are to primes (A000040). The subsequence of primes among these sums of 2 distinct primorials is the sequence of primorial primes (A018239) which is the same as the subsequence of primes among the Euclid numbers (A006862).

Crossrefs

Formula

{a(n)} = {A002110(i) + A002110(j) for i =/= j}.

A103515 Primes of the form primorial P(k)*2^n-1 with minimal n, n>=0, k>=2.

Original entry on oeis.org

5, 29, 419, 2309, 30029, 1021019, 19399379, 892371479, 51757545839, 821495767572479, 14841476269619, 304250263527209, 54873078184468933509119, 2459559130353965639, 521426535635040715679, 15751252788463309939261439
Offset: 1

Views

Author

Lei Zhou, Feb 15 2005

Keywords

Comments

Conjecture: sequence is defined for all k>=2

Examples

			P(2)*2^0-1=3*2-1=5 is prime, so a(2)=5;
P(4)*2^1-1=7*5*3*2*2-1=419 is prime, so a(4)=419;
		

Crossrefs

Programs

  • Mathematica
    nmax = 2^2048; npd = 2; n = 2; npd = npd*Prime[n]; While[npd < nmax, tt = 1; cp = npd*tt - 1; While[ ! (PrimeQ[cp]), tt = tt*2; cp = npd*tt - 1]; Print[cp]; n = n + 1; npd = npd*Prime[n]]

A324550 Primes written in primorial base (A049345).

Original entry on oeis.org

10, 11, 21, 101, 121, 201, 221, 301, 321, 421, 1001, 1101, 1121, 1201, 1221, 1321, 1421, 2001, 2101, 2121, 2201, 2301, 2321, 2421, 3101, 3121, 3201, 3221, 3301, 3321, 4101, 4121, 4221, 4301, 4421, 5001, 5101, 5201, 5221, 5321, 5421, 6001, 6121, 6201, 6221, 6301, 10001, 10201, 10221, 10301, 10321, 10421, 11001, 11121, 11221
Offset: 1

Views

Author

Antti Karttunen, Mar 11 2019

Keywords

Comments

When the primorial base representation is expressed with decimal digits as here, the sequence stays unambiguous only up to the 317th prime, 2099, written as 96421, because after that primorial base digits larger than 9 would be needed.
By writing down terms from a(6) to a(46) (primes 13 .. 199):
201, 221, 301, 321, 421, 1001, 1101, 1121, 1201, 1221, 1321, 1421, 2001, 2101, 2121, 2201, 2301, 2321, 2421, 3101, 3121, 3201, 3221, 3301, 3321, 4101, 4121, 4221, 4301, 4421, 5001, 5101, 5201, 5221, 5321, 5421, 6001, 6121, 6201, 6221, 6301,
and then from a(48) to a(80) (primes 223 .. 409):
10201, 10221, 10301, 10321, 10421, 11001, 11121, 11221, 11321, 11421, 12001, 12101, 12121, 12201, 12321, 13101, 13121, 13201, 13221, 14001, 14101, 14221, 14301, 14321, 14421, 15101, 15201, 15301, 15321, 15421, 16101, 16121, 16301,
it is clearly seen that if n is a prime, then p+n is also likely to be prime, where p is the next higher primorial (A002110) > n. See also A324656.

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{k = Prime[n], p = 2, s = {}, r}, While[{k, r} = QuotientRemainder[k, p]; k != 0 || r != 0, AppendTo[s, r]; p = NextPrime[p]]; FromDigits[Reverse[s]]]; Array[a, 100] (* Amiram Eldar, Mar 06 2024 *)
  • PARI
    A324550(n) = A049345(prime(n)); \\ For A049345, see under that entry.

Formula

a(n) = A049345(A000040(n)).

A344384 Prime numbers p such that p-1 or p+1 is a number of least prime signature (A025487).

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 23, 29, 31, 37, 47, 59, 61, 71, 73, 97, 127, 179, 181, 191, 193, 211, 239, 241, 257, 359, 383, 419, 421, 431, 433, 479, 577, 719, 769, 839, 863, 1151, 1153, 1259, 1297, 1439, 1801, 2161, 2309, 2311, 2521, 2591, 2593, 2879, 3359, 3361
Offset: 1

Views

Author

Hal M. Switkay, May 16 2021

Keywords

Comments

The corresponding numbers of least prime signature are A344385.
19 is the first prime not in this sequence.
This sequence unites many familiar sequences of primes, including Fermat primes (A019434), Mersenne primes (A000668), primorial primes (A018239 and A057705), factorial primes (A088054), A007505, and A039687.
Questions: 1) Is this sequence infinite? 2) Is log(a(n)) = O(log(n)^2)?

Examples

			17 is a term because 17 - 1 = 16 is a number of least prime signature.
		

Crossrefs

Programs

  • Mathematica
    {2}~Join~Select[Prime@ Range[2, 900], AnyTrue[# + {-1, 1}, Times @@ MapIndexed[Prime[First[#2]]^#1 &, Sort[FactorInteger[#][[All, -1]], Greater] ] == # &] &] (* Michael De Vlieger, May 16 2021 *)

A103782 a(n) = minimal m >= 0 that makes primorial P(n)*2^m-1 prime.

Original entry on oeis.org

0, 0, 1, 0, 0, 1, 1, 2, 3, 12, 1, 0, 22, 2, 4, 13, 12, 6, 1, 4, 1, 4, 0, 2, 9, 5, 6, 2, 1, 9, 17, 22, 7, 19, 73, 23, 12, 5, 27, 33, 64, 33, 5, 7, 41, 44, 35, 29, 3, 19, 6, 26, 5, 11, 9, 33, 34, 16, 63, 46, 8, 4, 24, 48, 0, 11, 0, 26, 6, 25, 17, 31, 6, 46, 33, 46, 17, 8, 61, 12, 23, 76, 20, 17
Offset: 2

Views

Author

Lei Zhou, Feb 15 2005

Keywords

Comments

The values of n in A103515

Examples

			P(2)*2^0-1=5 is prime, so a(2)=0; P(9)*2^2-1=892371479 is prime, so a(9)=2;
		

Crossrefs

Programs

  • Mathematica
    nmax = 2^2048; npd = 2; n = 2; npd = npd*Prime[n]; While[npd < nmax, tn = 0; tt = 1; cp = npd*tt - 1; While[(cp > 1) && (! (PrimeQ[cp])), tn = tn + 1; tt = tt*2; cp = npd*tt - 1]; Print[tn]; n = n + 1; npd = npd*Prime[n]]
Previous Showing 11-20 of 28 results. Next