OFFSET
1,2
COMMENTS
2*p^2 is in the sequence for all primes except those in A066775.
LINKS
David Applegate, First 48186 terms of A066721
David Applegate, C program for computing this sequence
David Applegate, First 48186 terms of A066721 and their factorizations
MATHEMATICA
s={1}; xok := Module[ {}, For[ i=1, i<=n, i++, For[ j=1; k=Length[ dl=Divisors[ s[[ i ]]x ]], j<=k, j++; k--, If[ MemberQ[ s, dl[[ j ] ]]&&MemberQ[ s, dl[[ k ] ]], Return[ False ]] ]]; True ]; For[ n=1, True, n++, If[ !PrimeQ[ s[[ n ] ]], Print[ s[[ n ]] ]]; For[ x=s[[ n ]]+1, True, x++, If[ xok, AppendTo[ s, x ]; Break[ ]] ]]
PROG
(PARI) {a066721(m) = local(a, rat, n, s, new, b, i, k, j); a=[]; rat=Set([]); n=0; s=0; while(s<m, s++; new=Set([]); b=1; i=1; while(b&&i<=n, k=s/a[i]; if(setsearch(rat, k), b=0, new=setunion(new, Set(k)); k=a[i]/s; if(setsearch(rat, k), b=0, new=setunion(new, Set(k)) )); i++); if(b, rat=setunion(rat, new); a=concat(a, s); n++; if(!isprime(s), print1(s, ", "))))} a066721(3000) \\ Klaus Brockhaus, Feb 23 2002
(Haskell)
a066721 n = a066721_list !! (n-1)
a066721_list = filter ((== 0) . a010051') a066720_list
-- Reinhard Zumkeller, Nov 19 2013
CROSSREFS
KEYWORD
nonn,nice
AUTHOR
N. J. A. Sloane, Jan 15 2002
EXTENSIONS
STATUS
approved