cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A165402 a(n) = (2*10^n - 11)/9.

Original entry on oeis.org

1, 21, 221, 2221, 22221, 222221, 2222221, 22222221, 222222221, 2222222221, 22222222221, 222222222221, 2222222222221, 22222222222221, 222222222222221, 2222222222222221, 22222222222222221, 222222222222222221, 2222222222222222221, 22222222222222222221, 222222222222222222221
Offset: 1

Views

Author

Ivan Panchenko, Sep 17 2009

Keywords

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

Examples

			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
		

Crossrefs

Cf. A084832 (positions of primes).

Programs

  • Mathematica
    Table[FromDigits[PadLeft[{1},n,2]],{n,20}] (* or *) (2*10^Range[20]-11)/9 (* Harvey P. Dale, Aug 10 2011 *)

Formula

From Philippe Deléham, Feb 24 2014: (Start)
a(n) = 10*a(n-1) + 11, a(1)=1.
a(n) = 11*a(n-1) - 10*a(n-2), a(1)=1, a(2)=21.
G.f.: x*(1+10*x)/((1-x)*(1-10*x)). (End)
E.g.f.: 1 + exp(x)*(2*exp(9*x) - 11)/9. - Elmo R. Oliveira, Jun 13 2025