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.

A267574 Number of nontrivial prime powers p^k (k>1) less than 10^n.

This page as a plain text file.
%I A267574 #35 Aug 16 2024 06:09:00
%S A267574 3,10,25,51,108,236,555,1404,3689,10084,28156,80070,230567,670121,
%T A267574 1962689,5782467,17124205,50930439,152043591,455389239,1367883343,
%U A267574 4119448336,12434731101,37613760489,113995567274,346090346046,1052421430208,3205047877403,9774085385959,29845027519170,91239740502962,279240320955782,855506687516860,2623565774949376
%N A267574 Number of nontrivial prime powers p^k (k>1) less than 10^n.
%C A267574 Computed up to 10^19 by program. The program was written in C, and is rather long. It starts by finding all prime numbers up to 4*10^9, then uses that to count all powers of these primes up to 10^19.
%H A267574 Chai Wah Wu, <a href="/A267574/b267574.txt">Table of n, a(n) for n = 1..48</a>
%H A267574 Daniel Mondot, <a href="http://www.prise2tete.fr/forum/viewtopic.php?pid=190171">Math puzzle about Least Common Multiple (french:PPCM)</a>
%e A267574 For n=1, there are 3 powers of prime numbers less than 10^1: 2^2, 2^3 and 3^2. i.e. 4, 8, 9.
%e A267574 For n=2, there are 10 powers of prime numbers less than 10^2: 4, 8, 9, 16, 25, 27, 32, 49, 64, 81.
%t A267574 a[n_] := Sum[PrimePi [10^(n/k)], {k, 2, n * Log2[10]}]; Array[a, 20] (* _Giovanni Resta_, Apr 09 2016 *)
%o A267574 (SageMath)
%o A267574 def A267574(n):
%o A267574     gen = (p for p in srange(2, 10^n) if p.is_prime_power() and not p.is_prime())
%o A267574     return sum(1 for _ in gen)
%o A267574 print([A267574(n) for n in range(1, 7)])  # _Peter Luschny_, Sep 16 2023
%o A267574 (Python)
%o A267574 from sympy import primepi, integer_nthroot
%o A267574 def A267574(n): return int(sum(primepi(integer_nthroot(10**n,k)[0]) for k in range(2,(10**n).bit_length()))) # _Chai Wah Wu_, Aug 14 2024
%Y A267574 Cf. A246547, A006880.
%K A267574 nonn
%O A267574 1,1
%A A267574 _Daniel Mondot_, Jan 17 2016
%E A267574 a(20)-a(26) from _Chai Wah Wu_, Jan 25 2016
%E A267574 a(27)-a(34) from _Giovanni Resta_, Apr 09 2016