OFFSET
1,2
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,1,-1)
FORMULA
Numbers that are congruent to {1, 2, 3, 5, 6} mod 8.
Union of A047449 and A034045 is A000378. Intersection of A047449 and A034043 is A034046. Numbers that are in A000378 and not congruent to 0 mod 4. - Ray Chandler, Sep 05 2004
G.f.: x*(1 + x + x^2 + 2*x^3 + x^4 + 2*x^5) / ( (x^4 + x^3 + x^2 + x + 1)*(x-1)^2 ). - R. J. Mathar, Dec 07 2011
a(n) = a(n-1) + a(n-5) - a(n-6); a(1)=1, a(2)=2, a(3)=3, a(4)=5, a(5)=6, a(6)=9. - Harvey P. Dale, Mar 05 2015
MATHEMATICA
LinearRecurrence[{1, 0, 0, 0, 1, -1}, {1, 2, 3, 5, 6, 9}, 70] (* Harvey P. Dale, Mar 05 2015 *)
PROG
(PARI) a(n)=(n-1)\5*8+[6, 1, 2, 3, 5][n%5+1] \\ Charles R Greathouse IV, Jun 11 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved