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 A101040 #16 Feb 16 2024 14:59:56 %S A101040 0,1,1,1,1,1,1,0,1,1,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,1,0,0,1,0,1,0,1,1, %T A101040 1,0,1,1,1,0,1,0,1,0,0,1,1,0,1,0,1,0,1,0,1,0,1,1,1,0,1,1,0,0,1,0,1,0, %U A101040 1,0,1,0,1,1,0,0,1,0,1,0,0,1,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,0,0,0,1,0,1,0,0 %N A101040 If n has one or two prime-factors then 1 else 0. %C A101040 a(A033942(n))=0; for n>1: a(A037143(n))=1; %C A101040 a(A000040(n))=1; a(A001358(n))=1; %C A101040 A101041(n) = Sum(a(k): 1<=k<=n) + 1. %C A101040 Primes counted with multiplicity. - _Harvey P. Dale_, Feb 16 2024 %H A101040 Antti Karttunen, <a href="/A101040/b101040.txt">Table of n, a(n) for n = 1..65537</a> %H A101040 <a href="/index/Ch#char_fns">Index entries for characteristic functions</a> %H A101040 <a href="/index/Eu#epf">Index entries for sequences computed from exponents in factorization of n</a> %F A101040 a(n) = A010051(n)+A064911(n) = 0^floor(A001222(n)/3)-0^(n-1). %F A101040 a(1) = 0; for n > 1, a(n) = A063524(A032742(A032742(n))). - _Antti Karttunen_, Nov 23 2017 %t A101040 a[n_] := If[n == 1, 0, Boole[PrimeOmega[n] <= 2]]; %t A101040 Array[a, 105] (* _Jean-François Alcover_, Dec 02 2021 *) %o A101040 (Scheme) (define (A101040 n) (if (= 1 n) 0 (A063524 (A032742 (A032742 n))))) ;; _Antti Karttunen_, Nov 23 2017 %o A101040 (PARI) vector(105,k,bigomega(k)<=2&&k>1) \\ _Hugo Pfoertner_, Dec 02 2021 %Y A101040 Characteristic function of A037143 (without its initial term 1). %K A101040 nonn %O A101040 1,1 %A A101040 _Reinhard Zumkeller_, Nov 28 2004