cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A070176 Let s(n) be smallest number >= n which is a sum of two squares (A001481); sequence gives s(n) - n.

This page as a plain text file.
%I A070176 #22 Dec 15 2017 17:35:52
%S A070176 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,
%T A070176 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,
%U A070176 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
%N A070176 Let s(n) be smallest number >= n which is a sum of two squares (A001481); sequence gives s(n) - n.
%C A070176 It is an unsolved problem to determine the rate of growth of this sequence.
%C A070176 a(A001481(n)) = 0; a(A022544(n)) > 0. [_Reinhard Zumkeller_, Feb 04 2012]
%D A070176 H. L. Montgomery, Ten Lectures on the Interface Between Analytic Number Theory and Harmonic Analysis, Amer. Math. Soc., 1996, p. 208.
%H A070176 T. D. Noe, <a href="/A070176/b070176.txt">Table of n, a(n) for n = 0..10000</a>
%t A070176 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 *)
%t A070176 s2s[n_]:=Module[{i=0},While[SquaresR[2,n+i]==0,i++];i]; Array[s2s,110,0] (* _Harvey P. Dale_, Jun 16 2012 *)
%o A070176 (Haskell)
%o A070176 a070176 n = (head $ dropWhile (< n) a001481_list) - n
%o A070176 a070176_list = map a070176 [0..]
%o A070176 -- _Reinhard Zumkeller_, Feb 04 2012
%K A070176 nonn,easy,nice
%O A070176 0,7
%A A070176 _N. J. A. Sloane_, May 13 2002
%E A070176 More terms from _Jason Earls_, Jun 15 2002