|
|
|
|
|
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
|
|
|
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
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|