login
a(n) is the number of positive integers <= 10^n that can be expressed as a sum of two squares.
2

%I #29 Feb 16 2025 08:33:11

%S 7,43,330,2749,24028,216341,1985459,18457847,173229058,1637624156,

%T 15570512744,148736628858,1426306930865,13722217893214,

%U 132387263219058,1280309691127436

%N a(n) is the number of positive integers <= 10^n that can be expressed as a sum of two squares.

%H Peter Shiu, <a href="http://dx.doi.org/10.1090/S0025-5718-1986-0842141-1">Counting Sums of Two Squares: The Meissel-Lehmer Method</a>, Mathematics of Computation 47:175 (July 1986), pp. 351-360. [Beware errors.]

%H Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Landau-RamanujanConstant.html">Landau-Ramanujan Constant</a>

%F a(n) = A180416(n) + ceiling(sqrt(10^n)). - _Hiroaki Yamanouchi_, Jul 14 2014

%e a(1)=7 since 1 = 0^2 + 1^2, 2 = 1^2 + 1^2, 4 = 0^2 + 2^2, 5 = 1^2 + 2^2, 8 = 2^2 + 2^2, 9 = 0^2 + 3^2, 10 = 1^2 + 3^3.

%Y Cf. A000050, A001481, A064533, A227158, A275649, A275650.

%K nonn,hard,more,changed

%O 1,1

%A _Eric W. Weisstein_, Aug 26 2009

%E Offset changed from 0 to 1 by _Robert G. Wilson v_, Aug 29 2009

%E a(9) from _Eric W. Weisstein_, Aug 29 2009

%E a(10) from _Donovan Johnson_, Sep 16 2009

%E a(11)-a(12) from _Ant King_, May 02 2010

%E a(11)-a(12) corrected and a(13)-a(16) added by _Hiroaki Yamanouchi_, Jul 14 2014