login
Carmichael numbers whose number of prime factors is prime.
1

%I #24 Aug 28 2024 11:02:00

%S 561,1105,1729,2465,2821,6601,8911,10585,15841,29341,46657,52633,

%T 115921,162401,252601,294409,314821,334153,399001,410041,488881,

%U 512461,530881,825265,1024651,1050985,1152271,1193221,1461241,1615681,1857241,1909001,2508013,3057601,3581761,3828001

%N Carmichael numbers whose number of prime factors is prime.

%C Wright shows that this sequence is infinite on the assumption of Heath-Brown's conjecture on the first prime in an arithmetic progression. - _Charles R Greathouse IV_, Aug 05 2022, corrected by _Amiram Eldar_, Mar 25 2024

%H Amiram Eldar, <a href="/A355039/b355039.txt">Table of n, a(n) for n = 1..10280</a> (terms below 10^13)

%H D. R. Heath-Brown, <a href="https://doi.org/10.1017/S0305004100054657">Almost-primes in arithmetic progressions and short intervals</a>, Math. Proc. Cambridge Philos. Soc., Vol. 83, No. 1 (1978), pp. 357-375.

%H Thomas Wright, <a href="https://arxiv.org/abs/2206.07254">Carmichael Numbers with Prime Numbers of Prime Factors</a>, arXiv:2206.07254 [math.NT], 2022-2024.

%t Select[Range[1, 10^6, 2], CompositeQ[#] && PrimeQ[PrimeNu[#]] && Divisible[# - 1, CarmichaelLambda[#]] &] (* _Amiram Eldar_, Jun 16 2022 *)

%o (PARI) pKorselt(m) = my(f=factor(m)); for(i=1, #f[, 1], if(f[i, 2]>1||(m-1)%(f[i, 1]-1), return(0))); #f~;

%o isok(m) = (m%2) && !isprime(m) && isprime(pKorselt(m)) && (m>1);

%o (Python)

%o from itertools import islice

%o from sympy import factorint, isprime, nextprime

%o def A355039_gen(): # generator of terms

%o p, q = 3, 5

%o while True:

%o yield from (n for n in range(p+2,q,2) if max((f:=factorint(n)).values()) == 1 and not any((n-1) % (p-1) for p in f) and isprime(len(f)))

%o p, q = q, nextprime(q)

%o A355039_list = list(islice(A355039_gen(),20)) # _Chai Wah Wu_, Jun 16 2022

%Y Subsequence of A002997.

%Y Cf. A087788, A112428, A112430 (subsequences with 3, 5, 7 prime factors).

%K nonn

%O 1,1

%A _Michel Marcus_, Jun 16 2022