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.

A102393 A wicked evil sequence.

Original entry on oeis.org

1, 0, 0, 4, 0, 6, 7, 0, 0, 10, 11, 0, 13, 0, 0, 16, 0, 18, 19, 0, 21, 0, 0, 24, 25, 0, 0, 28, 0, 30, 31, 0, 0, 34, 35, 0, 37, 0, 0, 40, 41, 0, 0, 44, 0, 46, 47, 0, 49, 0, 0, 52, 0, 54, 55, 0, 0, 58, 59, 0, 61, 0, 0, 64, 0, 66, 67, 0, 69, 0, 0, 72, 73, 0, 0, 76, 0, 78, 79, 0, 81, 0, 0, 84, 0, 86
Offset: 0

Views

Author

Paul Barry, Jan 06 2005

Keywords

Comments

Elements of A026147 (evil numbers plus one) appear at positions indexed by the evil numbers A001969, 0 otherwise. A000027(n) = A102393(n) + A102394(n).
The following sequences all appear to have the same parity: A003071, A029886, A061297, A092524, A093431, A102393, A104258, A122248, A128975. - Jeremy Gardiner, Dec 28 2008

Crossrefs

Programs

  • Mathematica
    a[n_] := If[EvenQ @ DigitCount[n, 2, 1], n + 1, 0]; Array[a, 100, 0] (* Amiram Eldar, Aug 02 2020 *)

Formula

a(n) = (n+1)(1+(-1)^A000120(n))/2.
a(n) = (n+1)(1+(-1)^A010060(n))/2.