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

A098058 Prime(n) such that 4 does not divide the difference between prime(n) and prime(n+1).

Original entry on oeis.org

2, 3, 5, 11, 17, 23, 29, 31, 41, 47, 53, 59, 61, 71, 73, 83, 101, 107, 113, 131, 137, 139, 149, 151, 157, 167, 173, 179, 181, 191, 197, 227, 233, 239, 241, 251, 257, 263, 269, 271, 281, 283, 293, 311, 317, 331, 337, 347, 353, 367, 373, 383, 409, 419, 421, 431
Offset: 1

Views

Author

Cino Hilliard, Sep 11 2004

Keywords

Comments

First differences are also not divisible by 4. - Zak Seidov, Jun 23 2015
Starting with 3, group the primes into runs of consecutive primes either all == 1 (mod 4) or all == 3 (mod 4). Only the last prime of each run appears in this sequence. Since the runs alternate == 1 (mod 4) and == 3 (mod 4), so do the members of this sequence. - Franklin T. Adams-Watters, Jun 23 2015
The sequence is infinite, by Dirichlet's theorem on primes in arithmetic progressions. The sequence contains arbitrarily long gaps, by Daniel Shiu's theorem on strings of congruent primes (see A057619 and A057622). Conjecture: The sequence contains arbitrarily long strings of consecutive primes (see A289118). - Jonathan Sondow, Jun 25 2017

Examples

			Prime(2) = 3, prime(3) = 5. 4 does not divide 5-3 so prime(2)=3 is in the sequence.
Runs: (3), (5), (7,11), (17), (19, 23), (29), (31), (37,41), (43,47), (53), ... The sequence is 2 followed by the last member of each run. Differences within each run are always divisible by 4.
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, A4.

Crossrefs

Programs

  • Mathematica
    Prime[Select[Range[100], Mod[Prime[ # + 1] - Prime[ # ], 4] !=0 &]] (* Ray Chandler, Oct 09 2006 *)
  • PARI
    f(n) = for(x=1,n,z=(prime(x+1)-prime(x));if(z%4,print1(prime(x)",")))
    
  • PARI
    alist(n)=my(r=vector(n),p=2,np,k=0);while(kFranklin T. Adams-Watters, Jun 23 2015
    
  • PARI
    list(lim)=my(v=List(),p=2); forprime(q=3,nextprime(lim\1+1), if((q-p)%4, listput(v,p)); p=q); Vec(v) \\ Charles R Greathouse IV, Jun 24 2015

Extensions

Edited by Ray Chandler, Oct 26 2006

A057622 Initial prime in first sequence of n consecutive primes congruent to 5 modulo 6.

Original entry on oeis.org

5, 23, 47, 251, 1889, 7793, 43451, 243161, 726893, 759821, 1820111, 1820111, 10141499, 19725473, 19725473, 136209239, 400414121, 400414121, 489144599, 489144599, 766319189, 766319189, 21549657539, 21549657539, 21549657539, 140432294381, 140432294381, 437339303279, 1871100711071, 3258583681877
Offset: 1

Views

Author

Robert G. Wilson v, Oct 09 2000

Keywords

Comments

Same as A057621 except for a(1). See A057620 for primes congruent to 1 (mod 6). See A055626 for the variant "exactly n", which is an upper bound, cf. formula. - M. F. Hasler, Sep 03 2016
The sequence is infinite, by Shiu's theorem. - Jonathan Sondow, Jun 22 2017

Examples

			a(12) = 1820111 because this number is the first in a sequence of 12 consecutive primes all of the form 6n + 5.
		

References

  • R. K. Guy, "Unsolved Problems in Number Theory", A4

Crossrefs

Programs

  • Mathematica
    p = 0; Do[a = Table[-1, {n}]; k = Max[1, p]; While[Union@ a != {5}, k = NextPrime@ k; a = Take[AppendTo[a, Mod[k, 6]], -n]]; p = NestList[NextPrime[#, -1] &, k, n]; Print[p[[-2]]]; p = p[[-1]], {n, 18}] (* Robert G. Wilson v, updated by Michael De Vlieger, Sep 03 2016 *)
    Table[k = 1; While[Total@ Boole@ Map[Mod[#, 6] == 5 &, NestList[NextPrime, Prime@ k, n - 1]] != n, k++]; Prime@ k, {n, 12}] (* Michael De Vlieger, Sep 03 2016 *)

Formula

a(n) = A000040(A247967(n)). a(n) = min { A055626(k); k >= n }. - M. F. Hasler, Sep 03 2016

Extensions

More terms from Don Reble, Nov 16 2003
More terms from Jens Kruse Andersen, May 30 2006
Three lines of data (derived from J.K.Andersen's web page) completed by M. F. Hasler, Sep 02 2016

A057620 Initial prime in first sequence of n consecutive primes congruent to 1 modulo 6.

Original entry on oeis.org

7, 31, 151, 1741, 1741, 1741, 19471, 118801, 148531, 148531, 406951, 2339041, 2339041, 51662593, 51662593, 73451737, 232301497, 450988159, 1444257673, 1444257673, 1444257673, 24061965043, 24061965043, 43553959717, 43553959717
Offset: 1

Views

Author

Robert G. Wilson v, Oct 09 2000

Keywords

Comments

See A055626 for the variant "exactly n". See A247967 for the indices of these primes. See A057620, A057621 for variants "congruent to 5 (mod 6)", resp. "(mod 3)". - M. F. Hasler, Sep 03 2016
The sequence is infinite, by Shiu's theorem. - Jonathan Sondow, Jun 22 2017

Examples

			a(6) = 1741 because this number is the first in a sequence of 6 consecutive primes all of the form 3n + 1.
		

References

  • R. K. Guy, "Unsolved Problems in Number Theory", A4

Crossrefs

Programs

  • Mathematica
    p = 0; Do[a = Table[-1, {n}]; k = Max[1, p]; While[Union[a] != {1}, k = NextPrime[k]; a = Take[AppendTo[a, Mod[k, 3]], -n]]; p = NestList[NextPrime[#, -1] &, k, n]; Print[p[[-2]]]; p = p[[-1]], {n, 1, 18}] (* Robert G. Wilson v, updated by Michael De Vlieger, Sep 03 2016 *)
    Table[k = 1; While[Total@ Boole@ Map[Mod[#, 6] == 1 &, NestList[NextPrime, Prime@ k, n - 1]] != n, k++]; Prime@ k, {n, 12}] (* Michael De Vlieger, Sep 03 2016 *)
  • PARI
    m=c=o=0; forprime(p=1,, p%6 != 1 && (!c||!c=0) && next; c||o=p; c++>m||next; m++; print1(", ",o)) \\ M. F. Hasler, Sep 03 2016

Formula

a(n) <= A055625(n). - Zak Seidov, Aug 29 2016
a(n) = A000040(A247967(n)). a(n) = min { A055625(k); k >= n }. - M. F. Hasler, Sep 03 2016

Extensions

More terms from Don Reble, Nov 16 2003
More terms from Jens Kruse Andersen, May 30 2006
Definition clarified by Zak Seidov, Jun 19 2017

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

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 *)
Showing 1-5 of 5 results.