login
n times (n 1's): a(n) = n*(10^n - 1)/9.
11

%I #34 Sep 14 2023 06:20:11

%S 0,1,22,333,4444,55555,666666,7777777,88888888,999999999,11111111110,

%T 122222222221,1333333333332,14444444444443,155555555555554,

%U 1666666666666665,17777777777777776,188888888888888887,1999999999999999998,21111111111111111109,222222222222222222220,2333333333333333333331

%N n times (n 1's): a(n) = n*(10^n - 1)/9.

%C R_a(n) is the least repunit divisible by the square of R_n = (10^n - 1)/9. - _Lekraj Beedassy_, Jun 07 2006

%H G. C. Greubel, <a href="/A053422/b053422.txt">Table of n, a(n) for n = 0..995</a>

%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (22,-141,220,-100).

%F a(n) = n*A002275(n) = a(n-1)*10n/(n-1) + n.

%F O.g.f.: x*(1-10*x^2)/((1-x)^2*(1-10*x)^2). - _R. J. Mathar_, Jan 21 2008

%F E.g.f.: x*exp(x)*(10*exp(9*x) - 1)/9. - _Stefano Spezia_, Sep 14 2023

%t LinearRecurrence[{22,-141,220,-100}, {0, 1, 22, 333}, 50] (* _G. C. Greubel_, May 25 2018 *)

%t CoefficientList[Series[x (1-10x^2)/((1-x)^2(1-10x)^2),{x,0,30}],x] (* _Harvey P. Dale_, Jun 29 2021 *)

%o (Sage) [gaussian_binomial(n,1,10)*n for n in range(0,22)] # _Zerinvary Lajos_, May 29 2009

%o (PARI) x='x+O('x^30); concat([0], Vec(x*(1-10*x^2)/((1-x)^2*(1-10*x)^2))) \\ _G. C. Greubel_, May 25 2018

%o (Magma) I:=[0, 1, 22, 333]; [n le 4 select I[n] else 22*Self(n-1) - 141*Self(n-2) +220*Self(n-3) -100*Self(n-4): n in [1..30]]; // _G. C. Greubel_, May 25 2018

%Y Cf. A000461, A002275, A048376.

%K base,easy,nonn

%O 0,3

%A _Henry Bottomley_, Mar 07 2000

%E Corrected by _Jason Earls_, Sep 02 2006