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!)
A259024 a(4*n) = a(n). a(4*n + 2) = 0. a(4*n + 1) = - A259022(n+2). a(4*n + 3) = - A259022(n-2). 5
1, 0, -1, 1, -1, 0, 1, 0, 0, 0, -1, -1, 1, 0, 1, 1, -1, 0, 1, -1, -1, 0, -1, 0, 1, 0, 0, 1, -1, 0, 1, 0, 1, 0, -1, 0, 1, 0, -1, 0, -1, 0, 1, -1, 0, 0, -1, -1, 1, 0, 1, 1, -1, 0, 1, 0, -1, 0, -1, 1, 1, 0, 0, 1, -1, 0, 1, -1, 1, 0, -1, 0, 1, 0, -1, 1, -1, 0, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1
LINKS
FORMULA
a(n) is multiplicative with a(2^e) = (1 + (-1)^e) / 2, a(3) = -1, a(3^e) = 0 if e>1, a(p^e) = 1 if p == 1 (mod 6), a(p^e) = (-1)^e if p == 5 (mod 6).
A229143(n) = Sum_{d|n} a(n/d) * [ 0, 1, 0, -2, 0, 1][mod(d, 6) + 1].
a(n) = -a(-n) for all n in Z.
a(2*n + 1) = A259022(n). a(3*n) = - A084091(n). a(3*n + 1) = A098725(n+1).
a(9*n) = 0. a(9*n + 3) = - A098725(n).
EXAMPLE
G.f. = x - x^3 + x^4 - x^5 + x^7 - x^11 - x^12 + x^13 + x^15 + x^16 + ...
MATHEMATICA
f[p_, e_] := If[Mod[p, 6] == 1, 1, (-1)^e]; f[2, e_] := (1 + (-1)^e) / 2; f[3, 1] = -1; f[3, e_] := 0; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 02 2023 *)
PROG
(PARI) {a(n) = my(A, p, e); if( !n, 0, A = factor(abs(n)); sign(n) * prod(k=1, matsize(A)[1], [p, e] = A[k, ]; if( p==2, !(e%2), p==3, -(e==1), kronecker( -12, p)^e)))};
(Haskell)
import Data.List (transpose)
a259024 n = a259024_list !! (n-1)
a259024_list = concat
(transpose [drop 2 cs, [0, 0 ..], drop 7 cs, a259024_list])
where cs = map negate a259022_list
-- Reinhard Zumkeller, Jun 17 2015
CROSSREFS
Cf. A259029 (partial sums).
Sequence in context: A359591 A359592 A257477 * A323045 A104106 A349167
KEYWORD
sign,easy,mult
AUTHOR
Michael Somos, Jun 16 2015
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 July 9 08:26 EDT 2024. Contains 374172 sequences. (Running on oeis4.)