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.

This page as a plain text file.
%I A247969 #15 Oct 18 2020 02:49:35
%S A247969 4,4,4,4,4,4,25,25,59,141,141,141,141,141,141,141,141,141,141,141,
%T A247969 280230,280230,981960,981960,981960,4505195,4505195,7438440,15658002,
%U A247969 15658002,15658002,15658002,2628111621,4671618380,4671618380,5803722576,5803722576,5803722576
%N 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.
%H A247969 Rémy Sigrist, <a href="/A247969/a247969.gp.txt">PARI program for A247969</a>
%e A247969 a(1)= 4 => prime(4) (mod 6)= 1, and not for k = 1, 2, 3.
%e A247969 a(2)= 4 => prime(4) (mod 6)= 1, prime(5) (mod 6) = 5;
%e A247969 a(3)= 4 => prime(4) (mod 6)= 1, prime(5) (mod 6)= 5, prime(6) (mod 6)= 1.
%e A247969 The corresponding primes are for
%e A247969 n= 6: 7, 11, 13, 17, 19, 23;
%e A247969 n= 8: 97, 101, 103, 107, 109, 113, 127, 131;
%e A247969 n= 9: 277, 281, 283, 293, 307, 311, 313, 317, 331;
%e A247969 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
%p A247969 for n from 1 to 21 do :
%p A247969 ii:=0:
%p A247969    for k from 3 to 10^5 while (ii=0)do :
%p A247969      s:=0:
%p A247969       for i from 0 to n-1 do:
%p A247969         r:=irem(ithprime(k+i),6):
%p A247969         if r = irem(5^i,6)
%p A247969         then
%p A247969         s:=s+1:
%p A247969         else
%p A247969         fi:
%p A247969       od:
%p A247969        if s=n and ii=0
%p A247969        then
%p A247969        printf ( "%d %d \n",n,k):ii:=1:
%p A247969        else
%p A247969        fi:
%p A247969     od:
%p A247969 od:
%o A247969 (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
%o A247969 (PARI) See Links section.
%Y A247969 Cf. A000040, A247816, A247967.
%K A247969 nonn
%O A247969 1,1
%A A247969 _Michel Lagneau_, Sep 28 2014
%E A247969 More terms from _Rémy Sigrist_, Oct 18 2020