A049416
Largest number whose square has n digits.
Original entry on oeis.org
3, 9, 31, 99, 316, 999, 3162, 9999, 31622, 99999, 316227, 999999, 3162277, 9999999, 31622776, 99999999, 316227766, 999999999, 3162277660, 9999999999, 31622776601, 99999999999, 316227766016, 999999999999, 3162277660168
Offset: 1
Ulrich Schimke (ulrschimke(AT)aol.com)
31^2 = 961, but 32^2 = 1024, hence a(3) = 31.
a(4) = 99: 99^2 = 9801 has 4 digits, while 100^2 = 10000 has 5 digits.
More terms from Larry Reeves (larryr(AT)acm.org), May 16 2001
A167615
Total number of positive integers below 10^n with 4 positive squares in their representation as sum of squares.
Original entry on oeis.org
1, 15, 165, 1665, 16664, 166664, 1666663, 16666663, 166666661, 1666666662, 16666666661, 166666666660, 1666666666661, 16666666666660, 166666666666659, 1666666666666660, 16666666666666658, 166666666666666657, 1666666666666666660, 16666666666666666656
Offset: 1
a(1) = 1 since 7 is the only natural number below 10 which is the sum of 4 but no fewer nonzero squares.
-
a:=proc(n)
local f,s,k;
f:=(x,y)->ceil(10^y/2^(2*x+3)-7/8):
s:=0:
for k from 0 by 1 while not f(k,n)=0 do
s:=s+f(k,n);
od:
return(s);
end;
-
a[n_] := Module[{f, s = 0, k}, f[x_, y_] := Ceiling[10^y/2^(2x+3) - 7/8]; For[k = 0, f[k, n] != 0, k++, s += f[k, n]]; Return[s]];
Array[a, 20] (* Jean-François Alcover, Oct 31 2020, after Maple *)
A180425
Number of positive integers below 10^n requiring 3 positive squares in their representation as sum of squares.
Original entry on oeis.org
2, 42, 505, 5586, 59308, 616995, 6347878, 64875490, 660104281, 6695709182, 67762820595, 684596704482, 6907026402474, 69611115440126, 700946070114283, 7053023642205904
Offset: 1
A180426
The number of n-digit numbers requiring 2 nonzero squares in their representation as sum of squares.
Original entry on oeis.org
3, 30, 265, 2351, 21062, 191630, 1766955, 16465551, 154749588, 1464326721, 13932672360, 133165432342, 1277568139729, 12295904124627, 118665023703067, 1147922359531155
Offset: 1
A164775
a(n) is the number of positive integers <= 10^n that can be expressed as a sum of two squares.
Original entry on oeis.org
7, 43, 330, 2749, 24028, 216341, 1985459, 18457847, 173229058, 1637624156, 15570512744, 148736628858, 1426306930865, 13722217893214, 132387263219058, 1280309691127436
Offset: 1
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.
Showing 1-5 of 5 results.
Comments