OFFSET
1,1
COMMENTS
Sequence contains numbers of form (9+60k), (12+60k), (18+60k), (51+60k), with k>=0.
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,0,0,1,-1).
FORMULA
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
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
MATHEMATICA
With[{fibs=Fibonacci[Range[800]]}, Flatten[Position[fibs, _?(Last[ IntegerDigits[ #]]==4&)]]] (* Harvey P. Dale, Sep 24 2012 *)
Position[Mod[Fibonacci[Range[800]], 10], 4]//Flatten (* Harvey P. Dale, Apr 09 2023 *)
PROG
(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
(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
(PARI) for(n=0, 1e3, if(fibonacci(n) % 10 == 4, print1(n", "))) \\ Altug Alkan, Oct 16 2015
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Benoit Cloitre, Aug 07 2002
STATUS
approved