login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A090781 Numbers that can be expressed as the difference of the squares of primes in just one distinct way. 27
5, 16, 21, 24, 40, 45, 48, 96, 112, 117, 144, 160, 165, 192, 264, 280, 285, 288, 336, 352, 357, 504, 520, 525, 648, 816, 832, 837, 936, 952, 957, 1152, 1344, 1360, 1365, 1368, 1440, 1656, 1672, 1677, 1752, 1824, 1840, 1845, 1872, 1968, 2184, 2200, 2205, 2328 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

T. D. Noe, Table of n, a(n) for n=1..908

EXAMPLE

5 = 3^2 - 2^2.

MATHEMATICA

With[{nn=100}, Take[Sort[Transpose[Select[Tally[Last[#]-First[#]&/@ Subsets[ Prime[Range[nn]]^2, {2}]], Last[#]==1&]][[1]]], nn]] (* Harvey P. Dale, Apr 05 2014 *)

PROG

(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(b-a for i, a in enumerate(sqps) for b in sqps[i+1:])

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

print(aupto(2328)) # Michael S. Branicky, May 16 2021

CROSSREFS

Cf. A078667, A090788, A090782, A090785.

Sequence in context: A204920 A168469 A124865 * A191264 A077469 A022140

Adjacent sequences:  A090778 A090779 A090780 * A090782 A090783 A090784

KEYWORD

nonn

AUTHOR

Ray Chandler, Feb 14 2004

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 16 04:56 EDT 2021. Contains 345056 sequences. (Running on oeis4.)