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 A249370 #12 Jan 31 2025 04:27:49 %S A249370 3,5,7,11,12,13,17,19,20,23,27,28,29,31,37,41,43,44,45,47,48,52,53,59, %T A249370 61,63,67,68,71,73,75,76,79,80,83,89,92,97,99,101,103,107,108,109,112, %U A249370 113,116,117,124,125,127,131,137,139,147,148,149,151,153,157 %N A249370 Numbers p*m^2, where p is an odd prime and m >= 1, arranged in increasing order. %p A249370 N:= 1000: # to get all terms <= N %p A249370 {seq(seq(p*m^2, m = 1 .. floor(sqrt(N/p))), p = select(isprime,[2*i+1 $ i = 1..floor((N-1)/2)]))}; %p A249370 # if using Maple 11 or previous, uncomment the next line %p A249370 # sort(convert(%,list)); %p A249370 # _Robert Israel_, Oct 30 2014 %t A249370 Take[Sort[Flatten[Table[Prime[n]*m^2, {n, 2, 1000}, {m, 1, 100}]]], 100] %o A249370 (Python) %o A249370 from math import isqrt %o A249370 from sympy import primepi %o A249370 def A249370(n): %o A249370 def bisection(f,kmin=0,kmax=1): %o A249370 while f(kmax) > kmax: kmax <<= 1 %o A249370 kmin = kmax >> 1 %o A249370 while kmax-kmin > 1: %o A249370 kmid = kmax+kmin>>1 %o A249370 if f(kmid) <= kmid: %o A249370 kmax = kmid %o A249370 else: %o A249370 kmin = kmid %o A249370 return kmax %o A249370 def f(x): return n+x+(m:=isqrt(x))-sum(((k:=x//y**2)<2)+primepi(k) for y in range(1,m+1)) %o A249370 return bisection(f,n,n) # _Chai Wah Wu_, Jan 30 2025 %Y A249370 Cf. A249369, A229125. %K A249370 nonn,easy %O A249370 1,1 %A A249370 _Clark Kimberling_, Oct 26 2014