Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A078513
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A078513 a(0)=0, a(1)=1, a(n)=a(n-1)+a(n-2)+a(n-3) if a(n-1) is even, a(n)=a(n-1)+a(n-2) if a(n-1) is odd. +0
1
0, 1, 1, 2, 4, 7, 11, 18, 36, 65, 101, 166, 332, 599, 931, 1530, 3060, 5521, 8581, 14102, 28204, 50887, 79091, 129978, 259956, 469025, 728981, 1198006, 2396012, 4322999, 6719011, 11042010, 22084020, 39845041, 61929061, 101774102, 203548204 (list; graph; listen)
OFFSET

0,4

COMMENT

Variation of Fibonacci sequence.

FORMULA

G.f.: x(1+x+2x^2+4x^3-2x^4+2x^5)/(1-9x^4-2x^8). - Michael Somos, Feb 19 2003

EXAMPLE

a(5)=7 since a(4)=4 then 7=4+2+1.

MATHEMATICA

maxN=10 a[0]=0 a[1]=1 Do[ If[EvenQ[a[i-1]]==True, a[i]=a[i-1]+a[i-2]+a[i-3], a[i]=a[i-1]+a[i-2]]; Print[a[i]], {i, 2, maxN}]

PROGRAM

(PARI) a(n)=if(n<0, 0, polcoeff(x*(1+x+2*x^2+4*x^3-2*x^4+2*x^5)/(1-9*x^4-2*x^8)+x*O(x^n), n))

CROSSREFS

Adjacent sequences: A078510 A078511 A078512 this_sequence A078514 A078515 A078516

Sequence in context: A000570 A023426 A127926 this_sequence A024622 A034337 A083024

KEYWORD

easy,nonn

AUTHOR

Lorenzo Fortunato (fortunat(AT)pd.infn.it), Jan 06 2003

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified October 15 09:18 EDT 2008. Contains 145015 sequences.


AT&T Labs Research