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

A092568 Duplicate of A055624.

Original entry on oeis.org

3, 7, 739, 199, 883, 13127, 463, 36551, 39607, 183091, 4468903, 6419299, 241603
Offset: 1

Views

Author

Keywords

A055623 First occurrence of run of primes congruent to 1 mod 4 of exactly length n.

Original entry on oeis.org

5, 13, 89, 389, 2593, 12401, 77069, 262897, 11593, 373649, 766261, 3358169, 12204889, 18256561, 23048897, 12270077, 297387757, 310523021, 297779117, 3670889597, 5344989829, 1481666377, 2572421893, 1113443017, 121117598053, 84676452781, 790457451349, 3498519134533, 689101181569, 3289884073409
Offset: 1

Views

Author

Labos Elemer, Jun 05 2000

Keywords

Comments

The term "exactly" means that before the first and after the last terms of the run, the next primes are not congruent to 1 modulo 4.
Carlos Rivera's Puzzle 256 includes Jack Brennen's a(29) starting at 689101181569 to 689101182437 and asks if anyone can break that 1999 record.

Examples

			a(3)=89 because here n=3 and 89 is the start of a run of exactly 3 consecutive primes congruent to 1 mod 4.
n=3: 83, 89, 97, 101, 103 are congruent to 3, 1, 1, 1, 3 modulo 4. So a(3) = 89.
a(33) = 3278744415797. - _Jens Kruse Andersen_, May 29 2006
		

Crossrefs

Programs

  • Mathematica
    nn = 10; t = Table[0, {nn}]; found = 0; p = 1; cnt = 0; While[found < nn, p = NextPrime[p]; If[Mod[p, 4] == 1, cnt++, If[0 < cnt <= nn && t[[cnt]] == 0, t[[cnt]] = NextPrime[p, -cnt]; found++]; cnt = 0]]; t (* T. D. Noe, Jun 21 2013 *)

Formula

Compute sequence of primes congruent to 1 mod 4. When first occurrence of run of exactly length n is found, add first prime to sequence.

Extensions

Corrected and extended by Reiner Martin, Jul 18 2001
More terms from Jens Kruse Andersen, May 29 2006
Edited by N. J. A. Sloane, Jun 01 2006

A055626 First prime starting a chain of exactly n consecutive primes congruent to 5 modulo 6.

Original entry on oeis.org

5, 23, 47, 251, 1889, 7793, 43451, 243161, 726893, 759821, 2280857, 1820111, 10141499, 40727657, 19725473, 136209239, 744771077, 400414121, 1057859471, 489144599, 13160911739, 766319189, 38451670931, 119618704427, 21549657539, 141116164769, 140432294381, 437339303279
Offset: 1

Views

Author

Labos Elemer, Jun 05 2000

Keywords

Comments

The term "exactly" means that before the first and after the last primes of chain, the immediate primes are not congruent to 5 modulo 6.
a(21)>2^31, a(22)= 766319189. - Hugo Pfoertner, Jul 31 2003
See A057622 for the variant where "exactly" is replaced by "at least". See A055625 for the variant "congruent to 1 (mod 6)". - M. F. Hasler, Sep 03 2016

Crossrefs

Programs

  • Mathematica
    pp = Table[{p = Prime[n], Mod[p, 6]}, {n, 10^6}];
    sp = Split[pp, Mod[#1[[2]], 6] == Mod[#2[[2]], 6]&];
    a[n_] := SelectFirst[sp, Length[#] == n && MatchQ[#, {{_Integer, 5} ..}]& ][[1, 1]];
    Table[an = a[n]; Print[n, " ", an]; an, {n, 1, 13}] (* Jean-François Alcover, Nov 21 2018 *)
  • PARI
    okchain(n, p) = {if ((precprime(p-1) % 6) == 5, return (0)); for (i=1, n, if ((p % 6) != 5, return (0)); p = nextprime(p+1);); if ((p % 6) == 5, 0, 1);}
    a(n) = {p = 5; while (! okchain(n, p), p = nextprime(p+1)); p;} \\ Michel Marcus, Dec 17 2013

Extensions

a(9)-a(13), including correction of a(9)-a(10) from Reiner Martin, Jul 18 2001
a(14)-a(20) from Hugo Pfoertner, Jul 31 2003
a(21)-a(25) from Jens Kruse Andersen, May 30 2006
a(26) and beyond from Giovanni Resta, Aug 04 2013

A057624 Initial prime in first sequence of n primes congruent to 1 modulo 4.

Original entry on oeis.org

5, 13, 89, 389, 2593, 11593, 11593, 11593, 11593, 373649, 766261, 3358169, 12204889, 12270077, 12270077, 12270077, 297387757, 297779117, 297779117, 1113443017, 1113443017, 1113443017, 1113443017, 1113443017, 84676452781, 84676452781, 689101181569, 689101181569, 689101181569, 3278744415797, 3278744415797, 3278744415797, 3278744415797
Offset: 1

Views

Author

Robert G. Wilson v, Oct 09 2000

Keywords

Comments

The sequence is infinite, by Shiu's theorem. - Jonathan Sondow, Jun 22 2017

Examples

			a(9) = 11593 because "[t]his number is the first in a sequence of 9 consecutive primes all of the form 4n + 1."
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, A4.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers, Revised Edition, Penguin Books, London, England, 1997, page 163.

Crossrefs

Programs

  • Mathematica
    NextPrime[ n_Integer ] := Module[ {k = n + 1}, While[ ! PrimeQ[ k ], k++ ]; Return[ k ] ]; PrevPrime[ n_Integer ] := Module[ {k = n - 1}, While[ ! PrimeQ[ k ], k-- ]; Return[ k ] ]; p = 0; Do[ a = Table[ -1, {n} ]; k = Max[ 1, p ]; While[ Union[ a ] != {1}, k = NextPrime[ k ]; a = Take[ AppendTo[ a, Mod[ k, 4 ] ], -n ] ]; p = NestList[ PrevPrime, k, n ]; Print[ p[ [ -2 ] ] ]; p = p[ [ -1 ] ], {n, 1, 19} ]

Extensions

More terms from Don Reble, Nov 16 2003
More terms from Jens Kruse Andersen, May 29 2006

A145988 Ending prime: n-th prime in the first occurrence of n consecutive primes of the form 4k + 3.

Original entry on oeis.org

3, 11, 223, 227, 491, 499, 503, 36607, 39703, 183283, 241727, 241739, 241771, 9177607, 9177611, 95949631, 105639463, 341118731, 727335359, 727335379, 1786054619, 1786054631, 22964264759, 54870713999, 79263248759
Offset: 1

Views

Author

Enoch Haga, Oct 26 2008

Keywords

Comments

a(1)=3 is the same as A055624(1) because 3 is a single-digit number.

Examples

			a(2)=11 because this is the 2nd prime in the first run of 2 primes where p == 3 mod 4.
		

References

  • Enoch Haga, Exploring Primes on Your PC and the Internet, 1994-2007, pp. 30-31. ISBN 978-1-885794-24-6

Crossrefs

Programs

  • Mathematica
    Prime[#]&/@Flatten[Table[SequencePosition[If[Mod[#,4]==3,1,0]&/@Prime[ Range[ 615000]],PadRight[{},n,1],1],{n,15}],1][[All,2]] (* The program generates the first 15 terms of the sequence. *) (* Harvey P. Dale, Jun 17 2022 *)
  • PARI
    r=0; c=0; forprime(p=2, 4e9, if(p%4==3, if(c++>r, r=c; print1(p", ")), c=0)) \\ Charles R Greathouse IV, Mar 22 2011
  • UBASIC
    10 'cluster primes 20 C=1 30 input "end #";L 40 for N=3 to L step 2 50 S=int(sqrt(N)) 60 for A=3 to S step 2 70 B=N/A 80 if int(B)*A=N then cancel for:goto 170 90 next A 100 C=C+1 110 E=N/4:E=int(E):R=N-(4*E) 120 if R=1 then print N;:C1=C1+1:T1=T1+1:print T1 130 if R=3 then T1=0 140 if R=3 then print " ";N;:C3=C3+1:T2=T2+1:print T2 150 if R=1 then T2=0 160 if T1>10 or T2>10 then stop 170 next 180 print "Total primes=";C;:print "Type A";C1;"Type B";C3
    

Extensions

Entry rewritten by, and a(14)-a(25) from, Charles R Greathouse IV, Mar 22 2011

A055625 First prime starting a chain of exactly n consecutive primes congruent to 1 modulo 6.

Original entry on oeis.org

7, 31, 151, 3049, 7351, 1741, 19471, 118801, 498259, 148531, 406951, 2513803, 2339041, 89089369, 51662593, 73451737, 232301497, 450988159, 1558562197, 2506152301, 1444257673, 28265029657, 24061965043, 87996684091, 43553959717
Offset: 1

Views

Author

Labos Elemer, Jun 05 2000

Keywords

Comments

The term "exactly" means that before the first and after the last primes of chain, the immediate primes are not congruent to 1 modulo 6.
See A057620 for the variant where "exactly" is replaced by "at least". - M. F. Hasler, Sep 03 2016

Crossrefs

Programs

  • Fortran
    c See link in A085515.
  • Mathematica
    pp = Table[{p = Prime[n], Mod[p, 6]}, {n, 10^6}];
    sp = Split[pp, Mod[#1[[2]], 6] == Mod[#2[[2]], 6]&];
    a[n_] := SelectFirst[sp, Length[#] == n && MatchQ[#, {{_Integer, 1} ..}]& ][[1, 1]];
    Table[an = a[n]; Print[n, " ", an]; an, {n, 1, 13}] (* Jean-François Alcover, Nov 21 2018 *)

Extensions

Corrected and extended by Reiner Martin, May 19 2001
More terms from Hugo Pfoertner, Jul 31 2003
a(20)>2^31, a(21)=1444257673. - Hugo Pfoertner, Jul 31 2003
More terms from Jens Kruse Andersen, May 30 2006
More terms from Herman Jamke (hermanjamke(AT)fastmail.fm), Oct 27 2006

A162866 Initial prime of exactly nine consecutive primes congruent to 3 modulo 4.

Original entry on oeis.org

39607, 278051, 339863, 341827, 402371, 519587, 735211, 919423, 1123219, 1191643, 1263239, 1329763, 1635547, 1648919, 1737863, 1994119, 2191687, 2465227, 2566279, 3025423, 3101743, 3197899, 3306731, 3719467, 4259243, 4466411, 4498883, 4591507, 4680503, 5031863
Offset: 1

Views

Author

Rick L. Shepherd, Jul 15 2009

Keywords

Comments

The table provides all 8949 [=A092661(9)] terms less than 10^9.
If 10 or more consecutive primes are all congruent to 3 modulo 4, none of them is a member of this sequence. - Harvey P. Dale, Oct 23 2011

Crossrefs

Programs

  • Mathematica
    m9Q[l_]:=Module[{ms=Mod[l,4]},First[ms]!=3&&Last[ms]!=3&&Union[ Take[ ms,{2,10}]]=={3}]; Transpose[Select[Partition[Prime[Range[ 320000]], 11,1],m9Q]][[2]] (* Harvey P. Dale, Oct 23 2011 *)

A330361 First occurrence of run of lucky numbers congruent to 3 mod 4 of exactly length n.

Original entry on oeis.org

15, 3, 51, 1563, 211, 1123, 15511, 5487, 37195, 108963, 331527, 1493103, 1103307, 3248367, 46574499, 4814875, 14747343, 222808263, 446500987, 46936231, 228462727, 1003298383, 1705601667
Offset: 1

Views

Author

Amiram Eldar, Dec 12 2019

Keywords

Comments

Calculated using Hugo van der Sanden's Lucky numbers up to 10^9 (private communication).
a(24) > 4*10^9. - Giovanni Resta, May 10 2020

Examples

			a(1) = 15 since 15 is a lucky number congruent to 3 mod 4, following 13 and followed by 21 which are both not congruent to 3 mod 4.
a(2) = 3 since 3 and 7 are 2 consecutive lucky numbers congruent to 3 mod 4, following 1 and followed by 9 which are both not congruent to 3 mod 4.
		

Crossrefs

Extensions

a(22)-a(23) from Giovanni Resta, May 10 2020

A227300 Rising diagonal sums of triangle of Fibonacci polynomials (rows displayed as centered text).

Original entry on oeis.org

1, 2, 2, 3, 7, 11, 16, 28, 48, 77, 126, 211, 349, 573, 947, 1568, 2588, 4271, 7058, 11661, 19256, 31804, 52538, 86779, 143329, 236744, 391046, 645900, 1066850, 1762163, 2910634, 4807590, 7940870, 13116238, 21664568, 35784145, 59105987, 97627533, 161254953, 266350689
Offset: 1

Views

Author

John Molokach, Jul 09 2013

Keywords

Comments

Rising diagonal sums of triangle A011973, taken with rows as centered text.

Examples

			a(1)  = 1;
a(2)  = 1 +  1;
a(3)  = 1 +  1;
a(4)  = 1 +  1 +  1;
a(5)  = 1 +  1 +  3 +  2;
a(6)  = 1 +  1 +  5 +  4;
a(7)  = 1 +  1 +  7 +  6 +  1;
a(8)  = 1 +  1 +  9 +  8 +  6 +  3;
a(9)  = 1 +  1 + 11 + 10 + 15 + 10;
a(10) = 1 +  1 + 13 + 12 + 28 + 21 +  1.
		

Crossrefs

Cf. A011973 (triangle), A000045 (row sums of triangle), A005314 (falling diagonal sums of triangle). Expansion of terms begin with A055624 at a(1) and adds A016813 at a(4), A016754 at a(7), and A100157 at a(10).

Programs

  • Mathematica
    LinearRecurrence[{1, 0, 2, 0, 0, -1}, {1, 2, 2, 3, 7, 11}, 40] (* T. D. Noe, Jul 11 2013 *)
  • PARI
    a(n) = if(n<=1, 1, sum(k=0, floor((n-1)/3), binomial(2*n-2-5*k,k)+binomial(2*n-1-5*k,k)) ); \\ Joerg Arndt, Jul 11 2013

Formula

a(n) = Sum_{k=0..floor((n-1)/3)} (binomial(2*n-2-5*k,k) + binomial(2*n-3-5*k,k)) for n >= 2; a(1)=1. - John Molokach, Jul 11 2013
a(n) = a(n-1) + 2*a(n-3) - a(n-6), starting with {1, 2, 2, 3, 7, 11}. - T. D. Noe, Jul 11 2013
G.f.: x*(1+x-x^3)/(1-x-2*x^3+x^6) - John Molokach, Jul 15 2013
a(n) = Sum_{k=0..floor((2n-1)/3)} binomial(2n-k-2-3*floor(k/2),floor(k/2)). - John Molokach, Jul 29 2013
Showing 1-9 of 9 results.