login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A353285
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 square, then p is in the sequence.
5
5, 7, 31, 97, 113, 167, 193, 199, 211, 263, 269, 277, 311, 317, 373, 383, 401, 439, 461, 509, 541, 547, 569, 593, 613, 631, 677, 701, 709, 727, 743, 757, 769, 857, 907, 941, 947, 1021, 1031, 1063, 1123, 1153, 1217, 1229, 1249, 1259, 1283, 1289, 1291, 1301, 1321, 1361
OFFSET
1,1
EXAMPLE
97 is a term because up to the next prime 101, tau(98) = 6, tau(99) = 6, tau(100) = 9, thus the greatest tau is 9 and 9 is a square (3^2).
127 is prime but not a term because up to the next prime 131, tau(128) = 8, tau(129) = 4, tau(130) = 8, thus the greatest tau(k) is 8 and 8 is not a square.
MATHEMATICA
Select[Prime[Range[2, 220]], IntegerQ[Sqrt[Max[DivisorSigma[0, Range[# + 1, NextPrime[#] - 1]]]]] &] (* Amiram Eldar, Jun 10 2022 *)
PROG
(PARI) forprime(p=3, 2000, my(v=vector(nextprime(p+1)-p-1, k, numdiv(p+k))); if(ispower(vecmax(v), 2), print1(p", ")))
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved