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.
%I A368107 #67 Sep 13 2024 08:03:49 %S A368107 4,16,27,64,256,729,1024,3125,4096,16384,19683,65536,262144,531441, %T A368107 823543,1048576,4194304,9765625,14348907,16777216,67108864,268435456, %U A368107 387420489,1073741824,4294967296,10460353203,17179869184,30517578125,68719476736,274877906944,282429536481 %N A368107 Prime powers p^m such that p | m. %C A368107 Proper subset of A072873, which in turn is a proper subset of A342090. %C A368107 This sequence represents the prime power block in A072873 and A342090. %C A368107 A342090 \ {a(n)} is in A126706. %C A368107 A072873 \ {{1} U {a(n)}} is in A286708, in turn a proper subset of A001694. %C A368107 Contains A051674. %H A368107 Michael De Vlieger, <a href="/A368107/b368107.txt">Table of n, a(n) for n = 1..3351</a> %F A368107 Sum_{n>=1} 1/a(n) = Sum_{n>=1} 1/A088730(n) = 0.372116188498... . - _Amiram Eldar_, Jan 20 2024 %e A368107 This sequence contains prime powers of the following form: %e A368107 2^2, 2^4, i.e., 2^k such that k is even. %e A368107 3^3, 3^6, 3^9, i.e., 3^k such that 3 | k. %e A368107 5^5, 5^10, 5^15, i.e., 5^k such that 5 | k, etc. %p A368107 N:= 10^13: # for terms <= N %p A368107 R:= NULL: %p A368107 for i from 1 do %p A368107 p:= ithprime(i); %p A368107 if p^p > N then break fi; %p A368107 R:= R, seq(p^k,k=p..floor(log[p](N)), p); %p A368107 od: %p A368107 sort([R]); # _Robert Israel_, Jan 16 2024 %t A368107 nn = 10^12; i = 1; p = 2; While[p^p <= nn, p = NextPrime[p] ]; %t A368107 MapIndexed[Set[S[First[#2]], #1] &, Prime@ Range@ PrimePi[p] ]; %t A368107 Union@ Reap[ %t A368107 While[j = S[i]; %t A368107 While[S[i]^j < nn, %t A368107 Sow[S[i]^j]; j += S[i] ]; j > 2, %t A368107 i++] ][[-1, 1]] %o A368107 (Python) %o A368107 import heapq %o A368107 from itertools import islice %o A368107 from sympy import nextprime %o A368107 def agen(): # generator of terms %o A368107 v, h, m, nextp = 4, [(4, 2)], 4, 3 %o A368107 while True: %o A368107 v, p = heapq.heappop(h) %o A368107 yield v %o A368107 if v >= m: %o A368107 m = nextp**nextp %o A368107 heapq.heappush(h, (m, nextp)) %o A368107 nextp = nextprime(nextp) %o A368107 heapq.heappush(h, (v*p**p, p)) %o A368107 print(list(islice(agen(), 31))) # _Michael S. Branicky_, Jan 16 2024 %o A368107 (Python) %o A368107 from sympy import integer_nthroot, primefactors %o A368107 def A368107(n): %o A368107 def f(x): %o A368107 c = n+x %o A368107 for k in range(1,x.bit_length()): %o A368107 m = integer_nthroot(x,k)[0] %o A368107 c -= sum(1 for p in primefactors(k) if p<=m) %o A368107 return c %o A368107 def bisection(f,kmin=0,kmax=1): %o A368107 while f(kmax) > kmax: kmax <<= 1 %o A368107 while kmax-kmin > 1: %o A368107 kmid = kmax+kmin>>1 %o A368107 if f(kmid) <= kmid: %o A368107 kmax = kmid %o A368107 else: %o A368107 kmin = kmid %o A368107 return kmax %o A368107 return bisection(f,n,n) # _Chai Wah Wu_, Sep 12 2024 %Y A368107 Cf. A001694, A051674, A072873, A088730, A126706, A246547, A286708, A342090. %K A368107 nonn,easy %O A368107 1,1 %A A368107 _Michael De Vlieger_, Jan 15 2024