OFFSET
0,1
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 0..10000
Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,2,0,0,0,0,0,-1).
FORMULA
From Robert Israel, Aug 05 2019: (Start)
If 6 | n then a(n) = 12*n+6
else if 3 | n then a(n) = 3*n+6
else if 2 | n then a(n) = 2*n+6
else a(n) = n+6.
a(n) = 2*a(n-6) - a(n-12).
G.f.: (6 + 7*x + 14*x^2 + 15*x^3 + 22*x^4 + 11*x^5 + 66*x^6 - x^7 + 10*x^8 + 3*x^9 + 2*x^10 - 5*x^11)/(1 - 2*x^6 + x^12). (End)
MAPLE
f:= proc(n) if n mod 6 = 0 then 12*n+6 elif n::even then 4*n+6 elif n mod 3 = 0 then 3*n+6 else n+6 fi end proc:
map(f, [$0..100]); # Robert Israel, Aug 05 2019
MATHEMATICA
aa = {}; Do[k = 1; While[Numerator[(k - 6)/(2 k)] != n, k++ ]; AppendTo[aa, k], {n, 0, 100}]; aa
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Artur Jasinski, Oct 29 2008
STATUS
approved