OFFSET
1,2
LINKS
Robert Israel, Table of n, a(n) for n = 1..1000
MAPLE
filter:= proc(n) local p;
if isprime(n) or (3 &^n - 3 mod n <> 0) then return false fi;
if n::even then return true fi;
if not numtheory:-issqrfree(n) then return true fi;
for p in numtheory:-factorset(n) do
if n-1 mod (p-1) <> 0 then return true fi
od;
false
end proc:
filter(1):= true:
select(filter, [$1..10^5]); # Robert Israel, Jan 29 2017
MATHEMATICA
okQ[n_] := !PrimeQ[n] && PowerMod[3, n, n] == Mod[3, n] && Mod[n, CarmichaelLambda[n]] != 1;
Select[Range[10^5], okQ] (* Jean-François Alcover, Mar 27 2019 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Artur Jasinski, Dec 28 2008
STATUS
approved