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.

A246550 Prime powers p^e where p is a prime and e >= 4.

This page as a plain text file.
%I A246550 #19 Sep 12 2024 11:29:26
%S A246550 16,32,64,81,128,243,256,512,625,729,1024,2048,2187,2401,3125,4096,
%T A246550 6561,8192,14641,15625,16384,16807,19683,28561,32768,59049,65536,
%U A246550 78125,83521,117649,130321,131072,161051,177147,262144,279841,371293,390625,524288,531441,707281,823543,923521,1048576,1419857,1594323,1771561
%N A246550 Prime powers p^e where p is a prime and e >= 4.
%H A246550 Jens Kruse Andersen, <a href="/A246550/b246550.txt">Table of n, a(n) for n = 1..10000</a>
%F A246550 Sum_{n>=1} 1/a(n) = Sum_{p prime} 1/(p^3*(p-1)) = 0.1461466097... - _Amiram Eldar_, Oct 24 2020
%p A246550 N:= 10^7: # to get all terms <= N
%p A246550 {seq(seq(p^m, m=4..floor(log[p](N))), p = select(isprime,[2,seq(2*i+1,i=1..floor(N^(1/4)))]))}; # _Robert Israel_, Aug 29 2014
%t A246550 With[{max = 10^6}, Sort @ Flatten @ Table[p^Range[4, Floor[Log[p, max]]], {p, Select[Range[Surd[max, 4]], PrimeQ]}]] (* _Amiram Eldar_, Oct 24 2020 *)
%o A246550 (PARI) m=10^7; v=[]; forprime(p=2, m^(1/4), e=4; while(p^e<=m, v=concat(v, p^e); e++)); v=vecsort(v) \\ _Jens Kruse Andersen_, Aug 29 2014
%o A246550 (Python)
%o A246550 from math import isqrt
%o A246550 from sympy import primerange, integer_nthroot, primepi
%o A246550 def A246550(n):
%o A246550     def g(x,a,b,c,m): yield from (((d,) for d in enumerate(primerange(b+1,isqrt(x//c)+1),a+1)) if m==2 else (((a2,b2),)+d for a2,b2 in enumerate(primerange(b+1,integer_nthroot(x//c,m)[0]+1),a+1) for d in g(x,a2,b2,c*b2,m-1)))
%o A246550     def f(x): return int(n+x-sum(primepi(integer_nthroot(x, k)[0]) for k in range(4, x.bit_length())))
%o A246550     def bisection(f,kmin=0,kmax=1):
%o A246550         while f(kmax) > kmax: kmax <<= 1
%o A246550         while kmax-kmin > 1:
%o A246550             kmid = kmax+kmin>>1
%o A246550             if f(kmid) <= kmid:
%o A246550                 kmax = kmid
%o A246550             else:
%o A246550                 kmin = kmid
%o A246550         return kmax
%o A246550     return bisection(f,n,n) # _Chai Wah Wu_, Sep 12 2024
%Y A246550 Cf. A000961, A246547, A246549, A168363.
%K A246550 nonn
%O A246550 1,1
%A A246550 _Joerg Arndt_, Aug 29 2014