login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A258578 Primes p such that difference between p and next prime after p is multiple of 6. 2

%I #10 Jun 20 2019 13:23:41

%S 23,31,47,53,61,73,83,131,151,157,167,173,199,211,233,251,257,263,271,

%T 331,353,367,373,383,433,443,467,503,509,523,541,557,563,571,587,593,

%U 601,607,619,647,653,661,677,727,733,751,797,941,947,971,977,991,997

%N Primes p such that difference between p and next prime after p is multiple of 6.

%C A031924 is subsequence: first 12 terms are the same.

%H Charles R Greathouse IV, <a href="/A258578/b258578.txt">Table of n, a(n) for n = 1..10000</a>

%e a(1)=23 because next prime after 23 is 29=23+6,

%e a(13)=199 because next prime after 199 is 211=199+12,

%e a(30)=523 because next prime after 523 is 541=523+18,

%e a(90)=1669 because next term after 1669 is 1693=1669+24,

%e a(199)=4297 because next prime after 4297 is 4327=4297+30.

%t Select[Partition[Prime[Range[200]],2,1],Mod[#[[2]]-#[[1]],6]==0&][[All,1]] (* _Harvey P. Dale_, Jun 20 2019 *)

%o (PARI) lista(nn) = forprime(p=2, nn, if (!((nextprime(p+1) - p) % 6), print1(p, ", "));); \\ _Michel Marcus_, Jun 04 2015

%o (PARI) v=List();p=2; forprime(q=3,1e4,if((q-p)%6==0,listput(v,p));p=q); v \\ _Charles R Greathouse IV_, Jun 04 2015

%Y Cf. A031924, A124582, A130796.

%K nonn

%O 1,1

%A _Zak Seidov_, Jun 04 2015

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 15 06:17 EDT 2024. Contains 374324 sequences. (Running on oeis4.)