login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A070176 Let s(n) be smallest number >= n which is a sum of two squares (A001481); sequence gives s(n) - n. 4
0, 0, 0, 1, 0, 0, 2, 1, 0, 0, 0, 2, 1, 0, 2, 1, 0, 0, 0, 1, 0, 4, 3, 2, 1, 0, 0, 2, 1, 0, 2, 1, 0, 1, 0, 1, 0, 0, 2, 1, 0, 0, 3, 2, 1, 0, 3, 2, 1, 0, 0, 1, 0, 0, 4, 3, 2, 1, 0, 2, 1, 0, 2, 1, 0, 0, 2, 1, 0, 3, 2, 1, 0, 0, 0, 5, 4, 3, 2, 1, 0, 0, 0, 2, 1, 0, 3, 2, 1, 0, 0, 6, 5, 4, 3, 2, 1, 0, 0, 1, 0, 0, 2, 1, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,7

COMMENTS

It is an unsolved problem to determine the rate of growth of this sequence.

a(A001481(n)) = 0; a(A022544(n)) > 0. [Reinhard Zumkeller, Feb 04 2012]

REFERENCES

H. L. Montgomery, Ten Lectures on the Interface Between Analytic Number Theory and Harmonic Analysis, Amer. Math. Soc., 1996, p. 208.

LINKS

T. D. Noe, Table of n, a(n) for n = 0..10000

MATHEMATICA

sumOfTwoSquaresQ[n_] := With[{r = Ceiling[Sqrt[n]]}, Do[ Which[n == x^2 + y^2, Return[True], x == r && y == r, Return[False]], {x, 0, r}, {y, x, r}]]; a[n_] := For[s = n, True, s++, If[sumOfTwoSquaresQ[s], Return[s - n]]]; Table[a[n], {n, 0, 104}](* Jean-Fran├žois Alcover, May 23 2012 *)

s2s[n_]:=Module[{i=0}, While[SquaresR[2, n+i]==0, i++]; i]; Array[s2s, 110, 0] (* Harvey P. Dale, Jun 16 2012 *)

PROG

(Haskell)

a070176 n = (head $ dropWhile (< n) a001481_list) - n

a070176_list = map a070176 [0..]

-- Reinhard Zumkeller, Feb 04 2012

CROSSREFS

Sequence in context: A227834 A025894 A051127 * A092606 A275948 A073253

Adjacent sequences:  A070173 A070174 A070175 * A070177 A070178 A070179

KEYWORD

nonn,easy,nice

AUTHOR

N. J. A. Sloane, May 13 2002

EXTENSIONS

More terms from Jason Earls, Jun 15 2002

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 17 05:27 EST 2019. Contains 329217 sequences. (Running on oeis4.)