OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Alfred J. Menezes, Paul C. van Oorschot and Scott A. Vanstone, Handbook of Applied Cryptography, CRC Press, 1996.
Wikipedia, Blum Integers
Wikipedia, Euler Phi Function
FORMULA
EXAMPLE
For the first Blum integer, a(1) = phi(21) = 12.
MAPLE
N:= 1000: # to get all terms <= N
Primes:= select(isprime, [seq(4*i+3, i=0.. floor(N/12 - 3/4))]):
Pairs:= select(t -> t[1]*t[2]<=N, [seq(seq([Primes[i], Primes[j]], j=i+1..nops(Primes)), i=1..nops(Primes))]):
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
MATHEMATICA
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 *)
EulerPhi[Select[4Range[5, 197] + 1, PrimeNu[#] == 2 && MoebiusMu[#] == 1 && Mod[FactorInteger[#][[1, 1]], 4] != 1 &]] (* Alonso del Arte, Nov 18 2015 *)
PROG
(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
(Python)
from sympy import factorint, totient
def isBlum(n):
fn = factorint(n)
return len(fn) == sum(fn.values()) == 2 and all(f%4 == 3 for f in fn)
print([totient(k) for k in range(790) if isBlum(k)]) # Michael S. Branicky, Dec 20 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Connor Zapfel, Nov 17 2015
STATUS
approved