A200650 Number of 0's in Stolarsky representation of n.
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
Examples
The Stolarsky representation of 19 is 11101. This has one 0. So a(19) = 1.
Links
- Kenny Lau, Table of n, a(n) for n = 1..20000
- Casey Mongoven, Description of Stolarsky Representations.
- OEIS Wiki, Fibonacci rabbits per generation.
Crossrefs
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
Extensions
Corrected and extended by Kenny Lau, Jul 04 2016
Comments