A051250 Numbers whose reduced residue system consists of 1 and prime powers only.
1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 14, 18, 20, 24, 30, 42, 60
Offset: 1
Examples
RRS[ 60 ] = {1,7,11,13,17,19,23,29,31,37,41,43,47,49,53,59}.
Links
- M. Dalezman, From 30 to 60 Is Not Twice as Hard, Mathematics Magazine, Vol. 73, No. 2 (Apr. 2000), pp. 151-153.
- O. Ore and N. J. Fine, Reduced Residue Systems, American Mathematical Monthly Vol. 66, No. 10 (Dec., 1959), pp. 926-927.
Programs
-
Haskell
a051250 n = a051250_list !! (n-1) a051250_list = filter (all ((== 1) . a010055) . a038566_row) [1..] -- Reinhard Zumkeller, May 27 2015, Dec 18 2011, Oct 27 2010
-
Mathematica
fQ[n_] := Union[# == 1 || Mod[#, # - EulerPhi[#]] == 0 & /@ Select[ Range@ n, GCD[#, n] == 1 &]] == {True}; Select[ Range@ 100, fQ] (* Robert G. Wilson v, Jul 11 2011 *)
-
PARI
isprimepower(n)=ispower(n,,&n);isprime(n) is(n)=for(k=2,n-1,if(gcd(n,k)==1&&!isprimepower(k),return(0)));1 \\ Charles R Greathouse IV, Jul 14 2011
Comments