OFFSET
1,3
COMMENTS
3=1+2, 4=1+1+2, 6=1+5, 7=2+5, 8=1+2+5, 9=1+1+2+5, 11=1+10, 12=2+10, 13=1+2+10.
a(n) is used only once. Like weights.
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,0,0,10).
FORMULA
a(1)=1, a(2)=1, a(3)=2, a(4)=5, a(n)=10*a(n-4). G.f.: x*(1+x+2*x^2+5*x^3)/(1-10*x^4). [Colin Barker, Jan 25 2012]
MATHEMATICA
LinearRecurrence[{0, 0, 0, 10}, {1, 1, 2, 5}, 40] (* Harvey P. Dale, Jan 21 2019 *)
PROG
(PARI) a(n)=10^(n\4)*[1/2, 1, 1, 2][n%4+1] \\ Charles R Greathouse IV, Dec 21 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Aug 22 2011
STATUS
approved