%I #19 Sep 08 2022 08:45:01
%S 0,1,9,10,11,19,20,21,29,30,31,39,40,41,49,50,51,59,60,61,69,70,71,79,
%T 80,81,89,90,91,99,100,101,109,110,111,119,120,121,129,130,131,139,
%U 140,141,149,150,151,159,160,161,169,170,171,179,180,181,189,190,191,199
%N Numbers that are congruent to {0, 1, 9} mod 10.
%C Numbers with last digit 0, 1, or 9. - _Wesley Ivan Hurt_, Jun 14 2016
%H Robert Israel, <a href="/A054967/b054967.txt">Table of n, a(n) for n = 1..10000</a>
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,1,-1).
%F G.f.: x^2*(x^2+8*x+1)/((x-1)^2*(x^2+x+1)). - _Robert Israel_, Feb 23 2016
%F a(n) = a(n-1) + a(n-3) - a(n-4) for n>4. - _Vincenzo Librandi_, Feb 24 2016
%F From _Wesley Ivan Hurt_, Jun 14 2016: (Start)
%F a(n) = (30*n-30+21*cos(2*n*Pi/3)+7*sqrt(3)*sin(2*n*Pi/3))/9.
%F a(3k) = 10k-1, a(3k-1) = 10k-9, a(3k-2) = 10k-10. (End)
%p seq(seq(10*i+j, j=[0,1,9]), i=0..30); # _Robert Israel_, Feb 23 2016
%t 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 *)
%o (Magma) [n: n in [0..200] | n mod 10 in [0,1,9]]; // _Vincenzo Librandi_, Feb 24 2016
%Y Cf. A047523.
%K nonn,easy
%O 1,3
%A _Henry Bottomley_, May 24 2000