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.

A330560 a(n) = number of primes p <= prime(n) with Delta(p) == 2 (mod 4), where Delta(p) = nextprime(p) - p.

This page as a plain text file.
%I A330560 #25 Feb 06 2024 08:12:59
%S A330560 0,1,2,2,3,3,4,4,5,6,7,7,8,8,9,10,11,12,12,13,14,14,15,15,15,16,16,17,
%T A330560 17,18,18,19,20,21,22,23,24,24,25,26,27,28,29,29,30,30,30,30,31,31,32,
%U A330560 33,34,35,36,37,38,39,39,40,41,42,42,43,43,44,45,46,47,47,48,48,49,50,50,51,51,51,51,52,53,54
%N A330560 a(n) = number of primes p <= prime(n) with Delta(p) == 2 (mod 4), where Delta(p) = nextprime(p) - p.
%H A330560 Robert Israel, <a href="/A330560/b330560.txt">Table of n, a(n) for n = 1..10000</a>
%p A330560 N:= 200: # for a(1)..a(N)
%p A330560 P:= [seq(ithprime(i), i=1..N+1)]:
%p A330560 Delta:= P[2..-1]-P[1..-2] mod 4:
%p A330560 R:= map(charfcn[2], Delta):
%p A330560 ListTools:-PartialSums(R); # _Robert Israel_, Dec 31 2019
%t A330560 Accumulate[Map[Boole[Mod[#, 4] == 2]&, Differences[Prime[Range[100]]]]] (* _Paolo Xausa_, Feb 05 2024 *)
%o A330560 (Magma) [#[p:p in PrimesInInterval(1,NthPrime(n))| (NextPrime(p)-p) mod 4 eq 2]:n in [1..90]]; // _Marius A. Burtea_, Dec 31 2019
%Y A330560 Sequences related to the differences between successive primes: A001223 (Delta(p)), A028334, A080378, A104120, A330556, A330557, A330558, A330559, A330561.
%K A330560 nonn
%O A330560 1,3
%A A330560 _N. J. A. Sloane_, Dec 30 2019