OFFSET
1,2
COMMENTS
From Robert Israel, Jan 06 2016: (Start)
All terms except 1 and 2 are divisible by 6.
The only squarefree terms are 1, 2, 6, 42, 1806. (End)
LINKS
Robert Israel, Table of n, a(n) for n = 1..4000
EXAMPLE
60 is a term since 60 = 2^2*3*5 and is divisible by 2^2-1, 3-1 and 5-1.
MAPLE
filter:= proc(n) local t;
for t in ifactors(n)[2] do
if n mod (t[1]^t[2]-1) <> 0 then return false fi
od;
true
end proc:
select(filter, [$1..10^5]); # Robert Israel, Jan 06 2016
MATHEMATICA
fa=FactorInteger; G[n_] := Union@Table[IntegerQ[n/(fa[n][[i, 1]]^fa[n][[i, 2]] - 1)], {i, Length[fa[n]]}] === {True}; Select[Range[20000], G]
PROG
(PARI) isok(n) = {my(f = factor(n)); for (k=1, #f~, if ((n % (f[k, 1]^f[k, 2]-1)), return (0)); ); return (1); } \\ Michel Marcus, Jan 04 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
José María Grau Ribas, Dec 20 2015
STATUS
approved