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

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

A247816 a(n) is the smallest k such that prime(k+i) = 1 (mod 6) for i = 0, 1,...,n-1.

Original entry on oeis.org

4, 11, 36, 271, 271, 271, 2209, 11199, 13717, 13717, 34369, 172146, 172146, 3094795, 3094795, 4308948, 12762142, 23902561, 72084956, 72084956, 72084956, 1052779161, 1052779161, 1857276773, 1857276773, 19398320447, 57446769091, 57446769091, 57446769091
Offset: 1

Views

Author

Michel Lagneau, Sep 28 2014

Keywords

Comments

Equivalently, "mod 6" can be replaced by "mod 3". See A247967 for the variant "= 5 (mod 6)" and A276414 for runs of primes congruent to each other (mod 3). - M. F. Hasler, Sep 02 2016
The sequence is infinite, by Shiu's theorem. - Jonathan Sondow, Jun 22 2017

Examples

			a(1)= 4 => prime(4) (mod 6)= 1;
a(2)= 11 => prime(11)(mod 6)= 1, prime(12)(mod 6) = 1;
a(3)= 36 => prime(36)(mod 6)= 1, prime(37)(mod 6)= 1, prime(38)(mod 6)= 1.
The resulting primes are:
7;
31, 37;
151, 157, 163;
1741, 1747, 1753, 1759;
1741, 1747, 1753, 1759, 1777;
1741, 1747, 1753, 1759, 1777, 1783;
19471, 19477, 19483, 19489, 19501, 19507, 19531;
... - _Michel Marcus_, Sep 29 2014
		

Crossrefs

Programs

  • Maple
    for n from 1 to 22 do :
    ii:=0:
       for k from 3 to 10^5 while (ii=0)do :
         s:=0:
          for i from 0 to n-1 do:
            r:=irem(ithprime(k+i),6):
            if r = 1
            then
            s:=s+1:
            else
            fi:
          od:
           if s=n and ii=0
           then
           printf ( "%d %d \n",n,k):ii:=1:
           else
           fi:
        od:
    od:
  • Mathematica
    With[{m6=If[Mod[#,6]==1,1,0]&/@Prime[Range[5*10^6]]},Flatten[Table[SequencePosition[ m6,PadRight[{},n,1],1],{n,16}],1]][[;;,1]] (* Harvey P. Dale, May 07 2023 *)
  • PARI
    m=c=i=0;forprime(p=1,, i++;p%6!=1&&(!c||!c=0)&&next; c++>m||next; print1(1+i-m=c,",")) \\ M. F. Hasler, Sep 02 2016

Formula

a(n) = primepi(A057620(n)). - Michel Marcus, Sep 30 2014

Extensions

a(12)-a(21) from A057620 by Michel Marcus, Oct 03 2014
a(22)-a(29) from Giovanni Resta, Oct 03 2018

A057621 Initial prime in first sequence of n primes congruent to 2 modulo 3.

Original entry on oeis.org

2, 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
Offset: 1

Views

Author

Robert G. Wilson v, Oct 09 2000

Keywords

Comments

Same as A057622 except for a(1). - Jens Kruse Andersen, May 30 2006

Examples

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

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 ] != {2}, k = NextPrime[ k ]; a = Take[ AppendTo[ a, Mod[ k, 3 ] ], -n ] ]; p = NestList[ PrevPrime, k, n ]; Print[ p[ [ -2 ] ] ]; p = p[ [ -1 ] ], {n, 1, 18} ]

Formula

a(n) = A000040(A247967(n)) for all n > 1. - M. F. Hasler, Sep 03 2016

Extensions

More terms from Jens Kruse Andersen, May 30 2006

A276414 Index of the first prime which starts a run of n consecutive primes all congruent to each other mod 3 (or mod 6).

Original entry on oeis.org

1, 9, 15, 54, 271, 271, 2209, 11199, 13717, 13717, 34369, 136456, 172146, 1254203, 1254203, 4308948, 12762142, 21357253, 25813464, 25813464, 39500857, 39500857, 947438659, 947438659, 947438659, 5703167678, 5703167678, 16976360924, 57446769091, 57446769091, 57446769091
Offset: 1

Views

Author

M. F. Hasler, Sep 02 2016

Keywords

Comments

First term of runs of increasing length of consecutive integers in A270190. - M. F. Hasler, Sep 03 2016

Examples

			prime(9) = 23 starts the first run of 2 consecutive primes, {23, 29}, which are congruent to each other (mod 6). Therefore a(2) = 9.
prime(15) = 47 starts the first run of 3 consecutive primes, {47, 53, 59}, which are congruent to each other (mod 6). Therefore a(3) = 15.
prime(54) = 251 starts the first run of 4 consecutive primes, {251, 257, 263, 269}, which are congruent to each other (mod 6). Therefore a(4) = 54.
prime(271) = 1741 starts the first run of 5 consecutive primes, {1741, 1747, 1753, 1759, 1777}, which are congruent to each other (mod 6). Therefore a(5) = 271. This is the first case where the primes are of the form 3k+1.
prime(271) = 1741 also starts the first run of 6 consecutive primes, {1741, 1747, 1753, 1759, 1777, 1783}, which are all congruent to each other (mod 6). Therefore a(6) = 271, too.
		

Crossrefs

Subsequence of A270190 (after discarding 1 and duplicates of other terms).

Programs

  • PARI
    m=c=i=o=0;print1(1);forprime(p=1,,i++;(o-o=p)%3&&(!c||!c=0)&&next;c++>m||next;print1(",",i-m=c))

Formula

a(n) = A000720(A054679(n)).

Extensions

a(30)-a(31) from and name clarified by Jinyuan Wang, Feb 24 2020

A247969 a(n) is the smallest k such that prime(k+i) (mod 6) takes successively the values 1,5,1,5,... for i = 0, 1,...,n-1 ending with 1 or 5.

Original entry on oeis.org

4, 4, 4, 4, 4, 4, 25, 25, 59, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 280230, 280230, 981960, 981960, 981960, 4505195, 4505195, 7438440, 15658002, 15658002, 15658002, 15658002, 2628111621, 4671618380, 4671618380, 5803722576, 5803722576, 5803722576
Offset: 1

Views

Author

Michel Lagneau, Sep 28 2014

Keywords

Examples

			a(1)= 4 => prime(4) (mod 6)= 1, and not for k = 1, 2, 3.
a(2)= 4 => prime(4) (mod 6)= 1, prime(5) (mod 6) = 5;
a(3)= 4 => prime(4) (mod 6)= 1, prime(5) (mod 6)= 5, prime(6) (mod 6)= 1.
The corresponding primes are for
n= 6: 7, 11, 13, 17, 19, 23;
n= 8: 97, 101, 103, 107, 109, 113, 127, 131;
n= 9: 277, 281, 283, 293, 307, 311, 313, 317, 331;
n= 20: 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941. - _Michel Marcus_, Sep 29 2014
		

Crossrefs

Programs

  • Maple
    for n from 1 to 21 do :
    ii:=0:
       for k from 3 to 10^5 while (ii=0)do :
         s:=0:
          for i from 0 to n-1 do:
            r:=irem(ithprime(k+i),6):
            if r = irem(5^i,6)
            then
            s:=s+1:
            else
            fi:
          od:
           if s=n and ii=0
           then
           printf ( "%d %d \n",n,k):ii:=1:
           else
           fi:
        od:
    od:
  • PARI
    a(n) = {k = 1; ok = 0; while (! ok, m = 1; nb = 0; for (i=0, n-1, if ((prime(k+i) % 6) == m, nb++, break); m = 5*m % 6;); if (nb == n, ok = 1, k++);); k;} \\ Michel Marcus, Sep 29 2014
    
  • PARI
    See Links section.

Extensions

More terms from Rémy Sigrist, Oct 18 2020

A247970 a(n) is the smallest k such that prime(k+i) (mod 6) takes successively the values 5,1,5,1... for i = 0, 1,...,n-1 ending with 1 or 5.

Original entry on oeis.org

3, 3, 3, 3, 3, 3, 3, 24, 24, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140
Offset: 1

Views

Author

Michel Lagneau, Sep 28 2014

Keywords

Comments

If a(22) exists, k > 10^5.

Examples

			a(1)= 3 => prime(3) (mod 6)= 5;
a(2)= 3 => prime(3) (mod 6)= 5, prime(4) (mod 6) = 1;
a(3)= 3 => prime(3) (mod 6)= 5, prime(4) (mod 6)= 1, prime(5) (mod 6)= 5.
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    for n from 1 to 35 do :
    ii:=0:
       for k from 3 to 10^5 while (ii=0)do :
         s:=0:
          for i from 0 to n-1 do:
            r:=irem(ithprime(k+i),6):
            if r = irem(5^(i+1),6)
            then
            s:=s+1:
            else
            fi:
          od:
           if s=n and ii=0
           then
           printf ( "%d %d \n",n,k):ii:=1:
           else
           fi:
        od:
    od:
Showing 1-7 of 7 results.