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!)
A122597 a(0) = 1, a(1) = 2, s = 1; for n >= 2, if a(n-1) is even and s = 0 then set a(n) = a(n-1)/2 and s = 1; otherwise set a(n) = a(n-1) + a(n-2) and s = 0. 1
1, 2, 3, 5, 8, 4, 12, 6, 18, 9, 27, 36, 18, 54, 27, 81, 108, 54, 162, 81, 243, 324, 162, 486, 243, 729, 972, 486, 1458, 729, 2187, 2916, 1458, 4374, 2187, 6561, 8748, 4374, 13122, 6561, 19683, 26244, 13122, 39366, 19683, 59049, 78732, 39366, 118098, 59049 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

LINKS

Table of n, a(n) for n=0..49.

FORMULA

For n >= 6, a(n) = A122164(n+5), so there is an explicit formula for the n-th term.

G.f.: -(15*x^10-15*x^9+3*x^8-3*x^7+6*x^6+x^5+8*x^4+5*x^3+3*x^2+2*x+1) / (3*x^5-1). - Alois P. Heinz, Jul 29 2013

MAPLE

a:= n-> if n<=5 then [1, 2, 3, 5, 8, 4][n+1] else [2, 1, 3, 4, 2][modp(n+2, 5)+1] *3^iquo(n+2, 5) fi: seq (a(n), n=0..50); # Alois P. Heinz, Sep 02 2008

MATHEMATICA

Do[a[n] = {1, 2, 3, 5, 8, 4, 12, 6, 18, 9, 27}[[n+1]], {n, 0, 10}]; a[n_] := a[n] = 3 a[n-5]; Array[a, 50, 0] (* Jean-Fran├žois Alcover, Nov 07 2016 *)

CROSSREFS

Cf. A000045, A122164, A000792.

Sequence in context: A021428 A238207 A050196 * A323890 A105836 A105822

Adjacent sequences:  A122594 A122595 A122596 * A122598 A122599 A122600

KEYWORD

nonn,easy

AUTHOR

N. J. A. Sloane, Aug 06 2008

EXTENSIONS

More terms from Alois P. Heinz, Sep 02 2008

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 April 21 12:47 EDT 2021. Contains 343153 sequences. (Running on oeis4.)