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.

A085192 First differences of A014486.

Original entry on oeis.org

2, 8, 2, 30, 2, 6, 2, 4, 114, 2, 6, 2, 4, 18, 2, 6, 2, 4, 10, 2, 4, 8, 442, 2, 6, 2, 4, 18, 2, 6, 2, 4, 10, 2, 4, 8, 58, 2, 6, 2, 4, 18, 2, 6, 2, 4, 10, 2, 4, 8, 26, 2, 6, 2, 4, 10, 2, 4, 8, 18, 2, 4, 8, 16, 1738, 2, 6, 2, 4, 18, 2, 6, 2, 4, 10, 2, 4, 8, 58, 2, 6, 2, 4, 18, 2, 6, 2, 4, 10, 2, 4, 8, 26
Offset: 0

Views

Author

Antti Karttunen, Jun 14 2003

Keywords

Crossrefs

Repeating part: A085193.

Programs

  • Mathematica
    okQ[n_] := Module[{bb = IntegerDigits[n, 2], cnt=0}, For[k=1, k <= Length[ bb], k++, cnt = cnt + If[bb[[k]]==1, 1, -1]; okQ[0] = True; If[cnt < 0, Return[False]]]; cnt==0]; Select[Range[0, 10^4], okQ] // Differences (* Jean-François Alcover, Mar 02 2016 *)

Formula

a(n) = A014486(n+1) - A014486(n).