OFFSET
1,2
COMMENTS
If n = p_1^s_1...p_m^s_m and R = F_{p_1^s_1} X ... X F_{p_m^s_m} n is in the sequence if and only if the sum of n-th powers over R is -1.
LINKS
Jose María Grau, A. M. Oller-Marcen, Power sums over commutative and unitary rings, arXiv:1603.05787 [math.RA], 2016. See Theorem 4.
MATHEMATICA
fa[n_]:=fa[n]=FactorInteger[n]; tes1[n_] := Union@Table[ IntegerQ[n/(fa[n][[i, 1]]^fa[n][[i, 2]] - 1)], {i, Length[fa[n]]}] == {True}; G[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[40000], tes1[#]&&G[#]&]
(* or *)
ok[n_] := n==1 || Block[{f = FactorInteger@n, p}, p = Power @@@ f; And @@ IntegerQ /@ (n/(p-1)) && Union@ Mod[n/p, First /@ f] == {1}]; Select[Range@ 80000, ok] (* Giovanni Resta, Mar 10 2017 *)
PROG
(PARI) isok(n) = {my(f = factor(n)); for (k=1, #f~, kf = f[k, 1]^f[k, 2]; if ((n % (kf-1)) || ((n/kf % f[k, 1]) != 1), return (0)); ); 1; } \\ Michel Marcus, Jul 25 2016
CROSSREFS
KEYWORD
nonn,more
AUTHOR
José María Grau Ribas, Jun 14 2016
EXTENSIONS
a(1)=1 prepended and a(6)-a(7) from Michel Marcus, Jul 25 2016
a(8) from Giovanni Resta, Mar 10 2017
STATUS
approved