A101455 a(n) = 0 for even n, a(n) = (-1)^((n-1)/2) for odd n. Periodic sequence 1,0,-1,0,...
0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0
Offset: 0
Examples
G.f. = x - x^3 + x^5 - x^7 + x^9 - x^11 + x^13 - x^15 + x^17 - x^19 + x^21 + ...
References
- T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1986, page 139, k=4, Chi_2(n).
- G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 5th ed., Oxford Univ. Press, 1979, p. 241.
Links
- Muniru A Asiru, Table of n, a(n) for n = 0..1000 (a(0) prepended by Jianing Song)
- Étienne Fouvry, Claude Levesque, Michel Waldschmidt, Representation of integers by cyclotomic binary forms, arXiv:1712.09019 [math.NT], 2017.
- Clark Kimberling, Strong divisibility sequences and some conjectures, Fib. Quart., 17 (1979), 13-17.
- Grant Sanderson, Pi hiding in prime regularities, 3Blue1Brown video (2017).
- Index to divisibility sequences
- Index entries for linear recurrences with constant coefficients, signature (0,-1).
Crossrefs
Kronecker symbols {(d/n)} where d is a fundamental discriminant with |d| <= 24: A109017 (d=-24), A011586 (d=-23), A289741 (d=-20), A011585 (d=-19), A316569 (d=-15), A011582 (d=-11), A188510 (d=-8), A175629 (d=-7), this sequence (d=-4), A102283 (d=-3), A080891 (d=5), A091337 (d=8), A110161 (d=12), A011583 (d=13), A011584 (d=17), A322829 (d=21), A322796 (d=24).
Programs
-
GAP
a := [1, 0];; for n in [3..10^2] do a[n] := a[n-2]; od; a; # Muniru A Asiru, Feb 02 2018
-
Magma
m:=75; R
:=PowerSeriesRing(Integers(), m); Coefficients(R!(x/(1+x^2))); // G. C. Greubel, Aug 23 2018 -
Maple
a := n -> `if`(n mod 2=0, 0, (-1)^((n-1)/2)): seq(a(n), n=1..10^3); # Muniru A Asiru, Feb 02 2018
-
Mathematica
a[ n_] := {1, 0, -1, 0}[[ Mod[ n, 4, 1]]]; (* Michael Somos, Jan 13 2014 *) LinearRecurrence[{0, -1}, {1, 0}, 75] (* G. C. Greubel, Aug 23 2018 *)
-
PARI
{a(n) = if( n%2, (-1)^(n\2))}; /* Michael Somos, Sep 02 2005 */
-
PARI
{a(n) = kronecker( -4, n)}; /* Michael Somos, Mar 30 2012 */
-
Python
def A101455(n): return (0,1,0,-1)[n&3] # Chai Wah Wu, Jun 21 2024
Formula
Multiplicative with a(2^e) = 0, a(p^e) = (-1)^((p^e-1)/2) otherwise. - Mitch Harris May 17 2005
Euler transform of length 4 sequence [0, -1, 0, 1]. - Michael Somos, Sep 02 2005
G.f.: (x - x^3)/(1 - x^4) = x/(1 + x^2). - Michael Somos, Sep 02 2005
G.f. A(x) satisfies: 0 = f(A(x), A(x^2)) where f(u, v) = v - u^2 * (1 + 2*v). - Michael Somos, Aug 04 2011
a(n + 4) = a(n), a(n + 2) = a(-n) = -a(n), a(2*n) = 0, a(2*n + 1) = (-1)^n for all n in Z. - Michael Somos, Aug 04 2011
a(n + 1) = A056594(n). - Michael Somos, Jan 13 2014
REVERT transform is A126120. STIRLING transform of A009454. BINOMIAL transform is A146559. BINOMIAL transform of A009116. BIN1 transform is A108520. MOBIUS transform of A002654. EULER transform is A111335. - Michael Somos, Mar 30 2012
Completely multiplicative with a(p) = 2 - (p mod 4). - Werner Schulte, Feb 01 2018
a(n) = (-(n mod 2))^binomial(n, 2). - Peter Luschny, Sep 08 2018
a(n) = sin(n*Pi/2) = Im(i^n) where i is the imaginary unit. - Jianing Song, Sep 09 2018
From Jianing Song, Nov 14 2018: (Start)
a(n) = ((-4)/n) (or more generally, ((-4^i)/n) for i > 0), where (k/n) is the Kronecker symbol.
E.g.f.: sin(x).
Dirichlet g.f. is the Dirichlet beta function.
Extensions
a(0) prepended by Jianing Song, Nov 14 2024
Comments