login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A165402
a(n) = (10^n*2 - 11)/9.
6
1, 21, 221, 2221, 22221, 222221, 2222221, 22222221, 222222221, 2222222221, 22222222221, 222222222221, 2222222222221, 22222222222221, 222222222222221, 2222222222222221, 22222222222222221, 222222222222222221
OFFSET
1,2
COMMENTS
a(n) are also n-1 twos followed by a one.
Sum of n-th row of triangle of powers of 10: 1; 10 1 10; 100 10 1 10 100; 1000 100 10 1 10 100 1000; ... - Philippe Deléham, Feb 24 2014
FORMULA
a(n) = 10*a(n-1) + 11, a(1) = 1. - Philippe Deléham, Feb 24 2014
a(n) = 11*a(n-1) - 10*a(n-2), a(1) = 1, a(2) = 21. - Philippe Deléham, Feb 24 2014
G.f.: x*(1+10*x)/((1-x)*(1-10*x)). - Philippe Deléham, Feb 24 2014
EXAMPLE
a(1) = 1;
a(2) = 10 + 1 + 10 = 21;
a(3) = 100 + 10 + 1 + 10 + 100 = 221;
a(4) = 1000 + 100 + 10 + 1 + 10 + 100 + 1000 = 2221; etc. - Philippe Deléham, Feb 24 2014
MATHEMATICA
Table[FromDigits[PadLeft[{1}, n, 2]], {n, 20}] (* or *) (2*10^Range[20]-11)/9 (* Harvey P. Dale, Aug 10 2011 *)
CROSSREFS
Cf. A084832 (positions of primes).
Sequence in context: A152161 A008421 A134585 * A135120 A027812 A171112
KEYWORD
easy,nonn
AUTHOR
Ivan Panchenko, Sep 17 2009
STATUS
approved