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.

Original entry on oeis.org

5, 16, 24, 48, 240, 288, 360, 432, 648, 672, 720, 840, 888, 960, 1080, 1128, 1248, 1320, 1392, 1488, 1560, 1608, 1680, 1728, 1800, 1920, 2040, 2088, 2112, 2232, 2280, 2400, 2520, 2568, 2640, 2808, 2832, 2880, 3120, 3240, 3312, 3360, 3432, 3672, 3912, 4080
Offset: 1

Views

Author

Ray G. Opao, Feb 08 2004

Keywords

Examples

			5 = 3^2 - 2^2.
		

Crossrefs

Programs

  • Python
    from sympy import primerange
    from collections import Counter
    def aupto(limit):
      sqps = [p*p for p in primerange(1, limit//2+1)]
      ways = Counter(sqps[i+1]-sqps[i] for i in range(len(sqps)-1))
      return sorted(k for k in ways if k <= limit and ways[k] == 1)
    print(aupto(4080)) # Michael S. Branicky, May 16 2021

Extensions

More terms from Ray Chandler, Feb 11 2004