OFFSET
1,1
LINKS
Paolo Xausa, Table of n, a(n) for n = 1..1000
Wikipedia, Multiplicative Order
Index entries for linear recurrences with constant coefficients, signature (7,-11,5).
FORMULA
a(n) = 5^(n-1) + n.
From Stefano Spezia, Apr 27 2023: (Start)
O.g.f.: (1 - 5*x + 4*x^2 - 4*x^3)/((1 - x)^2*(1 - 5*x)).
E.g.f.: (4 + exp(5*x) + 5*exp(x)*x)/4. (End)
EXAMPLE
For n = 2, we begin with 1, iteratively multiply by 6 and count the terms before the last 2 digits begin to repeat. We obtain 1, 6, 36, 216, 1296, 7776, 46656, ... . The next term is 279936, which repeats the last 2 digits 36. Thus, the number of distinct terms is a(2) = 7.
MATHEMATICA
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Gil Moses, Apr 24 2023
STATUS
approved