login
A344121
a(n) is the multiplicative inverse of 24 (mod 7^n).
1
5, 47, 243, 2301, 11905, 112747, 583343, 5524601, 28583805, 270705447, 1400606443, 13264566901, 68629715705, 649963778147, 3362856069543, 31848225129201, 164779947407605, 1560563031330847, 8074217422972643, 76467588535211501, 395636653725659505, 3746911838225363547, 19386196032557315743
OFFSET
1,1
COMMENTS
24 * a(n) == 1 (mod 7^n).
LINKS
FORMULA
a(n) = (17*7^n+1)/24 for n odd; a(n) = (23*7^n+1)/24 for n even.
G.f.: x*(5 + 42*x - 49*x^2)/(1 - x - 49*x^2 + 49*x^3). - Stefano Spezia, May 12 2021
EXAMPLE
a(1) = 5 because 24 * 5 == 1 (mod 7^1).
MATHEMATICA
LinearRecurrence[{1, 49, -49}, {5, 47, 243}, 23] (* Amiram Eldar, May 11 2021 *)
PROG
(PARI) a(n) = if(n%2 == 1, (17*7^n+1)/24, (23*7^n+1)/24);
(PARI) a(n) = lift(1/Mod(24, 7^n)) \\ Andrew Howroyd, May 11 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Washington Bomfim, May 11 2021
STATUS
approved