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 A105700 #9 Jul 26 2017 09:22:47 %S A105700 0,0,1,1,2,1,2,1,0,2,2,1,0,1,2,2,0,1,0,1,0,2,2,1,0,2,2,0,0,1,0,1,0,2, %T A105700 2,2,0,1,2,2,0,1,0,1,0,0,2,1,0,2,0,2,0,1,0,2,0,2,2,1,0,1,2,0,0,2,0,1, %U A105700 0,2,0,1,0,1,2,0,0,2,0,1,0,0,2,1,0,2,2,2,0,1,0,2,0,2,2,2,0,1,0,0,0,1,0,1,0 %N A105700 a(n)=1 if n is a prime, 2 if n is a semiprime, otherwise 0. %H A105700 Antti Karttunen, <a href="/A105700/b105700.txt">Table of n, a(n) for n = 0..10000</a> %H A105700 <a href="/index/Eu#epf">Index entries for sequences computed from exponents in factorization of n</a> %F A105700 If A001222(n) <= 2, a(n) = A001222(n), otherwise a(n) = 0. - _Antti Karttunen_, Jul 26 2017 %e A105700 a(4) = 1 because n=3 is a prime; %e A105700 a(5) = 2 because n=4 is a semiprime; %e A105700 a(9) = 0 because n=8 is not prime neither semiprime. %t A105700 psp[n_]:=Which[PrimeQ[n],1,PrimeOmega[n]==2,2,True,0]; Join[{0}, Array[ psp,110]] (* _Harvey P. Dale_, Sep 18 2011 *) %o A105700 (Scheme) (define (A105700 n) (if (< (A001222 n) 3) (A001222 n) 0)) ;; _Antti Karttunen_, Jul 26 2017 %Y A105700 Cf. A001222, A105661. %K A105700 easy,nonn %O A105700 0,5 %A A105700 _Giovanni Teofilatto_, May 04 2005