|
|
A181718
|
|
a(n) = (1/9)*(10^(2*n) + 10^n - 2).
|
|
3
|
|
|
0, 12, 1122, 111222, 11112222, 1111122222, 111111222222, 11111112222222, 1111111122222222, 111111111222222222, 11111111112222222222, 1111111111122222222222, 111111111111222222222222, 11111111111112222222222222, 1111111111111122222222222222
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
In decimal, n times 1 followed by n times 2.
a(n) = 3 + 3*3, 33 + 33*33, 333 + 333*333, written with 3,6,9,12,... = A008585(n+1) 3's.
|
|
LINKS
|
|
|
FORMULA
|
G.f.: 6*x*(2-35*x) / ( (1-x)*(1-10*x)*(1-100*x) ). - R. J. Mathar, Feb 28 2011
a(n) = 111*a(n-1) - 1110*a(n-2) + 1000*a(n-3), a(0)=0, a(1)=12, a(2)=1122. - Harvey P. Dale, Jul 31 2013
E.g.f.: (1/9)*(-2*exp(x) + exp(10*x) + exp(100*x)). - G. C. Greubel, Mar 25 2024
|
|
MATHEMATICA
|
Table[FromDigits[Join[PadRight[{}, n, 1], PadRight[{}, n, 2]]], {n, 0, 20}] (* or *) LinearRecurrence[{111, -1110, 1000}, {0, 12, 1122}, 20] (* Harvey P. Dale, Jul 31 2013 *)
|
|
PROG
|
(Magma) [(1/9)*(10^(2*n) + 10^n - 2): n in [0..20]]; // Vincenzo Librandi, Aug 04 2011
(PARI) vector(30, n, n--; (10^(2*n) + 10^n - 2)/9) \\ G. C. Greubel, Nov 02 2018
(Python)
for n in range(30):
print((10**(2*n)+10**n-2)//9, end=', ')
(SageMath) [(100^n +10^n -2)//9 for n in range(31)] # G. C. Greubel, Mar 25 2024
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|