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!)
A330558 a(n) = number of primes p <= 2*n+1 with Delta(p) == 0 mod 4, where Delta(p) = nextprime(p) - p. 5

%I #14 Sep 08 2022 08:46:24

%S 0,0,0,1,1,1,2,2,2,3,3,3,3,3,3,3,3,3,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,6,

%T 6,6,6,6,6,7,7,7,7,7,8,8,8,8,9,9,9,10,10,10,11,11,11,11,11,11,11,11,

%U 11,12,12,12,12,12,12,12,12,12,12,12,12,12,12

%N a(n) = number of primes p <= 2*n+1 with Delta(p) == 0 mod 4, where Delta(p) = nextprime(p) - p.

%H Robert Israel, <a href="/A330558/b330558.txt">Table of n, a(n) for n = 0..10000</a>

%p N:= 100: # for a(0)..a(N)

%p P:= select(isprime, [seq(i,i=3..nextprime(2*N+1),2)]):

%p Delta:= P[2..-1]-P[1..-2] mod 4:

%p A:= Array(0..N): t:= 0: j:= 1:

%p for n from 0 to N do

%p m:= 2*n+1:

%p if m = P[j] then t:= t + charfcn[0](Delta[j]); j:= j+1 fi;

%p A[n]:= t

%p od:

%p convert(A,list); # _Robert Israel_, Dec 31 2019

%o (Magma) [#[p:p in PrimesInInterval(1,2*n+1)| (NextPrime(p)-p) mod 4 eq 0]:n in [0..80]]; // _Marius A. Burtea_, Dec 31 2019

%Y Sequences related to the differences between successive primes: A001223 (Delta(p)), A028334, A080378, A104120, A330556-A330561.

%K nonn

%O 0,7

%A _N. J. A. Sloane_, Dec 29 2019

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 April 23 18:16 EDT 2024. Contains 371916 sequences. (Running on oeis4.)