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.

A090047 Length of longest contiguous block of 0's in binary expansion of n^2.

Original entry on oeis.org

1, 0, 2, 2, 4, 2, 2, 3, 6, 3, 2, 2, 4, 2, 3, 4, 8, 4, 3, 2, 4, 2, 2, 4, 6, 3, 2, 2, 4, 2, 4, 5, 10, 5, 4, 2, 4, 2, 2, 3, 6, 3, 2, 2, 4, 2, 4, 4, 8, 4, 3, 3, 4, 2, 2, 3, 6, 3, 2, 2, 4, 3, 5, 6, 12, 6, 5, 3, 4, 2, 2, 3, 6, 3, 2, 2, 4, 2, 3, 4, 8, 4, 3, 2, 4, 4, 2, 3, 6, 3, 2, 6, 4, 4, 4, 5, 10, 5, 4, 2, 4, 2
Offset: 0

Views

Author

Reinhard Zumkeller, Nov 20 2003

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := If[n <= 1, 1-n, Max[Length /@ Split[IntegerDigits[n^2, 2]][[2 ;; -1 ;; 2]]]]; Array[a, 100, 0] (* Amiram Eldar, Jul 28 2025 *)

Formula

a(n) = A087117(A000290(n)).