|
|
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?
|
|
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];
|
|
PROG
|
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|