login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A134931 (5*3^n-3)/2. 10
1, 6, 21, 66, 201, 606, 1821, 5466, 16401, 49206, 147621, 442866, 1328601, 3985806, 11957421, 35872266, 107616801, 322850406, 968551221, 2905653666, 8716961001, 26150883006, 78452649021, 235357947066, 706073841201, 2118221523606 (list; graph; refs; listen; history; internal format)
OFFSET

0,2

COMMENTS

Numbers n where the recurrence s(0)=1, if s(n-1) >= n then s(n) = s(n-1) - n else s(n) = s(n-1) + n produces s(n)=0. [From Hugo Pfoertner, Jan 05 2012]

LINKS

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

Index to sequences with linear recurrences with constant coefficients, signature (4,-3).

FORMULA

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

O.g.f.: 5/2/(1-3*x)-3/2/(1-x). a(n) = (A005030(n)-3)/2. - R. J. Mathar, Jan 31 2008

MAPLE

seq((5*3^n-3)/2, n= 0..25); [From Gary Detlefs (gdetlefs(AT)aol.com), Jun 22 2010]

MATHEMATICA

a=1; lst={a}; Do[a=a*3+3; AppendTo[lst, a], {n, 0, 100}]; lst [From Vladimir Orlovsky, Dec 25 2008]

PROG

(MAGMA) [(5*3^n-3)/2: n in [0..30]]; // Vincenzo Librandi, Jun 05 2011

CROSSREFS

Cf. A003462, A007051, A034472, A024023, A067771, A029858 [From Vladimir Orlovsky (4vladimir(AT)gmail.com), Dec 25 2008]

Sequence in context: A022571 A117962 A105457 * A119103 A180795 A107653

Adjacent sequences:  A134928 A134929 A134930 * A134932 A134933 A134934

KEYWORD

nonn,easy

AUTHOR

Rolf Pleisch (r_pleisch(AT)gmx.ch), Jan 29 2008

EXTENSIONS

More terms and Mathematica program Vladimir Orlovsky (4vladimir(AT)gmail.com), Dec 25 2008

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 14 13:08 EST 2012. Contains 205623 sequences.