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 A091379 #23 Oct 11 2022 06:34:43 %S A091379 1,2,0,2,2,0,0,2,0,4,0,0,2,0,0,2,2,0,0,4,0,0,0,0,2,4,0,0,2,0,0,2,0,4, %T A091379 0,0,2,0,0,4,2,0,0,0,0,0,0,0,0,4,0,4,2,0,0,0,0,4,0,0,2,0,0,2,4,0,0,4, %U A091379 0,0,0,0,2,4,0,0,0,0,0,4,0,4,0,0,4,0,0,0,2,0,0,0,0,0,0,0,2,0,0,4,2,0,0,4,0 %N A091379 a(n) = Product_{ p | n } (1 + Legendre(-1,p) ). %D A091379 Goro Shimura, Introduction to the Arithmetic Theory of Automorphic Functions, Princeton, 1971, see p. 25, Eq. (2) (but without the restriction that a(4k) = 0 and with a different definition of Legendre(-1,2)). %H A091379 Antti Karttunen, <a href="/A091379/b091379.txt">Table of n, a(n) for n = 1..65537</a> %F A091379 Here we use the definition that Legendre(-1, 2) = 1, Legendre(-1, p) = 1 if p == 1 mod 4, = -1 if p == 3 mod 4. %F A091379 From _Amiram Eldar_, Oct 11 2022: (Start) %F A091379 Multiplicative with a(p^e) = 0 if p == 3 (mod 4) and 2 otherwise. %F A091379 Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 3/Pi = 0.954929... (A089491). (End) %p A091379 with(numtheory); A091379 := proc(n) local i,t1,t2; t1 := ifactors(n)[2]; t2 := mul((1+legendre(-1,t1[i][1])),i=1..nops(t1)); end; %t A091379 a[n_] := Module[{t1, t2}, t1 = FactorInteger[n]; t2 = Product[(1 + KroneckerSymbol[-1, t1[[i, 1]]]), {i, 1, Length[t1]}]]; a[1] = 1; %t A091379 Array[a, 105] (* _Jean-François Alcover_, Feb 08 2022, from Maple code *) %o A091379 (PARI) %o A091379 vecproduct(v) = { my(m=1); for(i=1,#v,m *= v[i]); m; }; %o A091379 A091379(n) = vecproduct(apply(p -> (1 + kronecker(-1,p)), factorint(n)[, 1])); \\ _Antti Karttunen_, Nov 18 2017 %Y A091379 Cf. A000086, A000091, A034444, A089491, A091392, A091393, A091394, A091395, A091396, A091397, A091398, A091399, A091400. %K A091379 nonn,mult %O A091379 1,2 %A A091379 _N. J. A. Sloane_, Mar 02 2004