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.

This page as a plain text file.
%I A381665 #16 Mar 04 2025 04:58:59
%S A381665 1,12,24,36,40,45,48,60,72,80,90,96,120,144,160,180,192,210,216,224,
%T A381665 240,252,270,280,288,315,320,336,360,378,420,432,448,480,504,540,560,
%U A381665 576,630,640,672,720,756,840,864,896,945,960,1008,1080,1120,1134,1152,1200,1260,1280,1296
%N A381665 Integers k such that prime(k)!/k^k is an integer.
%H A381665 Michel Marcus, <a href="/A381665/b381665.txt">Table of n, a(n) for n = 1..211</a>
%t A381665 Select[Range[1296],IntegerQ[Prime[#]!/#^#]&] (* _James C. McMahon_, Mar 03 2025 *)
%o A381665 (PARI) isok(k) = Mod(prime(k)!, k^k) == 0;
%o A381665 (Python)
%o A381665 from collections import Counter
%o A381665 from itertools import count, islice
%o A381665 from sympy import prime, factorint
%o A381665 def A381665_gen(): # generator of terms
%o A381665     c, p = Counter(), 1
%o A381665     for k in count(1):
%o A381665         q, m = prime(k), Counter({a:b*k for a, b in factorint(k).items()})
%o A381665         c += sum((Counter(factorint(i)) for i in range(p+1,q+1)),start=Counter())
%o A381665         if m<=c:
%o A381665             yield k
%o A381665         p = q
%o A381665 A381665_list = list(islice(A381665_gen(),57)) # _Chai Wah Wu_, Mar 03 2025
%Y A381665 Cf. A000312, A039716.
%K A381665 nonn
%O A381665 1,2
%A A381665 _Michel Marcus_, Mar 03 2025