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.

A200650 Number of 0's in Stolarsky representation of n.

Original entry on oeis.org

1, 0, 0, 1, 0, 1, 1, 0, 2, 1, 1, 1, 0, 2, 2, 1, 2, 1, 1, 1, 0, 3, 2, 2, 2, 1, 2, 2, 1, 2, 1, 1, 1, 0, 3, 3, 2, 3, 2, 2, 2, 1, 3, 2, 2, 2, 1, 2, 2, 1, 2, 1, 1, 1, 0, 4, 3, 3, 3, 2, 3, 3, 2, 3, 2, 2, 2, 1, 3, 3, 2, 3, 2, 2, 2, 1, 3, 2, 2, 2, 1, 2, 2, 1, 2, 1, 1, 1, 0, 4, 4, 3, 4, 3, 3, 3, 2, 4, 3, 3
Offset: 1

Views

Author

Casey Mongoven, Nov 19 2011

Keywords

Comments

For the Stolarsky representation of n, see the C. Mongoven link.
a(n+1), n >= 1, gives the size of the n-th generation of each of the "[male-female] pair of Fibonacci rabbits" in the Fibonacci rabbits tree read right-to-left by row, the first pair (the root) being the 0th generation. (Cf. OEIS Wiki link below.) - Daniel Forgues, May 07 2015
From Daniel Forgues, May 07 2015: (Start)
Concatenation of:
0: 1,
1: 0,
2: 0,
3: 1, 0,
4: 1, 1, 0,
5: 2, 1, 1, 1, 0,
6: 2, 2, 1, 2, 1, 1, 1, 0,
(...),
where row n, n >= 3, is row n-1 prepended by incremented row n-2. (End)
For n >= 3, this algorithm yields the next F_n terms of the sequence, where F_n is the n-th Fibonacci number (A000045). Since it is asymptotic to (phi^n)/sqrt(5), the number of terms thus obtained grows exponentially at each step! - Daniel Forgues, May 22 2015
Conjecture: a(n) is one less than the length of row n-1 of A385817. To obtain it, first take maximal run lengths of binary indices of each nonnegative integer (giving A245563), then remove all duplicate rows (giving A385817), and finally take the length of each remaining row and subtract 1. For sum instead of length we appear to have A200648. For anti-runs instead of runs we appear to have A341259 = A200649-1. - Gus Wiseman, Jul 21 2025
How is this related to A117479? - R. J. Mathar, Aug 10 2025

Examples

			The Stolarsky representation of 19 is 11101. This has one 0. So a(19) = 1.
		

Crossrefs

For length instead of number of 0's we have A200648.
For sum (or number of 1's) instead of number of 0's we have A200649.
Stolarsky representation is listed by A385888, ranks A200714.
A000120 counts 1's in binary expansion, 0's A023416.
A069010 counts maximal runs of binary indices, ranked by A385889.
A245563 lists maximal run lengths of binary indices, duplicates removed A385817.

Programs

  • Mathematica
    stol[n_] := stol[n] = If[n == 1, {}, If[n != Round[Round[n/GoldenRatio]*GoldenRatio], Join[stol[Floor[n/GoldenRatio^2] + 1], {0}], Join[stol[Round[n/GoldenRatio]], {1}]]];
    a[n_] := If[n == 1, 1, Count[stol[n], 0]]; Array[a, 100] (* Amiram Eldar, Jul 07 2023 *)
  • PARI
    stol(n) = {my(phi=quadgen(5)); if(n==1, [], if(n != round(round(n/phi)*phi), concat(stol(floor(n/phi^2) + 1), [0]), concat(stol(round(n/phi)), [1])));}
    a(n) = if(n == 1, 1,  my(s = stol(n)); #s - vecsum(s)); \\ Amiram Eldar, Jul 07 2023

Formula

a(n) = A200648(n) - A200649(n). - Amiram Eldar, Jul 07 2023

Extensions

Corrected and extended by Kenny Lau, Jul 04 2016