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.

A117868 Number of palindromes (in base 9) below 9^n.

Original entry on oeis.org

8, 16, 88, 160, 808, 1456, 7288, 13120, 65608, 118096, 590488, 1062880, 5314408, 9565936, 47829688, 86093440, 430467208, 774840976, 3874204888, 6973568800, 34867844008, 62762119216, 313810596088, 564859072960, 2824295364808, 5083731656656, 25418658283288
Offset: 1

Views

Author

Martin Renner, May 02 2006

Keywords

Crossrefs

Cf. A050250.

Programs

  • Maple
    seq( 8 * 3^(n-1) + 2 * (-3)^(n-1) - 2, n=1..100); # Robert Israel, Apr 26 2015
  • Mathematica
    Table[If[OddQ[n],10*9^((n-1)/2)-2,2*9^(n/2)-2],{n,0,30}] (* or *) LinearRecurrence[ {1,9,-9},{0,8,16},30] (* Harvey P. Dale, Jul 17 2012 *)
  • PARI
    Vec(8*x*(x+1)/((x-1)*(3*x-1)*(3*x+1)) + O(x^100)) \\ Colin Barker, Apr 26 2015

Formula

a(n) = 10*9^((n-1)/2)-2 (n odd), 2*9^(n/2)-2 (n even).
a(1)=0, a(2)=8, a(3)=16, a(n)=a(n-1)+9*a(n-2)-9*a(n-3). - Harvey P. Dale, Jul 17 2012
G.f.: 8*x*(x+1) / ((x-1)*(3*x-1)*(3*x+1)). - Colin Barker, Apr 26 2015
a(n) = 8 * 3^(n-1) + 2 * (-3)^(n-1) - 2. - Robert Israel, Apr 26 2015

Extensions

More terms from Harvey P. Dale, Jul 17 2012