The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A241657 The sum of a^2 + b^2 for all nonnegative integers a,b such that b^2 - a^2 = 2*n+1. 0
1, 5, 13, 25, 50, 61, 85, 130, 145, 181, 250, 265, 338, 410, 421, 481, 610, 650, 685, 850, 841, 925, 1183, 1105, 1250, 1450, 1405, 1586, 1810, 1741, 1861, 2275, 2210, 2245, 2650, 2521, 2665, 3255, 3050, 3121, 3731, 3445, 3770, 4210, 3961, 4250, 4810 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
A sample of 54 terms found none with last digit 2,4,7, or 9, and both ending digit 0 and 5 had 17; 15 had final digit 1.
The square of 29 = a(20); a(47)-a(48)=1, probably the only time this will occur.
Eleven primes all ending in 1 were found.
LINKS
FORMULA
For each pair of divisors d and d' of 2*n+1 with d*d'=2*n+1 and d<=d', find a and b to satisfy b-a=d and b+a=d', then compute a^2 + b^2. Find the sum of all these results.
If 2*n+1 is not a square, a(n)=sum[d(2*n+1)^2 {d(2*n+1) a divisor of 2*n+1}].
If 2*n+1 is a square, a(n)=(sum[d(2*n+1)^2 {d(2*n+1) a divisor of 2*n+1}] +
2*n+1)/2.
EXAMPLE
For n=31, 2*31+1=63=3^2*7, with divisors 1,3,7,9,21,63.
Grouping in pairs 1*63=(b-a)*(b+a) gives a=31 and b=32; 3*21=(b-a)*(b+a) gives a=9 and b=12; 7*9=(b-a)*(b+a) gives a=1 and b=8.
The sum 1^2 + 8^2 + 9^2 + 12^2 + 31^2 + 32^2 = 2275 = a(31).
PROG
(PARI) a(n)=my(b, N=2*n+1); sum(a=0, n, if(issquare(N+a^2, &b), a^2+b^2)) \\ Charles R Greathouse IV, Apr 28 2014
CROSSREFS
Cf. A237626.
Sequence in context: A147272 A147427 A147408 * A249513 A147090 A097117
KEYWORD
nonn
AUTHOR
J. M. Bergot, Apr 26 2014
EXTENSIONS
a(4) corrected by Charles R Greathouse IV, Apr 28 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 May 23 15:23 EDT 2024. Contains 372763 sequences. (Running on oeis4.)