A173906 Total number of digits of the squares of all n-digit numbers.
16, 338, 5183, 69837, 878377, 10583772, 123837722, 1418377223, 15983772233, 177837722339, 1958377223398, 21383772233983, 231837722339831, 2498377223398316, 26783772233983162, 285837722339831620, 3038377223398316206, 32183772233983162066, 339837722339831620668, 3578377223398316206680
Offset: 1
Programs
-
Mathematica
f[n_] := Block[{br = 1+ Floor[10^(n-1)*Sqrt@10]},(2n-1)(br-10^(n-1)) + 2n(10^n-br)]; Array[f, 20]
Formula
Limit_{n->oo} a(n)/(n*10^n) = 9/5. [corrected by Jason Yuen, Feb 07 2025]
From Jason Yuen, Feb 07 2025: (Start)
a(n) = (9/5)*n*10^n - ceiling((sqrt(10)-1)*10^(n-1)) for n > 1. (End)
Comments