login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A052909 Expansion of (1+x-x^2)/((1-x)*(1-3*x)). 5
1, 5, 16, 49, 148, 445, 1336, 4009, 12028, 36085, 108256, 324769, 974308, 2922925, 8768776, 26306329, 78918988, 236756965, 710270896, 2130812689, 6392438068, 19177314205, 57531942616, 172595827849, 517787483548, 1553362450645 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

LINKS

Vincenzo Librandi, Table of n, a(n) for n = 0..1000

INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 889

Index entries for linear recurrences with constant coefficients, signature (4,-3).

FORMULA

G.f.: (1+x-x^2)/((1-x)*(1-3*x)).

a(n) = 3*a(n-1) +1, with a(0)=1, a(1)=5, a(2)=16.

a(n) = (11*3^n - 3)/6.

a(n) = 4*a(n-1) -3*a(n-2). - Vincenzo Librandi, Jun 22 2012

a(n+1) = A237930(n) + 2*A000244(n). - Philippe Deléham, Feb 17 2014

a(n) = Sum_{k=1..3} floor((3^n)/k). - Lechoslaw Ratajczak, Jul 31 2016

EXAMPLE

Ternary.......................Decimal

1...................................1

12..................................5

121................................16

1211...............................49

12111.............................148

121111............................445

1211111..........................1336

12111111.........................4009

121111111.......................12028

1211111111......................36085, etc. - Philippe Deléham, Feb 17 2014

MAPLE

spec := [S, {S=Prod(Union(Sequence(Z), Z), Sequence(Union(Z, Z, Z)))}, unlabeled]: seq(combstruct[count](spec, size=n), n=0..20);

MATHEMATICA

CoefficientList[Series[(1+x-x^2)/((1-x)*(1-3*x)), {x, 0, 30}], x] (* Vincenzo Librandi, Jun 22 2012 *)

Join[{1}, (11*3^Range[30] -3)/6] (* G. C. Greubel, Oct 15 2019 *)

PROG

(MAGMA) I:=[1, 5, 16]; [n le 3 select I[n] else 4*Self(n-1)-3*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Jun 22 2012

(PARI) vector(30, n, if(n==1, 1, (11*3^(n-1) - 3)/6)) \\ G. C. Greubel, Oct 15 2019

(Sage) [1]+[(11*3^n -3)/6 for n in (1..30)] # G. C. Greubel, Oct 15 2019

(GAP) Concatenation([1], List([1..30], n-> (11*3^n - 3)/6)); # G. C. Greubel, Oct 15 2019

CROSSREFS

Cf. A000244, A237930.

Sequence in context: A171426 A180129 A244410 * A037536 A192904 A082001

Adjacent sequences:  A052906 A052907 A052908 * A052910 A052911 A052912

KEYWORD

nonn,easy

AUTHOR

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

EXTENSIONS

More terms from James A. Sellers, Jun 08 2000

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 27 10:15 EST 2020. Contains 332304 sequences. (Running on oeis4.)