A162671 For n even a(n) = a(n-1) + a(n-2), for n odd a(n) = 100*a(n-1) + a(n-2), with a(0) = 0, a(1) = 1.
0, 1, 1, 101, 102, 10301, 10403, 1050601, 1061004, 107151001, 108212005, 10928351501, 11036563506, 1114584702101, 1125621265607, 113676711262801, 114802332528408, 11593909964103601, 11708712296632009, 1182465139627304501, 1194173851923936510, 120599850332020955501
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (0,102,0,-1).
Programs
-
Maple
a:= proc(n) a(n):= `if`(n<2, n, a(n-1)*(1+99*(n mod 2))+a(n-2)) end: seq(a(n), n=0..22); # Alois P. Heinz, Jan 20 2025
-
Mathematica
LinearRecurrence[{0,102,0,-1},{1,1,101,102},20] (* Harvey P. Dale, May 08 2020 *)
Formula
a(n) = 102*a(n-2)-a(n-4). G.f.: x*(1+x-x^2)/((x^2+10*x-1)*(x^2-10*x-1)). - R. J. Mathar, Jul 14 2009
Extensions
More terms from R. J. Mathar, Jul 14 2009