OFFSET
1,1
COMMENTS
LINKS
Index entries for linear recurrences with constant coefficients, signature (2, -2, 2, -1).
FORMULA
a(n) = 3*(sin((n*Pi)/2)- cos((n*Pi)/2)+5*n-3).
a(1)=9, a(2)=24, a(3)=33, a(4)=48, a(n)=2*a(n-1)-2*a(n-2)+2*a(n-3)-a(n-4). Empirical G.f.: 3*x*(3+2*x+x^2+4*x^3)/(1-2*x+2*x^2-2*x^3+x^4). [Colin Barker, Jan 25 2012]
EXAMPLE
9 is here because least k such that (9 mod k) > (11 mod k) is 5;
24 is here because least k such that (24 mod k) > (26 mod k) is 5.
MATHEMATICA
Table[15*n-9-3*Cos[(n*Pi)/2]+3*Sin[(n*Pi)/2], {n, 60}]
LinearRecurrence[{2, -2, 2, -1}, {9, 24, 33, 48}, 60] (* Harvey P. Dale, Mar 28 2013 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Sep 07 2006
STATUS
approved