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 100 results. Next

A051308 Euclid-Mullin sequence (A000945) with initial value a(1)=5 instead of a(1)=2.

Original entry on oeis.org

5, 2, 11, 3, 331, 19, 199, 53, 21888927391, 29833, 101, 71, 23, 311, 7, 72353, 13, 227, 96014559769, 5641, 41, 82107739003, 67, 169637539, 61, 29, 31319, 17, 97, 238591921, 313, 102065429, 157, 37, 595553520313, 244217, 241, 4773229353714971081083834237, 103
Offset: 1

Views

Author

Keywords

Comments

The initial primes 3 and 7 give essentially A000945.

Examples

			5*2*11*3 + 1 = 331, which is prime; the least prime factor of 330*331 + 1 = 109231 = 19*5749 is 19, so a(6) = 19.
		

Crossrefs

Programs

  • Mathematica
    a[1]=5; a[n_] := First[ Flatten[ FactorInteger[ 1+Product[ a[ j ], {j, 1, n-1} ] ] ] ]; Array[a, 10]
  • PARI
    spf(n)=my(f=factor(n)[1,1]);f;
    first(m)=my(v=vector(m));v[1]=5;for(i=2,m,v[i]=spf(1+prod(j=1,i-1,v[j])));v; \\ Anders Hellström, Aug 15 2015

Extensions

a(38)-a(39) from Robert Price, Jul 19 2015

A051335 Euclid-Mullin sequence (A000945) with initial value a(1)=127 instead of a(1)=2.

Original entry on oeis.org

127, 2, 3, 7, 5, 149, 19, 41, 23899, 139, 43, 761, 281, 17, 53, 2551, 23, 20149, 100720363856036298033578901613089271, 31, 179, 11, 13, 523, 282995646721, 2871347, 83, 10744429, 1031, 427773048135533, 97, 78506876242349, 67
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    a[1]=127; a[n_] := First[ Flatten[ FactorInteger[ 1+Product[ a[ j ], {j, 1, n-1} ] ] ] ]; Array[a, 10]
  • PARI
    spf(n)=my(f=factor(n)[1,1]);f;
    first(m)={my(v=vector(m)); v[1]=127; for(i=2, m, v[i]=spf(1+prod(j=1, i-1, v[j]))); v;} /* Anders Hellström, Aug 18 2015 */

A051334 Euclid-Mullin sequence (A000945) with initial value a(1)=8191 instead of a(1)=2.

Original entry on oeis.org

8191, 2, 3, 7, 53, 1399, 5, 19, 646843, 26945441, 109, 443, 90670999, 280460690293140589, 907, 16293787, 3655513, 499483, 131, 21067, 143797, 54540542259000816707816058313971443, 392963, 977, 11, 5021, 179, 439, 353, 34417238589462247, 1193114397863177, 13, 59, 31643, 79399, 73, 43, 16639867
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    a[1]=8191; a[n_] := First[ Flatten[ FactorInteger[ 1+Product[ a[ j ], {j, 1, n-1} ] ] ] ]; Array[a, 10]
  • PARI
    spf(n)=my(f=factor(n)[1,1]);f;
    first(m)={my(v=vector(m)); v[1]=8191; for(i=2, m, v[i]=spf(1+prod(j=1, i-1, v[j]))); v;} /* Anders Hellström, Aug 18 2015 */

Extensions

More terms from Sean A. Irvine, Sep 20 2012
a(30)-a(38) from Charles R Greathouse IV, Sep 21 2012

A051614 4th term in Euclid-Mullin prime sequence started with n-th prime (cf. A000945).

Original entry on oeis.org

43, 43, 3, 43, 3, 79, 3, 5, 3, 3, 11, 223, 3, 7, 3, 3, 827, 367, 13, 3, 439, 5, 3, 3, 11, 5, 619, 3, 5, 3, 7, 3, 3, 5, 5, 907, 23, 11, 3, 3, 3, 1087, 3, 19, 3, 5, 7, 13, 3, 5, 3, 3, 1447, 3, 3, 3, 3767, 1627, 1663, 3, 1699, 3, 19, 5, 1879, 3, 1987, 7, 3, 5, 4943, 3, 2203, 2239, 5, 23
Offset: 1

Views

Author

Keywords

Comments

First term in Euclid-Mullin sequence is p (say), 2nd term (if p odd) is 2, 3rd term is A023592.

Examples

			E.g., (5,2,11,3), (89,2,179,3), (17,2,5,3), (2,3,7,43), (61,2,3,367).
		

Crossrefs

Programs

  • Mathematica
    a[n_] := (Clear[f]; f[1] = Prime[n]; f[k_] := f[k] = FactorInteger[Product[f[i], {i, 1, k-1}]+1][[1, 1]]; f[4]); Table[a[n], {n, 1, 76}] (* Jean-François Alcover, Feb 05 2014 *)

A056756 Where n-th prime appears in Euclid-Mullin sequence A000945.

Original entry on oeis.org

1, 2, 7, 3, 12, 5, 13, 36, 25, 33, 50, 18
Offset: 1

Views

Author

Robert G. Wilson v, Aug 15 2000

Keywords

Crossrefs

Cf. A000945.

Programs

  • Mathematica
    f[1]=2; f[n_] := f[n] = FactorInteger[Product[f[i], {i, 1, n - 1}] + 1][[1, 1]] ems = Table[f[n], {n, 1, 43}]; Do[Print[Position[ems, Prime[n]][[1, 1]]], {n, 1, 25}]

Extensions

Gaps that need filling: 1, 2, 7, 3, 12, 5, 13, 36, 25, 33, 50, 18, ?, 4, ?, 6, ?, 42, ?, 22, ?, ?, ?, 35, 26
Two more terms from Sean A. Irvine, Sep 20 2012

A093777 a(n) is the smallest prime which, if used to start a Euclid-Mullin sequence (like A000945), the resulting sequence contains the n consecutive primes 2, 3, ..., prime(n).

Original entry on oeis.org

2, 2, 19, 199, 2089, 99109, 1960969, 10129129, 87726649, 4549584049, 328034245549, 20584643748679, 666188861477149, 31395465477725359, 894857713367947339, 434392154438254391389, 17934770256689308411399
Offset: 1

Views

Author

Labos Elemer, May 03 2004

Keywords

Comments

Thanks in part to Dirichlet's theorem, a(n) exists for each n. - Don Reble, Oct 07 2006

Examples

			a(1) = a(2) = 2 because they generate {2,3,7,43,13,...};
a(3) = 19 because it generates {19,2,3,5,571,271,...}, see A051312;
a(4) = 199 because it generates {199,2,3,5,7,23,881,...};
a(5) = 2089 because it generates {2089,2,3,5,7,11,269,...};
a(6) = 99109 because it generates {99109,2,3,5,7,11,13,2976243271,...};
a(7) = 1960969 because it generates {1960969,2,3,5,7,11,13,17,281,47,419,5539788476533581271,37,19,173,...}
		

Crossrefs

Extensions

More terms from Don Reble, Oct 07 2006

A093778 Primes p used as initial values for Euclid-Mullin sequences (variant A000945) instead of 2, such that all provide {p,2,3,5,7,11,13,q,...} initial segments in which the first six primes occur from 2nd to 7th terms.

Original entry on oeis.org

99109, 159169, 189199, 399409, 459469, 609619, 669679, 699709, 819829, 1030039, 1090099, 1150159, 1270279, 1300309, 1390399, 1420429, 1810819, 1870879, 1930939, 1960969, 2021029, 2051059, 2141149, 2201209, 2261269, 2321329
Offset: 1

Views

Author

Labos Elemer, May 03 2004

Keywords

Examples

			Initial segments of Euclid-Mullin sequences provided by
a[33]=3132139, a[34] and a[35] initial values:
{3132139,2,3,5,7,11,13,94058134171}}
{3282289,2,3,5,7,11,13,59}},
{3372379,2,3,5,7,11,13,29}}
		

Crossrefs

Programs

  • Mathematica
    b[x_] :=First[Flatten[FactorInteger[Apply[Times, Table[b[j], {j, 1, x - 1}]] +1]]];b[1] = 1; Do[b[1] = Prime[j], el=8; If[Equal[Table[b[w], {w, 2, 7}], {2, 3, 5, 7, 11, 13}], Print[{j, Table[b[w], {w, 1, el}]}]], {j, 100000, 1000000}]

A051309 Euclid-Mullin sequence (A000945) with initial value a(1)=11 instead of a(1)=2.

Original entry on oeis.org

11, 2, 23, 3, 7, 10627, 433, 17, 13, 10805892983887, 73, 6397, 19, 489407, 2753, 87491, 18618443, 5, 31, 113, 41, 10723, 35101153, 25243, 374399, 966011, 293821591198219762366057, 234947, 4729, 27953, 3256171, 331, 613, 67, 272646324430637, 34281113, 21050393332691947013, 61, 97
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    a[1]=11; a[n_] := First[ Flatten[ FactorInteger[ 1+Product[ a[ j ], {j, 1, n-1} ] ] ] ]; Array[a,10]
  • PARI
    lpf(n)=factor(n)[1,1]
    first(m)=my(v=vector(m)); v[1]=11; for(i=2, m, v[i]=lpf(1+prod(j=1, i-1, v[j]))); v;
    \\ Anders Hellström, Aug 22 2015

Extensions

Corrected and extended by Sean A. Irvine, Apr 13 2008

A094152 a(n) is the position of prime 7 in the Euclid-Mullin (EM) sequence of type A000945, if it were started with prime(n) instead of 2.

Original entry on oeis.org

3, 3, 15, 1, 5, 6, 5, 24, 10, 6, 7, 6, 5, 4, 7, 5, 3, 5, 6, 16, 5, 6, 5, 28, 6, 3, 5, 36, 7, 15, 4, 15, 7, 7, 8, 7, 7, 5, 7, 14, 5, 6, 19, 16, 17, 5, 4, 12, 5, 8, 10, 17, 5, 5, 8, 10, 3, 5, 7, 30, 5, 5, 20, 3, 5, 6, 6, 4, 9, 9, 3, 9, 5, 6, 8, 8
Offset: 1

Views

Author

Labos Elemer, May 05 2004

Keywords

Examples

			n=8: p(8)=19, the corresponding EM sequence is A051312 in which p=7 arises at the 24th position as follows:
{19, 2, 3, 5, 571, 271, 457, 397, 1123, 23, 103, 42572757267735264511, 313, 17, 16013177, 7951, 1259, 41, 1531, 11, 83, 53, 67, 7, 21397}, thus a(8)=24.
		

Crossrefs

Extensions

More terms from Sean A. Irvine, Sep 20 2012

A167604 A variant of Euclid-Mullin (A000945): a(1)=2, a(n+1) is the least prime dividing [Product_{i in I} a(i) + Product_{i not in I} a(i)], minimized over all subsets I of {1..n}.

Original entry on oeis.org

2, 3, 5, 11, 37, 13, 7, 29, 17, 19, 43, 23, 47, 41, 53, 31, 61, 59, 67, 79, 83, 73, 97, 71, 101, 89, 103, 127, 107, 113, 137, 131, 139, 109, 149, 151, 163, 157, 167, 173, 193, 211, 179, 191, 181, 223, 199, 197, 233, 227, 229, 239, 241, 251, 257, 307, 281, 269, 271, 293
Offset: 1

Views

Author

Kok Seng Chua (chuakokseng(AT)hotmail.com), Nov 07 2009

Keywords

Comments

By Euclid's argument, the a(i) are distinct.
One can ask whether all primes occur in this sequence.

Examples

			a(4)=11 which is the smallest prime dividing the 4 partitions 2+3*5=17, 3+2*5=13, 5+2*3=11, 1+2*3*5=31.
		

Crossrefs

A167605 lists such n that the first n terms of a(n) is a permutation of the first n primes.
A000945 is the original Euclid-Mullin sequence (where I is restricted to the empty set).
Cf. A344020.

Programs

  • Maple
    with(numtheory):p:=proc(N) local S, d : S:=NULL:for d  in divisors(N) while d^2<=N  do S:=S,divisors(d+N/d)[2] od : return(min(S)) end:
    a :=n->if n = 1 then 2 else p(mul(a(i),i = 1 .. n-1)) fi :
    seq(a(n), n=1..15);
    # Robert FERREOL, Oct 01 2019
  • Mathematica
    p[N_Integer] := Module[{S = {}, d, divisorsList},
    For[d = 1, d^2 <= N, d++, If[Divisible[N, d], divisorsList = Divisors[d + N/d];
    If[Length[divisorsList] >= 2, AppendTo[S, divisorsList[[2]]]];]]; Min[S]];
    a[n_Integer] := If[n == 1, 2, p[Times @@ Table[a[i], {i, 1, n - 1}]]];
    Table[a[n], {n, 1, 14}] (* Hilko Koning, Oct 30 2024 *)
  • PARI
    { A167604_list() = my(a,A,p,b,q,z,m); a = []; A=1; while(1, p=2; while( kronecker(-A,p)!=1, p=nextprime(p+1) ); b=lift(sqrt(-A+O(p))); z=znprimroot(p); m=nextprime(random(10^6)); q=lift(prod(i=1,#a, Mod(1+x^znlog(Mod(a[i],p),z,p-1),(1-x^(p-1))*Mod(1,m)) )); if( polcoeff(q,znlog(Mod(b,p),z,p-1),x)==0, error("conjecture failed mod",m)); a=concat(a,[p]); A*=p; print1(p,", ") ) } /* Max Alekseyev, May 20 2015 */

Formula

For any n, we have Legendre symbol (-a(1)*a(2)*...*a(n-1) / a(n)) = 1. If p is the smallest prime such that (-a(1)*a(2)*...*a(n-1) / p) = 1, then a(n) >= p. Conjecture: For all n, a(n) = p. Note that if b is such that b^2 == -a(1)*a(2)*...*a(n-1) (mod p) and for some I, b == prod_{i in I} a(i) (mod p), then a(n) = p. Heuristically, I must exist for large enough n, since the number of possible subsets I is much larger than p. - Max Alekseyev, Nov 11 2009, May 20 2015

Extensions

Edited and extended by Max Alekseyev, Nov 11 2009
Showing 1-10 of 100 results. Next