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!)
A090785 Numbers that can be expressed as the difference of the squares of consecutive primes in just one way. 5

%I #8 May 16 2021 08:04:01

%S 5,16,24,48,240,288,360,432,648,672,720,840,888,960,1080,1128,1248,

%T 1320,1392,1488,1560,1608,1680,1728,1800,1920,2040,2088,2112,2232,

%U 2280,2400,2520,2568,2640,2808,2832,2880,3120,3240,3312,3360,3432,3672,3912,4080

%N Numbers that can be expressed as the difference of the squares of consecutive primes in just one way.

%e 5 = 3^2 - 2^2.

%o (Python)

%o from sympy import primerange

%o from collections import Counter

%o def aupto(limit):

%o sqps = [p*p for p in primerange(1, limit//2+1)]

%o ways = Counter(sqps[i+1]-sqps[i] for i in range(len(sqps)-1))

%o return sorted(k for k in ways if k <= limit and ways[k] == 1)

%o print(aupto(4080)) # _Michael S. Branicky_, May 16 2021

%Y Cf. A078667, A090781, A090783, A090784, A091878.

%K nonn

%O 1,1

%A _Ray G. Opao_, Feb 08 2004

%E More terms from _Ray Chandler_, Feb 11 2004

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 May 12 16:02 EDT 2024. Contains 372492 sequences. (Running on oeis4.)