OFFSET
1,3
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,2,0,0,0,0,-1).
FORMULA
G.f.: -x^2*(x^9-x^6-x^5-5*x^4-x^2-2*x-1) / ( (x-1)^2*(x^4+x^3+x^2+x+1)^2 ). - Colin Barker, Jun 20 2013
a(5n+1) = A016813(n), n>0. a(5n+2)= A005408(n), n>0. a(5n+3) = A016789(n). a(5n+4)=n+1. - R. J. Mathar, Jun 28 2013
a(n) = Sum_{k=1..n} k*(floor((5k-1)/n)-floor((5k-2)/n)), n>1. - Anthony Browne, Jun 19 2016
MAPLE
A226783 := proc(n)
local x ;
a := 5 ;
m := 5 ;
if n mod m = 0 or n = 1 then
0;
else
msolve(x*a=1, n) ;
op(%) ;
op(2, %) ;
end if;
end proc: # R. J. Mathar, Jun 28 2013
MATHEMATICA
Inv[a_, mod_] := Which[mod == 1, 0, GCD[a, mod] > 1, 0, True, Last@Reduce[a*x == 1, x, Modulus -> mod]]; Table[Inv[5, n], {n, 1, 122}]
CoefficientList[Series[-x^2(x^9-x^6-x^5-5x^4-x^2-2x-1)/((x-1)^2 (x^4+ x^3+ x^2+ x+ 1)^2), {x, 0, 120}], x] (* Harvey P. Dale, Oct 08 2016 *)
Table[If[Mod[n, 5]==0, 0, ModularInverse[5, n]], {n, 1, 100}] (* Jean-François Alcover, Mar 14 2023 *)
PROG
(PARI) a(n)=if(n%5, lift(Mod(1, n)/5), 0) \\ Charles R Greathouse IV, Jun 18 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
José María Grau Ribas, Jun 18 2013
STATUS
approved