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!)
A091400 a(n) = Product_{ odd primes p | n } (1 + Legendre(-1,p) ). 5
1, 1, 0, 1, 2, 0, 0, 1, 0, 2, 0, 0, 2, 0, 0, 1, 2, 0, 0, 2, 0, 0, 0, 0, 2, 2, 0, 0, 2, 0, 0, 1, 0, 2, 0, 0, 2, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 2, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 1, 4, 0, 0, 2, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 4, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 2, 2, 0, 0, 2, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,5
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).
LINKS
FORMULA
Here we use the definition that Legendre(-1, 2) = 0, Legendre(-1, p) = 1 if p == 1 mod 4, = -1 if p == 3 mod 4. This is Shimura's definition, which is different from Maple's.
a(n) is multiplicative with:
a(2^e) = 1 for e >= 0,
a(p^e) = 0 if p == 3 (mod 4) for e > 0,
a(p^e) = 2 if p == 1 (mod 4) for e > 0.
(corrected by Werner Schulte, Dec 12 2020.
a(2*n) = a(n). a(3*n) = a(4*n + 3) = 0.
a(3*n + 1) = A122865(n). a(3*n + 2) = A122856(n).
a(n) = Sum_{d|n} b(d)*(-1)^bigomega(d)*moebius(d) where b(2n)=0 and b(2n+1)=(-1)^n. - Benoit Cloitre, Apr 17 2016
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 2/Pi = 0.636619... (A060294). - Amiram Eldar, Oct 11 2022
EXAMPLE
G.f. = x + x^2 + x^4 + 2*x^5 + x^8 + 2*x^10 + 2*x^13 + x^16 + 2*x^17 + 2*x^20 + ...
MAPLE
with(numtheory): A091400 := proc(n) local i, t1, t2; t1 := ifactors(n)[2]; t2 := 1; for i from 1 to nops(t1) do if t1[i][1] > 2 then t2 := t2*(1+legendre(-1, t1[i][1])); fi; od: t2; end;
with(numtheory): seq(mul(1+legendre(-1, p), p in select(isprime, divisors(n) minus {2})), n=1..105); # Peter Luschny, Apr 20 2016
MATHEMATICA
Legendre[-1, p_] := Which[p==2, 0, Mod[p, 4]==1, 1, True, -1]; a[1] = 1; a[n_] := Times @@ (Legendre[-1, #] + 1&) /@ FactorInteger[n][[All, 1]]; Array[a, 105] (* Jean-François Alcover, Dec 01 2015 *)
Join[{1}, Table[Product[1+JacobiSymbol[-1, p], {p, Complement[FactorInteger[n][[All, 1]], {2}]}], {n, 2, 105}]] (* Peter Luschny, Apr 20 2016 *)
PROG
(PARI) {a(n)=if(n<1, 0, sumdiv(n, d, (-1)^bigomega(d)*moebius(d)*if(d%2, (-1)^(d\2), 0)))} \\ Benoit Cloitre, Apr 17 2016
CROSSREFS
Sequence in context: A329343 A063725 A084888 * A129448 A239003 A123759
KEYWORD
nonn,mult
AUTHOR
N. J. A. Sloane, Mar 02 2004
EXTENSIONS
Definition clarified by Peter Luschny, Apr 20 2016
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 19 23:40 EDT 2024. Contains 371798 sequences. (Running on oeis4.)