OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,2,0,0,0,0,0,-1).
FORMULA
G.f.: 6*x*(2 +4*x +5*x^2 +7*x^3 +9*x^4 +x^5 +8*x^6 +6*x^7 +5*x^8 +3*x^9 +x^10) / ((1-x)^2*(1+x)^2*(1-x+x^2)^2*(1+x+x^2)^2). [Bruno Berselli, Nov 12 2012]
a(n) = (9*t+1)*n + 2*t*(n mod 3), where t=1-A079979(n). [Bruno Berselli, Nov 12 2012]
MATHEMATICA
Table[If[Divisible[n, 6], n, First[Select[10n+{0, 2, 4}, Divisible[ #, 6]&]]], {n, 100}] (* Harvey P. Dale, Nov 12 2012 *)
Table[If[Mod[n, 6]==0, n, If[Mod[10 n, 6]==0, 10 n, 10 n + 6 - Mod[10 n, 6]]], {n, 60}] (* Vincenzo Librandi, Feb 10 2014 *)
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Amarnath Murthy, Apr 20 2003
EXTENSIONS
More terms from Harvey P. Dale, Nov 11 2012
STATUS
approved