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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A129804 a(0) = 1, a(1) = 2; for n>0, a(2n) = 3a(2n-1) - a(2n-2), a(2n+1) = 3a(2n) - a(2n-1) - a(n-1). 0
1, 2, 5, 12, 31, 79, 206, 534, 1396, 3642, 9530, 24917, 65221, 170667, 446780, 1169467, 3061621, 8014862, 20982965, 54932637, 143814946, 376508559, 985710731, 2580614104, 6756131581, 17687755722, 46307135585, 121233585812 (list; graph; refs; listen; history; internal format)
OFFSET

0,2

COMMENTS

Equals the eigensequence of the correlation triangle, A003983. (Gary W. Adamson, qntmpkt(AT)yahoo.com, Mar 14, 2011).

MAPLE

a:=proc(n) if n=0 or n=1 then n+1 elif n mod 2 = 0 then 3*a(n-1)-a(n-2) else 3*a(n-1)-a(n-2)-a((n-3)/2) fi end: seq(a(n), n=0..30); - Emeric Deutsch (deutsch(AT)duke.poly.edu), May 20 2007

PROG

(PARI) {m=27; v=vector(m+1); v[1]=1; v[2]=2; for(n=2, m, k=3*v[n]-v[n-1]; if(n%2==1, k=k-v[(n-1)/2]); v[n+1]=k); print(v)} /* Klaus Brockhaus, May 20 2007 */

CROSSREFS

Cf. A003983

Sequence in context: A112412 A193284 A125023 * A110035 A000635 A077556

Adjacent sequences:  A129801 A129802 A129803 * A129805 A129806 A129807

KEYWORD

nonn

AUTHOR

Paul Curtz (bpcrtz(AT)free.fr), May 19 2007

EXTENSIONS

More terms from Emeric Deutsch (deutsch(AT)duke.poly.edu) and Klaus Brockhaus (klaus-brockhaus(AT)t-online.de), May 20 2007

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 17 19:13 EST 2012. Contains 206085 sequences.