A249370
Numbers p*m^2, where p is an odd prime and m >= 1, arranged in increasing order.
Original entry on oeis.org
3, 5, 7, 11, 12, 13, 17, 19, 20, 23, 27, 28, 29, 31, 37, 41, 43, 44, 45, 47, 48, 52, 53, 59, 61, 63, 67, 68, 71, 73, 75, 76, 79, 80, 83, 89, 92, 97, 99, 101, 103, 107, 108, 109, 112, 113, 116, 117, 124, 125, 127, 131, 137, 139, 147, 148, 149, 151, 153, 157
Offset: 1
-
N:= 1000: # to get all terms <= N
{seq(seq(p*m^2, m = 1 .. floor(sqrt(N/p))), p = select(isprime,[2*i+1 $ i = 1..floor((N-1)/2)]))};
# if using Maple 11 or previous, uncomment the next line
# sort(convert(%,list));
# Robert Israel, Oct 30 2014
-
Take[Sort[Flatten[Table[Prime[n]*m^2, {n, 2, 1000}, {m, 1, 100}]]], 100]
-
from math import isqrt
from sympy import primepi
def A249370(n):
def bisection(f,kmin=0,kmax=1):
while f(kmax) > kmax: kmax <<= 1
kmin = kmax >> 1
while kmax-kmin > 1:
kmid = kmax+kmin>>1
if f(kmid) <= kmid:
kmax = kmid
else:
kmin = kmid
return kmax
def f(x): return n+x+(m:=isqrt(x))-sum(((k:=x//y**2)<2)+primepi(k) for y in range(1,m+1))
return bisection(f,n,n) # Chai Wah Wu, Jan 30 2025
A249368
Rectangular array by antidiagonals: t(n,k) is the position of prime(n)*k^2 when the numbers prime(j)*h^2 are jointly ordered, for j >=1 and h >= 1.
Original entry on oeis.org
1, 5, 2, 10, 7, 3, 18, 14, 12, 4, 26, 25, 23, 15, 6, 35, 37, 40, 31, 22, 8, 45, 50, 57, 52, 46, 27, 9, 59, 63, 79, 76, 77, 55, 33, 11, 69, 83, 102, 104, 112, 89, 67, 38, 13, 87, 100, 128, 135, 152, 129, 111, 73, 43, 16, 99, 121, 156, 170, 197, 179, 162, 122
Offset: 1
Northwest corner:
1 5 10 18 26 35 45
2 7 14 25 37 50 63
3 12 23 40 57 79 102
4 15 31 52 76 104 135
6 22 46 77 112 152 197
The numbers prime(1)*k^2 are (2,8,18,32,50,...);
the numbers prime(2)*k^2 are (3,12,27,48,75,...);
the numbers prime(3)*k^2 are (5,20,45,80,125,...);
the joint ranking of all such numbers is (2,3,5,7,8,...) = A229125, in which numbers of the form 2*k^2 occupy positions 1,5,10,17,... which is row 1 of the present array. Similarly, the numbers 3*k^2 occupy positions 2,7,14,20,...
-
z = 20000; e[h_] := e[h] = Select[Range[2000], Prime[h]*(#^2) < z &];
t = Table[Prime[n]*e[n]^2, {n, 1, 2000}]; s = Sort[Flatten[t]];
u[n_, k_] := Position[s, Prime[n]*k^2];
TableForm[Table[u[n, k], {n, 1, 15}, {k, 1, 15}]] (* A249368 array *)
Table[u[k, n - k + 1], {n, 15}, {k, 1, n}] // Flatten (* A249368 sequence *)
Showing 1-2 of 2 results.
Comments