OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
Jose María Grau, Antonio M. Oller-Marcen, Power sums over commutative and unitary rings, arXiv:1603.05787 [math.RA], 2016.
EXAMPLE
12 = 2^2 * 3 is a term because 12/2^2 = 3 == 1 (mod 2) and 12/3 = 4 == 1 (mod 3). - Michael B. Porter, Jul 24 2016
MATHEMATICA
fa = FactorInteger; test[n_] := Union@Table[Mod[n/fa[n][[i, 1]]^(fa[n][[i, 2]]), fa[n][[ i, 1]]] == 1, {i, Length[fa[n]]}] == {True}; Select[Range[1000], test]
PROG
(PARI) isok(n) = {f = factor(n); for (k=1, #f~, if (n/f[k, 1]^f[k, 2] % f[k, 1] != 1, return (0)); ); 1; } \\ Michel Marcus, Jul 25 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
José María Grau Ribas, Jun 14 2016
STATUS
approved