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 A340316 #54 Aug 31 2024 18:01:59 %S A340316 2,3,6,5,10,30,7,14,42,210,11,15,66,330,2310,13,21,70,390,2730,30030, %T A340316 17,22,78,462,3570,39270,510510,19,26,102,510,3990,43890,570570, %U A340316 9699690,23,33,105,546,4290,46410,690690,11741730,223092870 %N A340316 Square array A(n,k), n>=1, k>=1, read by antidiagonals, where row n is the increasing list of all squarefree numbers with n primes. %C A340316 This is a permutation of all squarefree numbers > 1. %F A340316 A(A072047(n), A340313(n)) = A005117(n) for n > 1. %e A340316 First six rows and columns: %e A340316 2 3 5 7 11 13 %e A340316 6 10 14 15 21 22 %e A340316 30 42 66 70 78 102 %e A340316 210 330 390 462 510 546 %e A340316 2310 2730 3570 3990 4290 4830 %e A340316 30030 39270 43890 46410 51870 53130 %o A340316 (Haskell) %o A340316 a340316 n k = a340316_row n !! (k-1) %o A340316 a340316_row n = [a005117_list !! k | k <- [0..], a072047_list !! k == n] %o A340316 (Python) %o A340316 from math import prod, isqrt %o A340316 from sympy import prime, primerange, integer_nthroot, primepi %o A340316 def A340316_T(n,k): %o A340316 if n == 1: return prime(k) %o A340316 def g(x,a,b,c,m): yield from (((d,) for d in enumerate(primerange(b+1,isqrt(x//c)+1),a+1)) if m==2 else (((a2,b2),)+d for a2,b2 in enumerate(primerange(b+1,integer_nthroot(x//c,m)[0]+1),a+1) for d in g(x,a2,b2,c*b2,m-1))) %o A340316 def f(x): return int(k+x-sum(primepi(x//prod(c[1] for c in a))-a[-1][0] for a in g(x,0,1,1,n))) %o A340316 def bisection(f,kmin=0,kmax=1): %o A340316 while f(kmax) > kmax: kmax <<= 1 %o A340316 while kmax-kmin > 1: %o A340316 kmid = kmax+kmin>>1 %o A340316 if f(kmid) <= kmid: %o A340316 kmax = kmid %o A340316 else: %o A340316 kmin = kmid %o A340316 return kmax %o A340316 return bisection(f) # _Chai Wah Wu_, Aug 31 2024 %Y A340316 Cf. A005117 (squarefree numbers), A072047 (number of prime factors), A340313 (indexing), A078840 (all natural numbers, not only squarefree). %Y A340316 Rows n=1..10: A000040, A006881, A007304, A046386, A046387, A067885, A123321, A123322, A115343, A281222. %Y A340316 Columns k=1..2: A002110, A306237. %Y A340316 Main diagonal gives A340467. %Y A340316 Cf. A358677. %K A340316 nonn,tabl %O A340316 1,1 %A A340316 _Peter Dolland_, Jan 04 2021