OFFSET
1,3
COMMENTS
Numbers with last digit 0, 1, or 9. - Wesley Ivan Hurt, Jun 14 2016
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Index entries for linear recurrences with constant coefficients, signature (1,0,1,-1).
FORMULA
G.f.: x^2*(x^2+8*x+1)/((x-1)^2*(x^2+x+1)). - Robert Israel, Feb 23 2016
a(n) = a(n-1) + a(n-3) - a(n-4) for n>4. - Vincenzo Librandi, Feb 24 2016
From Wesley Ivan Hurt, Jun 14 2016: (Start)
a(n) = (30*n-30+21*cos(2*n*Pi/3)+7*sqrt(3)*sin(2*n*Pi/3))/9.
a(3k) = 10k-1, a(3k-1) = 10k-9, a(3k-2) = 10k-10. (End)
MAPLE
seq(seq(10*i+j, j=[0, 1, 9]), i=0..30); # Robert Israel, Feb 23 2016
MATHEMATICA
Select[Range[0, 200], MemberQ[{0, 1, 9}, Mod[#, 10]] &] (* or *) LinearRecurrence[{1, 0, 1, -1}, {0, 1, 9, 10}, 60] (* Vincenzo Librandi, Feb 24 2016 *)
PROG
(Magma) [n: n in [0..200] | n mod 10 in [0, 1, 9]]; // Vincenzo Librandi, Feb 24 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Henry Bottomley, May 24 2000
STATUS
approved