login
A200650
Number of 0's in Stolarsky representation of n.
8
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,9
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
FORMULA
a(n) = A200648(n) - A200649(n). - Amiram Eldar, Jul 07 2023
EXAMPLE
The Stolarsky representation of 19 is 11101. This has one 0. So a(19) = 1.
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Casey Mongoven, Nov 19 2011
EXTENSIONS
Corrected and extended by Kenny Lau, Jul 04 2016
STATUS
approved