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.

A212439 a(n) = 2*n + A181935(n) mod 2.

Original entry on oeis.org

1, 3, 5, 6, 8, 11, 13, 15, 17, 19, 20, 22, 24, 27, 29, 30, 32, 35, 37, 38, 40, 42, 45, 47, 49, 51, 52, 54, 56, 59, 61, 63, 65, 67, 69, 70, 72, 74, 77, 79, 81, 83, 85, 86, 88, 90, 93, 94, 96, 99, 101, 102, 104, 106, 108, 111, 113, 115, 116, 118, 120, 123, 125
Offset: 0

Views

Author

Reinhard Zumkeller, May 17 2012

Keywords

Comments

A212444 gives iterations starting from 0.

Crossrefs

Programs

  • Haskell
    a212439 n = 2 * n + a212412 n
  • Mathematica
    f[n_, e_] := Module[{d = IntegerDigits[n, 2^e]}, Length[Split[d][[-1]]] - If[SameQ @@ d && Mod[n, 2^e] < 2^(e - 1), 1, 0]]; a[n_] := 2*n + Mod[Max[Table[f[n, e], {e, Range[Max[1, Floor[Log2[n]]]]}]], 2]; a[0] = 1; Array[a, 100, 0] (* Amiram Eldar, Apr 08 2025 *)

Formula

a(n) = 2*n + A212412(n): concatenation of binary representation of n and the parity of its curling number.