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.

A181718 a(n) = (1/9)*(10^(2*n) + 10^n - 2).

Original entry on oeis.org

0, 12, 1122, 111222, 11112222, 1111122222, 111111222222, 11111112222222, 1111111122222222, 111111111222222222, 11111111112222222222, 1111111111122222222222, 111111111111222222222222, 11111111111112222222222222, 1111111111111122222222222222
Offset: 0

Views

Author

Paul Curtz, Nov 17 2010

Keywords

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.

Crossrefs

Programs

  • Magma
    [(1/9)*(10^(2*n) + 10^n - 2): n in [0..20]]; // Vincenzo Librandi, Aug 04 2011
    
  • 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 *)
  • 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=', ')
    # Stefano Spezia, Nov 02 2018
    
  • SageMath
    [(100^n +10^n -2)//9 for n in range(31)] # G. C. Greubel, Mar 25 2024

Formula

a(n) = A002277(n)*A093137(n).
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
a(n) = (A074992(n) - 1)/3. - Michel Marcus, Sep 14 2013
E.g.f.: (1/9)*(-2*exp(x) + exp(10*x) + exp(100*x)). - G. C. Greubel, Mar 25 2024