login
A103215
Numbers congruent to {1, 2, 5, 10, 13, 17} mod 24.
2
1, 2, 5, 10, 13, 17, 25, 26, 29, 34, 37, 41, 49, 50, 53, 58, 61, 65, 73, 74, 77, 82, 85, 89, 97, 98, 101, 106, 109, 113, 121, 122, 125, 130, 133, 137, 145, 146, 149, 154, 157, 161, 169, 170, 173, 178, 181, 185, 193, 194, 197, 202, 205, 209, 217, 218, 221, 226
OFFSET
1,2
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
Union of A008784 and A103216.
Cf. A054895.
Sequence in context: A180161 A349243 A099261 * A037942 A008784 A224450
KEYWORD
nonn,easy
AUTHOR
Ralf Stephan, Jan 28 2005
STATUS
approved