login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A129770 a(0) = 0, a(1) = 1; for n>0, a(2n) = 3a(2n-1), a(2n+1) = 3a(2n) - 2a(n-1). 2
0, 1, 3, 9, 27, 79, 237, 705, 2115, 6327, 18981, 56889, 170667, 511843, 1535529, 4606113, 13818339, 41453607, 124360821, 373078233, 1119234699, 3357691443, 10073074329, 30219185025, 90657555075, 271972551447, 815917654341 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
MAPLE
a:=proc(n) if n=0 or n=1 then n elif n mod 2 = 0 then 3*a(n-1) else 3*a(n-1)-2*a((n-3)/2) fi end: seq(a(n), n=0..31); - Emeric Deutsch, May 19 2007
MATHEMATICA
a[0] = 0; a[1] = 1; a[n_] := If[OddQ@n, 3 a[n - 1] - 2 a[(n - 3)/2], 3 a[n - 1]]; Table[ a[n], {n, 0, 26}] (* Robert G. Wilson v *)
PROG
(PARI) {m=26; v=vector(m+1); v[1]=0; v[2]=1; for(n=2, m, k=3*v[n]; if(n%2==1, k=k-2*v[(n-1)/2]); v[n+1]=k); print(v)} /* Klaus Brockhaus, May 20 2007 */
CROSSREFS
Cf. A129772.
Sequence in context: A299108 A304067 A287898 * A134396 A059502 A291006
KEYWORD
nonn
AUTHOR
Paul Curtz, May 16 2007
EXTENSIONS
More terms from Emeric Deutsch, Robert G. Wilson v and Klaus Brockhaus, May 16 2007
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 15:00 EDT 2024. Contains 371989 sequences. (Running on oeis4.)