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 A026422 #31 Apr 10 2025 12:28:08 %S A026422 1,2,3,5,7,8,11,12,13,17,18,19,20,23,27,28,29,30,31,32,37,41,42,43,44, %T A026422 45,47,48,50,52,53,59,61,63,66,67,68,70,71,72,73,75,76,78,79,80,83,89, %U A026422 92,97,98,99,101,102,103,105,107,108,109,110 %N A026422 a(n) = least positive integer > a(n-1) and not a(i)*a(j) for 1 <= i <= j < n. %H A026422 Vincenzo Librandi, <a href="/A026422/b026422.txt">Table of n, a(n) for n = 1..5000</a> %t A026422 a[1]=1; a[n_] := a[n] = (t= Union[Flatten[Table[a[i] a[j], {i, 1, n-1}, {j, i, n-1}]]]; Do[If[FreeQ[t, k], an = k; Break[]], {k, a[n-1]+1, Last[t]+1}]; an); Array[a, 60] (* _Jean-François Alcover_, May 06 2011 *) %t A026422 Select[Range[110], OddQ[Total[FactorInteger[#]][[2]]] &] (* _T. D. Noe_, May 07 2011 *) %t A026422 g = 110; t = Array[1 &, g]; %t A026422 Table[If[t[[j]] == 1, t[[j*i]] = 0, t[[i*j]] = 1], {j, 2, g/2}, {i, 2, g/j}]; Flatten[Position[t, 1]] (* _Horst H. Manninger_, Mar 15 2023 *) %o A026422 (PARI) is(n)=bigomega(n)%2 || n==1 \\ _Charles R Greathouse IV_, Sep 16 2015 %o A026422 (Python) %o A026422 from math import prod, isqrt %o A026422 from sympy import primerange, primepi, integer_nthroot %o A026422 def A026422(n): %o A026422 def g(x,a,b,c,m): yield from (((d,) for d in enumerate(primerange(b,isqrt(x//c)+1),a)) if m==2 else (((a2,b2),)+d for a2,b2 in enumerate(primerange(b,integer_nthroot(x//c,m)[0]+1),a) for d in g(x,a2,b2,c*b2,m-1))) %o A026422 def f(x): return int(n+sum(sum(primepi(x//prod(c[1] for c in a))-a[-1][0] for a in g(x,0,1,1,m)) for m in range(2,x.bit_length()+1,2))) %o A026422 m, k = n, f(n) %o A026422 while m != k: m, k = k, f(k) %o A026422 return m # _Chai Wah Wu_, Apr 10 2025 %Y A026422 Apart from initial term, same as A026424. %Y A026422 Cf. A026416 and references therein. %K A026422 nonn %O A026422 1,2 %A A026422 _Clark Kimberling_ %E A026422 Name corrected by _Charles R Greathouse IV_, Sep 16 2015