cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A355039 Carmichael numbers whose number of prime factors is prime.

Original entry on oeis.org

561, 1105, 1729, 2465, 2821, 6601, 8911, 10585, 15841, 29341, 46657, 52633, 115921, 162401, 252601, 294409, 314821, 334153, 399001, 410041, 488881, 512461, 530881, 825265, 1024651, 1050985, 1152271, 1193221, 1461241, 1615681, 1857241, 1909001, 2508013, 3057601, 3581761, 3828001
Offset: 1

Views

Author

Michel Marcus, Jun 16 2022

Keywords

Comments

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

Crossrefs

Subsequence of A002997.
Cf. A087788, A112428, A112430 (subsequences with 3, 5, 7 prime factors).

Programs

  • Mathematica
    Select[Range[1, 10^6, 2], CompositeQ[#] && PrimeQ[PrimeNu[#]] && Divisible[# - 1, CarmichaelLambda[#]] &] (* Amiram Eldar, Jun 16 2022 *)
  • 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~;
    isok(m) = (m%2) && !isprime(m) && isprime(pKorselt(m)) && (m>1);
    
  • Python
    from itertools import islice
    from sympy import factorint, isprime, nextprime
    def A355039_gen(): # generator of terms
        p, q = 3, 5
        while True:
            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)))
            p, q = q, nextprime(q)
    A355039_list = list(islice(A355039_gen(),20)) # Chai Wah Wu, Jun 16 2022