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.

A048610 Smallest number that is the sum of two positive squares in >= n ways.

This page as a plain text file.
%I A048610 M2172 #34 Oct 20 2023 21:13:48
%S A048610 2,50,325,1105,5525,5525,27625,27625,71825,138125,160225,160225,
%T A048610 801125,801125,801125,801125,2082925,2082925,4005625,4005625,5928325,
%U A048610 5928325,5928325,5928325,29641625,29641625,29641625,29641625,29641625,29641625
%N A048610 Smallest number that is the sum of two positive squares in >= n ways.
%D A048610 J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 50, p. 19, Ellipses, Paris 2008.
%D A048610 J. Meeus, Problem 1375, J. Rec. Math., 18 (No. 1, 1985), p. 70.
%D A048610 Problem 590, J. Rec. Math., 11 (No. 2, 1978), p. 137.
%D A048610 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H A048610 Chai Wah Wu, <a href="/A048610/b048610.txt">Table of n, a(n) for n = 1..96</a>
%H A048610 J. Meeus, <a href="/A007511/a007511.pdf">Note</a>
%H A048610 <a href="/index/Su#ssq">Index entries for sequences related to sums of squares</a>
%e A048610 2 = 1^2 + 1^2; 50 = 1^2 + 7^2 = 5^2 + 5^2; 325 = 1^2 + 18^2 = 6^2 + 17^2 = 10^2 + 15^2.
%t A048610 (* Assuming a(n) multiple of 1105, from 1105 on, to speed up computation *) twoSquaresR[n_] := twoSquaresR[n] = With[{r = Reduce[0 < x <= y && n == x^2 + y^2, {x, y}, Integers]}, If[r === False, 0, Length[{x, y} /. {ToRules[r]}]]]; a[n_] := a[n] = For[an = a[n - 1], True, an = If[an < 1105, an + 1, an + 1105], If[ twoSquaresR[an] >= n, Return[an]]];a[1] = 2; Table[ Print[a[n]]; a[n], {n, 1, 30}] (* _Jean-François Alcover_, Jun 22 2012 *)
%t A048610 nn = 10^6; t2 = Table[0, {nn}]; n2 = Floor[Sqrt[nn]]; Do[r = a^2 + b^2; If[r <= nn, t2[[r]]++], {a, n2}, {b, a, n2}]; t = {}; n = 1; While[a = Position[t2, _?(# >= n &), 1, 1]; a != {}, AppendTo[t, a[[1, 1]]]; n++]; t (* _T. D. Noe_, Jun 22 2012 *)
%Y A048610 Cf. A016032, A007511, A052199, A071383.
%K A048610 nonn,nice
%O A048610 1,1
%A A048610 _N. J. A. Sloane_, _Robert G. Wilson v_, _Jud McCranie_