%I #23 Apr 09 2023 15:38:49
%S 9,12,18,51,69,72,78,111,129,132,138,171,189,192,198,231,249,252,258,
%T 291,309,312,318,351,369,372,378,411,429,432,438,471,489,492,498,531,
%U 549,552,558,591,609,612,618,651,669,672,678,711,729,732,738,771,789
%N Last digit of F(n) is 4 where F(n) is the n-th Fibonacci number.
%C Sequence contains numbers of form (9+60k), (12+60k), (18+60k), (51+60k), with k>=0.
%H Colin Barker, <a href="/A072702/b072702.txt">Table of n, a(n) for n = 1..1000</a>
%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,1,-1).
%F G.f.: x*(9*x^4+33*x^3+6*x^2+3*x+9) / (x^5-x^4-x+1). - _Colin Barker_, Jun 16 2013
%F a(n) = (-60 + 6*(-1)^n + (9+21*i)*(-i)^n + (9-i*21)*i^n + 60*n) / 4 where i=sqrt(-1). - _Colin Barker_, Oct 16 2015
%t With[{fibs=Fibonacci[Range[800]]},Flatten[Position[fibs,_?(Last[ IntegerDigits[ #]]==4&)]]] (* _Harvey P. Dale_, Sep 24 2012 *)
%t Position[Mod[Fibonacci[Range[800]],10],4]//Flatten (* _Harvey P. Dale_, Apr 09 2023 *)
%o (PARI) a(n) = (-60 + 6*(-1)^n + (9+21*I)*(-I)^n + (9-I*21)*I^n + 60*n) / 4 \\ _Colin Barker_, Oct 16 2015
%o (PARI) Vec(x*(9*x^4+33*x^3+6*x^2+3*x+9)/(x^5-x^4-x+1) + O(x^100)) \\ _Colin Barker_, Oct 16 2015
%o (PARI) for(n=0, 1e3, if(fibonacci(n) % 10 == 4, print1(n", "))) \\ _Altug Alkan_, Oct 16 2015
%Y Cf. A000045, A003893.
%K nonn,base,easy
%O 1,1
%A _Benoit Cloitre_, Aug 07 2002