The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A368107 Prime powers p^m such that p | m. 1

%I #63 Jan 20 2024 03:16:09

%S 4,16,27,64,256,729,1024,3125,4096,16384,19683,65536,262144,531441,

%T 823543,1048576,4194304,9765625,14348907,16777216,67108864,268435456,

%U 387420489,1073741824,4294967296,10460353203,17179869184,30517578125,68719476736,274877906944,282429536481

%N Prime powers p^m such that p | m.

%C Proper subset of A072873, which in turn is a proper subset of A342090.

%C This sequence represents the prime power block in A072873 and A342090.

%C A342090 \ {a(n)} is in A126706.

%C A072873 \ {{1} U {a(n)}} is in A286708, in turn a proper subset of A001694.

%C Contains A051674.

%H Michael De Vlieger, <a href="/A368107/b368107.txt">Table of n, a(n) for n = 1..3351</a>

%F Sum_{n>=1} 1/a(n) = Sum_{n>=1} 1/A088730(n) = 0.372116188498... . - _Amiram Eldar_, Jan 20 2024

%e This sequence contains prime powers of the following form:

%e 2^2, 2^4, i.e., 2^k such that k is even.

%e 3^3, 3^6, 3^9, i.e., 3^k such that 3 | k.

%e 5^5, 5^10, 5^15, i.e., 5^k such that 5 | k, etc.

%p N:= 10^13: # for terms <= N

%p R:= NULL:

%p for i from 1 do

%p p:= ithprime(i);

%p if p^p > N then break fi;

%p R:= R, seq(p^k,k=p..floor(log[p](N)), p);

%p od:

%p sort([R]); # _Robert Israel_, Jan 16 2024

%t nn = 10^12; i = 1; p = 2; While[p^p <= nn, p = NextPrime[p] ];

%t MapIndexed[Set[S[First[#2]], #1] &, Prime@ Range@ PrimePi[p] ];

%t Union@ Reap[

%t While[j = S[i];

%t While[S[i]^j < nn,

%t Sow[S[i]^j]; j += S[i] ]; j > 2,

%t i++] ][[-1, 1]]

%o (Python)

%o import heapq

%o from itertools import islice

%o from sympy import nextprime

%o def agen(): # generator of terms

%o v, h, m, nextp = 4, [(4, 2)], 4, 3

%o while True:

%o v, p = heapq.heappop(h)

%o yield v

%o if v >= m:

%o m = nextp**nextp

%o heapq.heappush(h, (m, nextp))

%o nextp = nextprime(nextp)

%o heapq.heappush(h, (v*p**p, p))

%o print(list(islice(agen(), 31))) # _Michael S. Branicky_, Jan 16 2024

%Y Cf. A001694, A051674, A072873, A088730, A126706, A246547, A286708, A342090.

%K nonn,easy

%O 1,1

%A _Michael De Vlieger_, Jan 15 2024

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 17 06:15 EDT 2024. Contains 372579 sequences. (Running on oeis4.)