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 A230594 #17 Jul 23 2024 18:13:49 %S A230594 1,2,2,1,2,2,2,0,1,2,2,0,2,2,2,0,2,0,2,0,2,2,2,0,1,2,0,0,2,0,2,0,2,2, %T A230594 2,0,2,2,2,0,2,0,2,0,0,2,2,0,1,0,2,0,2,0,2,0,2,2,2,0,2,2,0,0,2,0,2,0, %U A230594 2,0,2,0,2,2,0,0,2,0,2,0,0,2,2,0,2,2,2 %N A230594 Number of ways to write n as n = x*y, where x, y = noncomposite numbers (A008578), 1 <= x <= n, 1 <= y <= n. %C A230594 Dirichlet convolution of A080339(n) with itself, where A080339 = characteristic function of noncomposite numbers (A008578). %C A230594 Dirichlet convolution of functions b(n) and c(n) is function a(n) = Sum_{d|n} b(d) * c(n/d). %C A230594 a(n) = 0, 1 or 2. a(n) = 0 for numbers n from A033942 (numbers with least 3 prime factors (counted with multiplicity)); a(n) = 1 for n = p^2, p = prime; a(n) = 2 for numbers n from A167171 (A006881 union A000040). %H A230594 Antti Karttunen, <a href="/A230594/b230594.txt">Table of n, a(n) for n = 1..10000</a> %H A230594 <a href="/index/Eu#epf">Index entries for sequences computed from exponents in factorization of n</a>. %F A230594 a(n) = Sum_{d|n} A080339(d) * A080339(n/d). %e A230594 For n = 6: a(6) = Sum_(d|6) A080339(d) * A080339(6/d) = 1*0 + 1*1 + 1*1 + 0*1 = 2. %t A230594 a[n_] := Switch[FactorInteger[n][[;;, 2]], {2}, 1, {1}, 2, {1, 1}, 2, _, 0]; a[1] = 1; Array[a, 100] (* _Amiram Eldar_, Aug 29 2023 *) %o A230594 (PARI) %o A230594 A080339(n) = ((1==n)||isprime(n)); %o A230594 A230594(n) = sumdiv(n,d,(A080339(d)*A080339(n/d))); \\ _Antti Karttunen_, Jul 27 2017 %o A230594 (Python) %o A230594 from sympy import factorint %o A230594 def A230594(n): return 0 if sum(f:=factorint(n).values())>2 else (1 if n==1 or max(f)==2 else 2) # _Chai Wah Wu_, Jul 23 2024 %Y A230594 Cf. A080339, A033942, A167171, A006881, A000040, A230595. %K A230594 nonn %O A230594 1,2 %A A230594 _Jaroslav Krizek_, Oct 27 2013