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.

A090783 a(n) can be expressed as the difference of the squares of consecutive primes in just three distinct ways.

This page as a plain text file.
%I A090783 #15 Aug 15 2018 22:25:47
%S A090783 1848,6888,14280,16008,19152,36120,112728,116832,129480,139080,176520,
%T A090783 190632,190968,199752,216840,236208,252120,274848,303960,314160,
%U A090783 340368,363720,435792,458280,503160,513240,686160,688680,698880,712680,721560
%N A090783 a(n) can be expressed as the difference of the squares of consecutive primes in just three distinct ways.
%H A090783 Giovanni Resta, <a href="/A090783/b090783.txt">Table of n, a(n) for n = 1..10000</a> (first 3091 terms from Robert Israel)
%e A090783 1848 = 463^2 - 461^2 = 233^2 - 229^2 = 157^2 - 151^2.
%p A090783 N:= 10^6: # to get all terms <= N
%p A090783 V:= Vector(N/4):
%p A090783 p:= 3:
%p A090783 while p < N/2 do
%p A090783   q:= p;
%p A090783   p:= nextprime(p);
%p A090783   r:= (p^2-q^2)/4;
%p A090783   if r <= N/4 then
%p A090783     V[r]:= V[r]+1
%p A090783   fi
%p A090783 od:
%p A090783 map(`*`,select(t -> V[t]=3, [$1..N/4]),4); # _Robert Israel_, Aug 13 2018
%o A090783 (PARI) is(n) = my(i=0, v=[]); forprime(p=5, n, v=[precprime(p-1), p]; if(v[2]^2-v[1]^2==n, i++)); i==3 \\ _Felix Fröhlich_, Aug 13 2018
%Y A090783 Cf. A078667, A090784, A090785, A091878.
%K A090783 nonn
%O A090783 1,1
%A A090783 _Ray G. Opao_, Feb 08 2004
%E A090783 More terms from _Ray Chandler_, Feb 11 2004