login
This site is supported by donations 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; internal format)
OFFSET

0,1

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

Cf. A008846, A050795.

Sequence in context: A052038 A040022 A165100 * A165102 A009661 A023576

Adjacent sequences:  A159932 A159933 A159934 * A159936 A159937 A159938

KEYWORD

nonn

AUTHOR

Franklin T. Adams-Watters (FrankTAW(AT)Netscape.net), Apr 26 2009

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 17 19:13 EST 2012. Contains 206085 sequences.