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,2,0,0,-1).
FORMULA
From Colin Barker, Mar 23 2017: (Start)
G.f.: 3*x*(4 + 7*x + x^2 + 6*x^3 + 3*x^4) / ((1 - x)^2*(1 + x + x^2)^2).
a(n) = 2*a(n-3) - a(n-6) for n>6.
(End)
MATHEMATICA
Table[If[Mod[n, 3]==0, n, 10n+3-Mod[n, 3]], {n, 56}] (* Ray Chandler, Feb 09 2014 *)
With[{m3=3*Range[1000]}, Table[SelectFirst[m3, Take[IntegerDigits[#], Min[ IntegerLength[#], IntegerLength[n]]]==IntegerDigits[n]&], {n, 60}]] (* The program uses the SelectFirst function from Mathematica version 10 *) (* Harvey P. Dale, Dec 23 2014 *)
PROG
(PARI) Vec(3*x*(4 + 7*x + x^2 + 6*x^3 + 3*x^4) / ((1 - x)^2*(1 + x + x^2)^2) + O(x^60)) \\ Colin Barker, Mar 23 2017
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Amarnath Murthy, Apr 20 2003
EXTENSIONS
Extended by Ray Chandler, Feb 09 2014
STATUS
approved