The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A000095 Number of fixed points of GAMMA_0 (n) of type i. 2
1, 2, 0, 0, 2, 0, 0, 0, 0, 4, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, 2, 0, 0, 0, 0, 4, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 2, 0, 0, 0, 0, 4, 0, 0, 2, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 4, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
REFERENCES
Bruno Schoeneberg, Elliptic Modular Functions, Springer-Verlag, NY, 1974, p. 101.
Goro Shimura, Introduction to the Arithmetic Theory of Automorphic Functions, Princeton, 1971, see p. 25, Eq. (2).
LINKS
FORMULA
a(n) is multiplicative with a(2) = 2, a(2^e) = 0 if e>1, a(p^e) = 2 if p == 1 mod 4 and a(p^e) = 0 if p == 3 mod 4. - Michael Somos, Jul 15 2004
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 2/Pi = 0.636619... (A060294). - Amiram Eldar, Oct 15 2022
EXAMPLE
G.f. = x + 2*x^2 + 2*x^5 + 4*x^10 + 2*x^13 + 2*x^17 + 2*x^25 + 4*x^26 + 2*x^29 + ...
MAPLE
A000095 := proc(n) local b, d: if irem(n, 4) = 0 then RETURN(0); else b := 1; for d from 2 to n do if irem(n, d) = 0 and isprime(d) then b := b*(1+legendre(-1, d)); fi; od; RETURN(b); fi: end;
MATHEMATICA
A000095[ 1 ] = 1; A000095[ n_Integer ] := If[ Mod[ n, 4 ]==0, 0, Fold[ #1*(1+JacobiSymbol[ -1, #2 ])&, If[ EvenQ[ n ], 2, 1 ], Select[ First[ Transpose[ FactorInteger[ n ] ] ], OddQ ] ] ]
a[ n_] := If[ n < 1, 0, Times @@ (Which[# == 1, 1, # == 2, 2 Boole[#2 == 1], Mod[#, 4] == 1, 2, True, 0] & @@@ FactorInteger[n])]; (* Michael Somos, Nov 15 2015 *)
PROG
(PARI) {a(n) = my(t); if( n<=1 || n%4==0, n==1, t=1; fordiv(n, d, if( isprime(d), t *= (1 + kronecker(-1, d)))); t)}; /* Michael Somos, Jul 15 2004 */
(Haskell)
a000095 n = product $ zipWith f (a027748_row n) (a124010_row n) where
f 2 e = if e == 1 then 2 else 0
f p _ = if p `mod` 4 == 1 then 2 else 0
-- Reinhard Zumkeller, Mar 24 2012
(PARI) A000095(n)=n%3 && n%4 && n%7 && n%11 && return(prod(k=1, #n=factor(n)[, 1], 1+kronecker(-1, n[k]))) /* the n%4 is needed, the others only reduce execution time by 34% */ \\ M. F. Hasler, Mar 24 2012
CROSSREFS
Sequence in context: A079205 A317641 A107497 * A258322 A258034 A243828
KEYWORD
nonn,easy,mult
AUTHOR
EXTENSIONS
Values a(1)-a(10^4) double checked by M. F. Hasler, Mar 24 2012
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 May 22 06:48 EDT 2024. Contains 372743 sequences. (Running on oeis4.)