cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A193356 If n is even then 0, otherwise n.

Original entry on oeis.org

1, 0, 3, 0, 5, 0, 7, 0, 9, 0, 11, 0, 13, 0, 15, 0, 17, 0, 19, 0, 21, 0, 23, 0, 25, 0, 27, 0, 29, 0, 31, 0, 33, 0, 35, 0, 37, 0, 39, 0, 41, 0, 43, 0, 45, 0, 47, 0, 49, 0, 51, 0, 53, 0, 55, 0, 57, 0, 59, 0, 61, 0, 63, 0, 65, 0, 67, 0, 69, 0, 71, 0, 73, 0, 75
Offset: 1

Views

Author

Keywords

Comments

Multiplicative with a(2^e)=0 if e>0 and a(p^e)=p^e for odd primes p. - R. J. Mathar, Aug 01 2011
A005408 and A000004 interleaved (the usual OEIS policy is not to include sequences like this where alternate terms are zero; this is an exception). - Omar E. Pol, Feb 02 2013
Row sums of A057211. - Omar E. Pol, Mar 05 2014
Column k=2 of triangle A196020. - Omar E. Pol, Aug 07 2015
a(n) is the determinant of the (n+2) X (n+2) circulant matrix with the first row [0,0,1,1,...,1]. This matrix is closely linked with the famous ménage problem (see also comments of Vladimir Shevelev in sequence A000179). Namely it defines the class of permutations p of 1,2,...,n+2 such that p(i)<>i and p(i)<>i+1 for i=1,2,...,n+1, and p(n+2)<>1,n+2. And a(n) is also the difference between the number of even and odd such permutations. - Dmitry Efimov, Feb 02 2016

References

  • Franz Lemmermeyer, Reciprocity Laws. From Euler to Eisenstein, Springer, 2000, p. 237, eq. (8.5).

Crossrefs

Programs

Formula

a(n) = n^k mod 2n, for any k>=2, also for k=n. [extended by Wolfdieter Lang, Dec 21 2011]
Dirichlet g.f.: (1-2^(1-s))*zeta(s-1). - R. J. Mathar, Aug 01 2011
G.f.: x*(1+x^2)/(1-x^2)^2. - Philippe Deléham, Feb 13 2012
a(n) = A027656(A042948(n-1)) = (1-(-1)^n)*n/2. - Bruno Berselli, Feb 19 2012
a(n) = n * (n mod 2). - Wesley Ivan Hurt, Jun 29 2013
G.f.: Sum_{n >= 1} A000010(n)*x^n/(1 + x^n). - Mircea Merca, Feb 22 2014
a(n) = 2*a(n-2)-a(n-4), for n>4. - Wesley Ivan Hurt, Aug 07 2015
E.g.f.: x*cosh(x). - Robert Israel, Feb 03 2016
a(n) = Product_{k=1..floor(n/2)}(sin(2*Pi*k/n))^2, for n >= 1 (with the empty product put to 1). Trivial for even n from the factor 0 for k = n/2. For odd n see, e.g., the Lemmermeyer reference, eq. (8.5) on p. 237. - Wolfdieter Lang, Aug 29 2016
a(n) = Sum_{k=1..n} (-1)^((n-k)*k). - Rick L. Shepherd, Sep 18 2020
a(n) = Sum_{k=1..n} (-1)^(1+gcd(k,n)) = Sum_{d | n} (-1)^(d+1)*phi(n/d), where phi(n) = A000010(n). - Peter Bala, Jan 14 2024
Dirichlet g.f.: DirichletLambda(s-1). - Michael Shamos, Jun 13 2025