login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A237626 Sum of a^2 + b^2 for all nonnegative integers a,b such that b^2-a^2 = 4n. 2
4, 10, 20, 50, 52, 100, 100, 170, 200, 260, 244, 420, 340, 500, 520, 714, 580, 910, 724, 1092, 1000, 1220, 1060, 1700, 1352, 1700, 1640, 2100, 1684, 2600, 1924, 2730, 2440, 2900, 2600, 3894, 2740, 3620, 3400, 4420, 3364, 5000, 3700, 5124, 4732, 5300, 4420, 6820, 5000 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
In the first 50 entries, the final digit is either 0, 2, or 4. Does 6 or 8 ever occur as the last digit?
a(121) = 29768, a(605) = 767676. - Alois P. Heinz, Apr 24 2014
LINKS
FORMULA
For each pair of divisors d and d' of 4n with d*d'=4n and d<=d' find a and b satisfying b-a=d and b+a=d' and compute a^2+b^2. Add all of the results together.
EXAMPLE
When n=12, we get 4*12=48 and then 48 = 13^2-11^2 = 8^2-4^2 = 7^2-1^2. So a(12) = 1^2+7^2+4^2+8^2+11^2+13^2 = 420.
MATHEMATICA
a[n_] := Module[{a, b}, a^2 + b^2 /. {ToRules[Reduce[0 <= a < b && b^2 - a^2 == 4n, {a, b}, Integers]]} // Total];
a /@ Range[1, 50] (* Jean-François Alcover, Oct 06 2019 *)
PROG
(PARI) a(n)=my(b); sum(a=0, n-1, if(issquare(a^2+4*n, &b), a^2+b^2)) \\ Charles R Greathouse IV, Apr 22 2014
CROSSREFS
Sequence in context: A048019 A189586 A019498 * A020149 A056412 A032275
KEYWORD
nonn
AUTHOR
J. M. Bergot, Apr 22 2014
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 14 12:31 EDT 2024. Contains 375921 sequences. (Running on oeis4.)