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.

A080420 a(n) = (n+1)*(n+6)*3^n/6.

Original entry on oeis.org

1, 7, 36, 162, 675, 2673, 10206, 37908, 137781, 492075, 1732104, 6022998, 20726199, 70681653, 239148450, 803538792, 2683245609, 8910671247, 29443957164, 96855122250, 317297380491, 1035574967097, 3368233731366, 10920608743932, 35303692060125, 113819103201843
Offset: 0

Views

Author

Paul Barry, Feb 19 2003

Keywords

Comments

a(n-1) is the number of words of length n defined on 5 letters that have exactly one a and no b's or exactly two b's and no a's. For example, for n=3, a(2) = 36 since the words are (number of permutations in parentheses): acc (3), add (3), aee (3), acd (6), ace (6), ade (6), bbc (3), bbd (3), bbe (3). - Enrique Navarrete, Jun 10 2025

Crossrefs

T(n,2) in triangle A080419.

Programs

  • Magma
    [(n+1)*(n+6)*3^n/6: n in [0..30]]; // Vincenzo Librandi, Aug 05 2013
    
  • Mathematica
    CoefficientList[Series[(1 - 2 x) / (1 - 3 x)^3, {x, 0, 30}], x] (* Vincenzo Librandi, Aug 05 2013 *)
    Table[(n+1)(n+6)3^n/6,{n,0,30}] (* or *) LinearRecurrence[{9,-27,27},{1,7,36},30] (* Harvey P. Dale, Apr 02 2019 *)
  • SageMath
    [(n+1)*(n+6)*3^n/6 for n in range(31)] # G. C. Greubel, Dec 22 2023

Formula

G.f.: (1-2*x)/(1-3*x)^3.
From G. C. Greubel, Dec 22 2023: (Start)
a(n) = (n+6)*A288834(n)/2, for n >= 1.
a(n) = A136158(n+2, 2).
E.g.f.: (1/2)*(2 + 8*x + 3*x^2)*exp(3*x). (End)
From Amiram Eldar, Jan 11 2024: (Start)
Sum_{n>=0} 1/a(n) = 17721/50 - 4356*log(3/2)/5.
Sum_{n>=0} (-1)^n/a(n) = 4392*log(4/3)/5 - 12591/50. (End)