|
Search: id:A134455
|
|
|
| A134455 |
|
a(0) = a(1) = 1, a(2) = 2; a(n) = 2*a(n-2) + a(n-1)*a(n-3) |
|
+0 1
|
|
| 1, 1, 2, 4, 7, 16, 49, 375, 6098, 299552, 112344196, 685075506312, 205215738291460616, 23054797124901926721197360
(list; graph; listen)
|
|
|
OFFSET
|
0,3
|
|
|
COMMENT
|
This is a recurrence relation which has 1,1 and 2 as the base cases and the nth term is obtained by multiplying the (n-2)th term by 2 and adding it with the product of (n-1)th and (n-3)rd term.
|
|
EXAMPLE
|
f(5) = 2*f(3)+ f(4)*f(2) = 2*4 + 7*2 = 22
|
|
PROGRAM
|
Formula for calculating the nth term : int n; int val; int seq(int n) { if( n==0 || n==1 ) { seq(0) = seq(1) = 1; } else if( n==2 ) { seq(2) = 2; } else { val = 2*seq(n-2) + seq(n-1)*seq(n-3); } return val ; }
|
|
CROSSREFS
|
Adjacent sequences: A134452 A134453 A134454 this_sequence A134456 A134457 A134458
Sequence in context: A151378 A137568 A010355 this_sequence A113878 A026775 A027238
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
Mohit Maheshwari (mohitmahe1989(AT)gmail.com), Jan 19 2008
|
|
|
Search completed in 0.002 seconds
|