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 A197881 #15 Aug 28 2023 08:25:44 %S A197881 1,0,0,2,0,0,0,1,2,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,2,0,1,0,0,0,0,1,0,0, %T A197881 0,4,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0, %U A197881 0,0,0,2,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,2 %N A197881 Number of times n occurs in A197863. %H A197881 Antti Karttunen, <a href="/A197881/b197881.txt">Table of n, a(n) for n = 1..10000</a> %H A197881 <a href="/index/Eu#epf">Index entries for sequences computed from exponents in factorization of n</a>. %F A197881 Multiplicative with a(p^e) = 0 if e = 1, 2 if e = 2, and 1 otherwise. %t A197881 f[p_, e_] := Switch[e, 1, 0, 2, 2, _, 1]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* _Amiram Eldar_, Aug 28 2023 *) %o A197881 (PARI) a(n)=my(es=factor(n)[,2]~);prod(k=1,#es,if(es[k]==1,0,if(es[k]==2,2,1))) %o A197881 (Scheme) (define (A197881 n) (cond ((= 1 n) n) (else (* (case (A067029 n) ((1) 0) ((2) 2) (else 1)) (A197881 (A028234 n)))))) ;; _Antti Karttunen_, Jul 23 2017 %Y A197881 Cf. A197863, A112526. %K A197881 nonn,easy,mult %O A197881 1,4 %A A197881 _Franklin T. Adams-Watters_, Oct 18 2011 %E A197881 More terms from _Antti Karttunen_, Jul 23 2017