login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A100073 Number of representations of n as the difference of two positive squares. 0
0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 2, 1, 1, 0, 1, 1, 2, 0, 1, 2, 1, 0, 2, 1, 1, 0, 1, 2, 2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 1, 1, 3, 0, 1, 3, 1, 0, 2, 1, 1, 0, 2, 2, 2, 0, 1, 2, 1, 0, 3, 2, 2, 0, 1, 1, 2, 0, 1, 3, 1, 0, 3, 1, 2, 0, 1, 3, 2, 0, 1, 2, 2, 0, 2, 2, 1, 0, 2, 1, 2, 0, 2, 4, 1, 0, 3, 1, 1, 0, 1, 2, 4 (list; graph; refs; listen; history; internal format)
OFFSET

1,15

COMMENTS

Note that for odd n, a(n) = 1 iff n is a prime, or a prime squared.

FORMULA

a(n) = A056924(n) for odd n, a(n) = A056924(n/4) if 4|n, otherwise a(n) = 0.

EXAMPLE

a(15) = 2 because 15 = 16-1 = 64-49.

MATHEMATICA

nn=150; a=Table[0, {nn}]; Do[y=x-1; While[d=x^2-y^2; d<=nn&&y>0, a[[d]]++; y-- ], {x, 1+nn/2}]; a

CROSSREFS

Cf. A056924 (number of divisors of n that are less than sqrt(n)), A016825 (numbers not the difference of two squares), A034178 (number of representations of n as the difference of two squares).

Sequence in context: A026920 A060763 A131576 * A075685 A037906 A120936

Adjacent sequences:  A100070 A100071 A100072 * A100074 A100075 A100076

KEYWORD

easy,nonn

AUTHOR

T. D. Noe (noe(AT)sspectra.com), Nov 02 2004

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 16 20:54 EST 2012. Contains 205966 sequences.