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.

A125857 Numbers whose base-9 representation is 22222222.......2.

Original entry on oeis.org

0, 2, 20, 182, 1640, 14762, 132860, 1195742, 10761680, 96855122, 871696100, 7845264902, 70607384120, 635466457082, 5719198113740, 51472783023662, 463255047212960, 4169295424916642, 37523658824249780, 337712929418248022
Offset: 1

Views

Author

Zerinvary Lajos, Feb 03 2007

Keywords

Comments

If f(1) := 1/x and f(n+1) = (f(n) + 2/f(n))/3, then f(n) = 3^(1-n) * (1/x + a(n)*x + O(x^3)). - Michael Somos, Jul 28 2020

Examples

			G.f. = 2*x^2 + 20*x^3 + 182*x^4 + 1640*x^5 + 14762*x^6 + 132860*x^7 + ... - _Michael Somos_, Jul 28 2020
		

Crossrefs

Cf. A002452.

Programs

  • Maple
    seq((9^n-1)*2/8, n=0..19);
  • Mathematica
    FromDigits[#, 9]&/@Table[PadRight[{2}, n, 2], {n, 0, 20}] (* Harvey P. Dale, Feb 02 2011 *)
    Table[(9^(n - 1) - 1)*2/8, {n, 20}] (* Wesley Ivan Hurt, Mar 29 2014 *)
  • PARI
    Vec(2*x^2/((x-1)*(9*x-1)) + O(x^100)) \\ Colin Barker, Sep 30 2014
    
  • PARI
    {a(n) = (9^(n-1) - 1)/4}; /* Michael Somos, Jul 02 2017 */

Formula

a(n) = (9^(n-1) - 1)*2/8.
a(n) = 9*a(n-1) + 2 (with a(1)=0). - Vincenzo Librandi, Sep 30 2010
a(n) = 2 * A002452(n). - Vladimir Pletser, Mar 29 2014
From Colin Barker, Sep 30 2014: (Start)
a(n) = 10*a(n-1) - 9*a(n-2).
G.f.: 2*x^2 / ((x-1)*(9*x-1)). (End)
a(n) = -a(2-n) * 9^(n-1) for all n in Z. - Michael Somos, Jul 02 2017
a(n) = A191681(n-1)/2. - Klaus Purath, Jul 03 2020