OFFSET
1,2
COMMENTS
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
MAPLE
q:= n-> is(not isprime(n) and (9 &^ n mod n) = (9 mod n)):
select(q, [$1..3000])[]; # Alois P. Heinz, Mar 06 2019
MATHEMATICA
Select[Range[4000], ! PrimeQ[ # ] && Mod[9^#, # ] == Mod[9, # ] &]
Join[{1, 4, 6, 8, 9}, Select[Range[3000], CompositeQ[#]&&PowerMod[9, #, #]==9&]] (* Harvey P. Dale, Jul 17 2014 *)
PROG
(PARI) isok(n) = !isprime(n) && (Mod(9, n)^n == Mod(9, n)); \\ Michel Marcus, Mar 06 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Farideh Firoozbakht, Sep 12 2006
STATUS
approved