%I #50 Dec 20 2021 09:42:53
%S 12,20,36,44,60,60,84,108,92,132,116,132,180,140,180,156,164,220,252,
%T 204,212,276,300,252,260,348,276,396,300,396,420,324,420,332,460,356,
%U 468,380,492,540,396,420,580,444,452,660,476,612,660,636,500,700,524
%N Totients of the Blum integers.
%H Robert Israel, <a href="/A260905/b260905.txt">Table of n, a(n) for n = 1..10000</a>
%H Alfred J. Menezes, Paul C. van Oorschot and Scott A. Vanstone, <a href="http://www.cacr.math.uwaterloo.ca/hac/">Handbook of Applied Cryptography</a>, CRC Press, 1996.
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Blum_integer">Blum Integers</a>
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Euler's_totient_function">Euler Phi Function</a>
%F a(n) = phi(Blum(n)) = A000010(A016105(n)), where phi(n) is Euler's totient function and Blum(n) is the n-th Blum integer.
%F a(n) = (A195758(n)-1)*(A195759(n)-1). - _Jianing Song_, Sep 16 2019
%e For the first Blum integer, a(1) = phi(21) = 12.
%p N:= 1000: # to get all terms <= N
%p Primes:= select(isprime, [seq(4*i+3, i=0.. floor(N/12 - 3/4))]):
%p Pairs:= select(t -> t[1]*t[2]<=N, [seq(seq([Primes[i],Primes[j]],j=i+1..nops(Primes)),i=1..nops(Primes))]):
%p map(t -> (t[1]-1)*(t[2]-1), sort(Pairs,(s,t) -> s[1]*s[2] < t[1]*t[2])); # _Robert Israel_, Nov 18 2015
%t EulerPhi@ With[{lim = 820}, Select[Union[Times @@@ Subsets[Select[Prime@ Range@ PrimePi@ NextPrime[lim/3], Mod[#, 4] == 3 &], {2}]], # <= lim &]] (* _Michael De Vlieger_, Nov 18 2015, after _Harvey P. Dale_ at A016105 *)
%t EulerPhi[Select[4Range[5, 197] + 1, PrimeNu[#] == 2 && MoebiusMu[#] == 1 && Mod[FactorInteger[#][[1, 1]], 4] != 1 &]] (* _Alonso del Arte_, Nov 18 2015 *)
%o (Perl) use ntheory ":all"; forcomposites { say euler_phi($_) if ($_ % 4) == 1 && is_square_free($_) && scalar(factor($_)) == 2 && !scalar(grep { ($_ % 4) != 3 } factor($_)); } 1000; # _Dana Jacobsen_, Dec 10 2015
%o (Python)
%o from sympy import factorint, totient
%o def isBlum(n):
%o fn = factorint(n)
%o return len(fn) == sum(fn.values()) == 2 and all(f%4 == 3 for f in fn)
%o print([totient(k) for k in range(790) if isBlum(k)]) # _Michael S. Branicky_, Dec 20 2021
%Y Cf. A000010, A016105, A195758, A195759.
%K nonn,easy
%O 1,1
%A _Connor Zapfel_, Nov 17 2015
|