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!)
A159935 Least integer such that a(n)^2 - n is the sum of two nonzero squares. 1
5, 3, 2, 4, 3, 5, 4, 3, 4, 7, 6, 4, 5, 9, 4, 5, 6, 5, 6, 6, 5, 11, 12, 5, 7, 15, 6, 8, 6, 7, 8, 6, 7, 13, 6, 8, 7, 21, 8, 7, 9, 7, 10, 12, 7, 15, 8, 7, 10, 9, 10, 8, 9, 11, 8, 9, 8, 17, 30, 8, 10, 9, 8, 9, 9, 13, 10, 18, 9, 11, 12, 9, 12, 9, 10, 10, 9, 15, 16, 9, 10, 11, 10, 10, 11, 21, 12, 10, 15 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
LINKS
PROG
(PARI) issum2sq(n) = local(fm, hf); hf=0; fm=factor(n); for(i=1, matsize(fm)[1], if(fm[i, 1]==2, if(fm[i, 2]%2, hf=1), if(fm[i, 1]%4==1, hf=1, if(fm[i, 2]%2, return(0))))); hf
minsum2sq(n) = local(k); k=1; while(!issum2sq(k^2-n), k++); k
/* Note: the issum2sq function depends on PARI returning -1 as a factor for negative n. */
CROSSREFS
Sequence in context: A040022 A165100 A351061 * A165102 A294568 A290349
KEYWORD
nonn
AUTHOR
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 April 19 14:50 EDT 2024. Contains 371792 sequences. (Running on oeis4.)