login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A091379 a(n) = Product_{ p | n } (1 + Legendre(-1,p) ). 10
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
REFERENCES
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)).
LINKS
FORMULA
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.
From Amiram Eldar, Oct 11 2022: (Start)
Multiplicative with a(p^e) = 0 if p == 3 (mod 4) and 2 otherwise.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 3/Pi = 0.954929... (A089491). (End)
MAPLE
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;
MATHEMATICA
a[n_] := Module[{t1, t2}, t1 = FactorInteger[n]; t2 = Product[(1 + KroneckerSymbol[-1, t1[[i, 1]]]), {i, 1, Length[t1]}]]; a[1] = 1;
Array[a, 105] (* Jean-François Alcover, Feb 08 2022, from Maple code *)
PROG
(PARI)
vecproduct(v) = { my(m=1); for(i=1, #v, m *= v[i]); m; };
A091379(n) = vecproduct(apply(p -> (1 + kronecker(-1, p)), factorint(n)[, 1])); \\ Antti Karttunen, Nov 18 2017
CROSSREFS
Sequence in context: A028928 A343723 A260149 * A151758 A365538 A164272
KEYWORD
nonn,mult
AUTHOR
N. J. A. Sloane, Mar 02 2004
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 08:27 EDT 2024. Contains 371964 sequences. (Running on oeis4.)