OFFSET
1,2
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,1,-1).
FORMULA
G.f.: x*(1+x+3*x^2+5*x^3+3*x^4+4*x^5+7*x^6) / ( (1+x)*(1+x+x^2)*(x^2-x+1)*(x-1)^2 ). - R. J. Mathar, Jul 02 2011
a(1)=1, a(2)=2, a(3)=5, a(4)=10, a(5)=13, a(6)=17, a(7)=25, a(n) = a(n-1)+ a(n-6)-a(n-7) for n>7. - Harvey P. Dale, Feb 19 2015
From Wesley Ivan Hurt, Jul 22 2016: (Start)
a(n) = a(n-6) + 24 for n>6.
a(n) = (12*n - 18 + cos(n*Pi/3) - 3*cos(2*n*Pi/3) - cos(n*Pi) + 2*sqrt(3)*sin(n*Pi/3) + 2*sqrt(3)*sin(2*n*Pi/3))/3.
a(6k) = 24k-7, a(6k-1) = 24k-11, a(6k-2) = 24k-14, a(6k-3) = 24k-19, a(6k-4) = 24k-22, a(6k-5) = 24k-23. (End)
MAPLE
A103215:=n->24*floor(n/6)+[1, 2, 5, 10, 13, 17][(n mod 6)+1]: seq(A103215(n), n=0..100); # Wesley Ivan Hurt, Jul 22 2016
MATHEMATICA
Select[Range[300], MemberQ[{1, 2, 5, 10, 13, 17}, Mod[#, 24]]&] (* or *) LinearRecurrence[{1, 0, 0, 0, 0, 1, -1}, {1, 2, 5, 10, 13, 17, 25}, 60] (* Harvey P. Dale, Feb 19 2015 *)
PROG
(Haskell)
a103215 n = a103215_list !! (n-1)
a103215_list = [1, 2, 5, 10, 13, 17] ++ map (+ 24) a103215_list
-- Reinhard Zumkeller, Jul 05 2013
(Magma) [n : n in [0..300] | n mod 24 in [1, 2, 5, 10, 13, 17]]; // Wesley Ivan Hurt, Jul 22 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ralf Stephan, Jan 28 2005
STATUS
approved