primes less than n and relatively prime to n
Artur
grafix at csl.pl
Fri Jan 19 18:40:53 CET 2007
3 another definition of sequences look that same sequences. Any comment ?
ARTUR
A045572 Odd but not divisible by 5.
A085820 Possible two-digit endings of primes (with leading zeros).
A...... primes less than n and relatively prime to n
RelativePrimes[n_Integer] /; n > 2 := Fold[Complement[#, #2] &,
Range[2, n - 1], (Range[#, n - 1, #]) & /@ First[
Transpose[FactorInteger[n]]]]
RelativePrimes[100]
{3, 7, 9, 11, 13, 17, 19, 21, 23, 27, 29, 31, 33, 37, 39, 41, 43, 47, 49,
51,
53, 57, 59, 61, 63, 67, 69, 71, 73, 77, 79, 81, 83, 87, 89, 91, 93, 97, 99}
More information about the SeqFan
mailing list