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.

A078667 Integers that occur more than once as the difference of the squares of two consecutive primes.

This page as a plain text file.
%I A078667 #27 Aug 22 2025 20:22:16
%S A078667 72,120,168,312,408,552,600,768,792,912,1032,1848,2472,3048,3192,3288,
%T A078667 3528,3720,4008,4920,5160,5208,5808,5928,6072,6480,6792,6840,6888,
%U A078667 7080,7152,7248,7512,7728,7800,8520,8760,9072,11400,11880,11928,12792,13200,13320
%N A078667 Integers that occur more than once as the difference of the squares of two consecutive primes.
%C A078667 1848 is the first integer that occurs exactly three times. The next few are 6888, 14280, 16008, 19152. 4920 is the first integer that occurs exactly four times. See A069482 for more details. - _Richard R. Forberg_, Feb 06 2015
%H A078667 Robert Israel, <a href="/A078667/b078667.txt">Table of n, a(n) for n = 1..10000</a>
%e A078667 120 = 31^2 - 29^2 = 17^2 - 13^2.
%p A078667 N:= 20000: # for terms <= N
%p A078667 V:= Vector(N):
%p A078667 p:= 3:
%p A078667 while 4*(p-1) <= N do
%p A078667   q:= p; p:= nextprime(p);
%p A078667   v:= p^2 - q^2;
%p A078667   if v > N then next fi;
%p A078667   V[v]:= V[v]+1
%p A078667 od:
%p A078667 select(v -> V[v] > 1, 2*[$1..N/2]); # _Robert Israel_, Aug 22 2025
%t A078667 Sort@ DeleteDuplicates@ Flatten@ Select[Gather[NextPrime[#]^2 - #^2 & /@ Prime@ Range@ 1200], Length@ # > 1 &] (* _Michael De Vlieger_, Mar 18 2015 *)
%t A078667 Select[Tally[Differences[Prime[Range[1000]]^2]],#[[2]]>1&][[;;,1]]//Sort (* _Harvey P. Dale_, Nov 16 2023 *)
%o A078667 (PARI) pv(v)=vecsort(vecextract(v,concat("1..",vc-1))) op=2; v=vector(5000); vc=1; forprime (p=3,5000,v[vc]=p^2-op^2; vc++; op=p) v=pv(v) for (i=2,length(v), if (v[i]==v[i-1],print1(v[i]",")))
%Y A078667 Cf. A090783, A090784, A090785, A091878.
%K A078667 nonn,changed
%O A078667 1,1
%A A078667 _Jon Perry_, Dec 15 2002
%E A078667 Duplicate terms removed, as suggested by _Richard R. Forberg_, by _Jon E. Schoenfield_, Mar 15 2015