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.

A364127 The number of trailing 0's in the Stolarsky representation of n (A364121).

This page as a plain text file.
%I A364127 #8 Jul 07 2023 05:43:06
%S A364127 0,0,1,0,0,1,0,2,0,0,1,0,1,0,0,2,0,0,1,0,3,0,0,1,0,1,0,0,2,0,0,1,0,2,
%T A364127 0,0,1,0,0,1,0,3,0,0,1,0,1,0,0,2,0,0,1,0,4,0,0,1,0,0,1,0,2,0,0,1,0,2,
%U A364127 0,0,1,0,0,1,0,3,0,0,1,0,1,0,0,2,0,0,1
%N A364127 The number of trailing 0's in the Stolarsky representation of n (A364121).
%C A364127 The first position of k = 2, 3, 4, ... is A055588(k+1).
%C A364127 The asymptotic density of the occurrences of k = 0, 1, 2, ... is (2-phi)^k/phi, where phi is the golden ratio (A001622).
%C A364127 The asymptotic mean of this sequence is phi - 1 (A094214) and the asymptotic standard deviation is 1.
%H A364127 Amiram Eldar, <a href="/A364127/b364127.txt">Table of n, a(n) for n = 2..10000</a>
%F A364127 a(n) = A122840(A364121(n)).
%t A364127 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}]]];
%t A364127 a[n_] := IntegerExponent[FromDigits[stol[n]], 10]; Array[a, 100, 2]
%o A364127 (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])));}
%o A364127 a(n) = valuation(fromdigits(stol(n)), 10);
%Y A364127 Cf. A001622, A055588, A094214, A122840, A364121.
%K A364127 nonn,base
%O A364127 2,8
%A A364127 _Amiram Eldar_, Jul 07 2023