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”).
%I #34 Jun 11 2022 03:35:31
%S 5,7,31,97,113,167,193,199,211,263,269,277,311,317,373,383,401,439,
%T 461,509,541,547,569,593,613,631,677,701,709,727,743,757,769,857,907,
%U 941,947,1021,1031,1063,1123,1153,1217,1229,1249,1259,1283,1289,1291,1301,1321,1361
%N 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.
%e 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).
%e 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.
%t Select[Prime[Range[2, 220]], IntegerQ[Sqrt[Max[DivisorSigma[0, Range[# + 1, NextPrime[#] - 1]]]]] &] (* _Amiram Eldar_, Jun 10 2022 *)
%o (PARI) forprime(p=3,2000,my(v=vector(nextprime(p+1)-p-1,k,numdiv(p+k))); if(ispower(vecmax(v),2), print1(p", ")))
%Y Cf. A000005, A000040, A000290.
%Y Cf. A353284, A353286.
%K nonn,easy
%O 1,1
%A _Claude H. R. Dequatre_, Apr 09 2022