%I #52 Apr 10 2024 10:45:03
%S 0,1,2,3,5,6,7,10,11,15,21,22,23,31,39,43,54,55,74,75,101,102,103,138,
%T 139,183,187,246,247,330,331,439,443,587,783,790,791,1047,1355,1398,
%U 1399,1866,1867,2487,2491,3318,3319,4199,4427,5903,5911,7882,7883,9959
%N Smallest number for which the sum of digits in fractional base 4/3 is n.
%C The sum of digits is A244041 and k = a(n) is the smallest A244041(k) = n.
%C Terms are never multiples of 4, after a(0)=0, since a multiple of 4 is a final 0 digit in base 4/3 which can be removed for the same digit sum.
%C Terms are strictly increasing (and so are indices of record highs in A244041) since a(n) - 1 has sum of digits n-1 and so is an upper bound for a(n-1).
%C If a(n) != 3 (mod 4), then the next term is a(n+1) = a(n) + 1 by incrementing the least significant digit.
%C If a(n) == 3 (mod 4), then an upper bound on the next term is a(n+1) <= (a(n) - r)*4/3 + r+1, where r = a(n) mod 3, by reducing the last digit to reach a multiple of 3 then append a suitable additional digit.
%H Kevin Ryde, <a href="/A357425/b357425.txt">Table of n, a(n) for n = 0..472</a>
%H Kevin Ryde, <a href="/A357425/a357425_2.c.txt">C Code</a> (revised)
%H <a href="/index/Ba#base_fractional">Index entries for sequences related to fractional bases</a>
%e For n=10, a(10) = 21 = 32131 in base 4/3 is the smallest number with sum of digits = 10.
%e For n=11, a(11) = 22 = 32132 in base 4/3, and which differs from a(10) simply by increasing the least significant base 4/3 digit.
%o (C) /* See links. */
%Y Cf. A024631 (base 4/3), A244041 (sum of digits), A363758.
%K nonn,base
%O 0,3
%A _Kevin Ryde_, Sep 28 2022