login
A226786
If n=0 (mod 2) then a(n)=0, otherwise a(n)=8^(-1) in Z/nZ*.
4
0, 0, 2, 0, 2, 0, 1, 0, 8, 0, 7, 0, 5, 0, 2, 0, 15, 0, 12, 0, 8, 0, 3, 0, 22, 0, 17, 0, 11, 0, 4, 0, 29, 0, 22, 0, 14, 0, 5, 0, 36, 0, 27, 0, 17, 0, 6, 0, 43, 0, 32, 0, 20, 0, 7, 0, 50, 0, 37, 0, 23, 0, 8, 0, 57, 0, 42
OFFSET
1,3
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
FORMULA
G.f.: -x^3*(x^14-x^10-3*x^8-8*x^6-x^4-2*x^2-2)/(x^16-2*x^8+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[8, n], {n, 1, 122}]
(* Second program: *)
Table[If[EvenQ[n], 0, ModularInverse[8, n], 0], {n, 1, 100}] (* Jean-François Alcover, Mar 14 2023 *)
PROG
(PARI) a(n)=if(n%2, lift(Mod(1, n)/8), 0) \\ Charles R Greathouse IV, Jun 18 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved