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.

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

This page as a plain text file.
%I A090785 #8 May 16 2021 08:04:01
%S A090785 5,16,24,48,240,288,360,432,648,672,720,840,888,960,1080,1128,1248,
%T A090785 1320,1392,1488,1560,1608,1680,1728,1800,1920,2040,2088,2112,2232,
%U A090785 2280,2400,2520,2568,2640,2808,2832,2880,3120,3240,3312,3360,3432,3672,3912,4080
%N A090785 Numbers that can be expressed as the difference of the squares of consecutive primes in just one way.
%e A090785 5 = 3^2 - 2^2.
%o A090785 (Python)
%o A090785 from sympy import primerange
%o A090785 from collections import Counter
%o A090785 def aupto(limit):
%o A090785   sqps = [p*p for p in primerange(1, limit//2+1)]
%o A090785   ways = Counter(sqps[i+1]-sqps[i] for i in range(len(sqps)-1))
%o A090785   return sorted(k for k in ways if k <= limit and ways[k] == 1)
%o A090785 print(aupto(4080)) # _Michael S. Branicky_, May 16 2021
%Y A090785 Cf. A078667, A090781, A090783, A090784, A091878.
%K A090785 nonn
%O A090785 1,1
%A A090785 _Ray G. Opao_, Feb 08 2004
%E A090785 More terms from _Ray Chandler_, Feb 11 2004