OFFSET
1,5
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
FORMULA
Empirical g.f.: -x^2*(x^17-x^14-3*x^12-x^11-3*x^9-9*x^8-x^6-4*x^5-4*x^3-x^2-1) / (x^18 -2*x^9 +1). - Colin Barker, Jun 20 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[9, n], {n, 1, 122}]
(* Second program: *)
Table[If[Mod[n, 3] == 0, 0, ModularInverse[9, n], 0], {n, 1, 100}] (* Jean-François Alcover, Mar 14 2023 *)
PROG
(PARI) a(n)=if(n%3, lift(Mod(1, n)/9), 0) \\ Charles R Greathouse IV, Jun 18 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
José María Grau Ribas, Jun 18 2013
STATUS
approved