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.

A381665 Integers k such that prime(k)!/k^k is an integer.

Original entry on oeis.org

1, 12, 24, 36, 40, 45, 48, 60, 72, 80, 90, 96, 120, 144, 160, 180, 192, 210, 216, 224, 240, 252, 270, 280, 288, 315, 320, 336, 360, 378, 420, 432, 448, 480, 504, 540, 560, 576, 630, 640, 672, 720, 756, 840, 864, 896, 945, 960, 1008, 1080, 1120, 1134, 1152, 1200, 1260, 1280, 1296
Offset: 1

Views

Author

Michel Marcus, Mar 03 2025

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[1296],IntegerQ[Prime[#]!/#^#]&] (* James C. McMahon, Mar 03 2025 *)
  • PARI
    isok(k) = Mod(prime(k)!, k^k) == 0;
    
  • Python
    from collections import Counter
    from itertools import count, islice
    from sympy import prime, factorint
    def A381665_gen(): # generator of terms
        c, p = Counter(), 1
        for k in count(1):
            q, m = prime(k), Counter({a:b*k for a, b in factorint(k).items()})
            c += sum((Counter(factorint(i)) for i in range(p+1,q+1)),start=Counter())
            if m<=c:
                yield k
            p = q
    A381665_list = list(islice(A381665_gen(),57)) # Chai Wah Wu, Mar 03 2025