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.

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