A353284 Consider the number of divisors tau(k) of every composite k between prime p >= 3 and the next prime; if the largest tau(k) is a prime power, then p is in the sequence.
3, 5, 7, 13, 23, 29, 31, 37, 41, 53, 61, 67, 73, 97, 101, 103, 113, 127, 137, 163, 167, 181, 193, 199, 211, 229, 241, 263, 269, 277, 281, 311, 317, 353, 373, 383, 401, 421, 433, 439, 461, 509, 541, 547, 569, 593, 601, 613, 617, 631, 641, 677, 701, 709, 727, 743, 757, 769, 821, 839, 857, 887
Offset: 1
Examples
13 is a term because up to the next prime 17, tau(14) = 4, tau(15) = 4, tau(16) = 5, thus the greatest tau(k) is 5 and 5 is a prime power (5^1). 23 is a term because up to the next prime 29, tau(24) = 8, tau(25) = 3, tau(26) = 4, tau(27) = 4, tau(28) = 6, thus the greatest tau(k) is 8 and 8 is a prime power (2^3). 79 is prime but not a term because up to the next prime 83, tau(80) = 10, tau(81) = 5, tau(82) = 4, thus the greatest tau(k) is 10 and 10 is not a prime power.
Programs
-
Mathematica
Select[Prime[Range[2, 155]], PrimePowerQ[Max[DivisorSigma[0, Range[# + 1, NextPrime[#] - 1]]]] &] (* Amiram Eldar, Jun 10 2022 *)
-
PARI
forprime(p=3,2000,my(v=vector(nextprime(p+1)-p-1,k,numdiv(p+k))); if(isprimepower(vecmax(v)), print1(p", ")))