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!)
A256452 Number of integer solutions to n^2 = x^2 + y^2 with x>0, y>=0. 0
1, 1, 1, 1, 3, 1, 1, 1, 1, 3, 1, 1, 3, 1, 3, 1, 3, 1, 1, 3, 1, 1, 1, 1, 5, 3, 1, 1, 3, 3, 1, 1, 1, 3, 3, 1, 3, 1, 3, 3, 3, 1, 1, 1, 3, 1, 1, 1, 1, 5, 3, 3, 3, 1, 3, 1, 1, 3, 1, 3, 3, 1, 1, 1, 9, 1, 1, 3, 1, 3, 1, 1, 3, 3, 5, 1, 1, 3, 1, 3, 1, 3, 1, 1, 9, 1, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,5

LINKS

Table of n, a(n) for n=1..87.

FORMULA

Multiplicative with a(p^e) = 2*e + 1 if p == 1 (mod 4), otherwise a(p^e) = 1.

a(n) = 1 + 2*A046080(n) if n>0.

MATHEMATICA

a[ n_] := Sum[ Mod[ Length@Divisors[n^2 - k^2], 2], {k, n}];

a[ n_] := Length @ FindInstance[ n^2 == x^2 + y^2 && x > 0 && y >= 0, {x, y}, Integers, 10^9]; (* Michael Somos, Aug 15 2016 *)

PROG

(PARI) {a(n) = sum(k=1, n, issquare(n^2 - k^2))};

CROSSREFS

Cf. A046080.

Sequence in context: A078530 A291568 A212181 * A330827 A010276 A214268

Adjacent sequences:  A256449 A256450 A256451 * A256453 A256454 A256455

KEYWORD

nonn,mult

AUTHOR

Michael Somos, Mar 29 2015

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 July 10 15:38 EDT 2020. Contains 335576 sequences. (Running on oeis4.)