|
Search: id:A100550
|
|
|
| A100550 |
|
If n>3 a(n)=a(n-1)+2*a(n-2)+3*a(n-3) else a(n)=n |
|
+0 2
|
|
| 0, 1, 2, 4, 11, 25, 59, 142, 335, 796, 1892, 4489, 10661, 25315, 60104, 142717, 338870, 804616, 1910507, 4536349, 10771211, 25575430, 60726899, 144191392, 342371480, 812934961, 1930252097, 4583236459, 10882545536, 25839774745, 61354575194
(list; graph; listen)
|
|
|
OFFSET
|
0,3
|
|
|
COMMENT
|
A (1,2,3)-weighted version of the tribonacci sequence A000073.
The following are primes: a(2) = 2, a(4) = 11, a(6) = 59 and a(40) = 335593747307843. Semiprimes: a(n) for n = 3,5,7,8,11,12,15,19,20,22,27,35. a(n) is a perfect square for n = 3,5,11. - Jonathan Vos Post (jvospost3(AT)gmail.com), Nov 28 2004
A recursive and iterative algorithm for the computation of a(n) appear as Exercise 1.11 in the book Structure and Interpretation of Computer Programs. - Bas Kok (no(AT)spam.com), Jan 31 2008
|
|
REFERENCES
|
Harold Abelson and Gerald Jay Sussman with Julie Sussman, Structure and Interpretation of Computer Programs, MIT Press, 1996
|
|
FORMULA
|
O.g.f.: x(1+x)/(1-x-2x^2-3x^3). a(n)=A101822(n-1)+A101822(n-2). [From R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Aug 22 2008]
|
|
EXAMPLE
|
a(3)=1*2+2*1+3*0=4
|
|
PROGRAM
|
perl -e '@a=(0, 1, 2); for(3..30){$a[$_]=$a[$_-1]+2*$a[$_-2]+3*$a[$_-3]; } print "@a "; '
|
|
CROSSREFS
|
Cf. A100477.
Cf. A000073, A092836, A092835.
Sequence in context: A034485 A018006 A131434 this_sequence A071973 A086424 A122121
Adjacent sequences: A100547 A100548 A100549 this_sequence A100551 A100552 A100553
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
gamo (gamo(AT)telecable.es), Nov 27 2004
|
|
|
Search completed in 0.002 seconds
|