OFFSET
1,1
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
MATHEMATICA
fQ[n_] := !PrimeQ[n] && PowerMod[2, n - 1, n] == 1 &&
> PowerMod[3, n - 1, n] == 1 && PowerMod[5, n - 1, n] == 1 && PowerMod[7, n - 1, n] == 1 && Mod[n, CarmichaelLambda[n]] != 1; k = 1; lst = {}; While[k < 25000000001, If[ fQ@ k, AppendTo[lst, k]; Print@ k]; k += 6]; lst
PROG
(PARI) Korselt(n)=my(f=factor(n)); for(i=1, #f[, 1], if(f[i, 2]>1||(n-1)%(f[i, 1]-1), return(0))); 1
is(n)=n%6==5 && Mod(2, n)^n==2 && Mod(3, n)^n==3 && Mod(5, n)^(n-1)==1 && Mod(7, n)^(n-1)==1 && !isprime(n) && !Korselt(n) \\ Charles R Greathouse IV, Jul 29 2015
(Perl) use ntheory ":all"; foroddcomposites { say if $_%6 == 5 && is_pseudoprime($_, 2, 3, 5, 7) && $_ % carmichael_lambda($_) != 1; } 1e9; # Dana Jacobsen, Sep 07 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
a(9)-a(19) from Charles R Greathouse IV, Jul 29 2015
STATUS
approved