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.
%I A245345 #17 Aug 02 2025 06:26:47 %S A245345 0,1,2,3,4,5,6,7,8,2,3,4,5,6,7,8,9,10,4,5,6,7,8,9,10,11,12,6,7,8,9,10, %T A245345 11,12,13,14,8,9,10,11,12,13,14,15,16,3,4,5,6,7,8,9,10,11,5,6,7,8,9, %U A245345 10,11,12,13,7,8,9,10,11,12,13,14,15,9,10,11,12 %N A245345 Sum of digits of n written in fractional base 9/2. %C A245345 The base 9/2 expansion is unique and thus the sum of digits function is well-defined. %H A245345 Amiram Eldar, <a href="/A245345/b245345.txt">Table of n, a(n) for n = 0..10000</a> %H A245345 <a href="/index/Ba#base_fractional">Index entries for sequences related to fractional bases</a>. %F A245345 a(n) = A007953(A024650(n)). %e A245345 In base 9/2 the number 19 is represented by 41 and so a(19) = 4 + 1 = 5. %t A245345 a[n_] := a[n] = If[n == 0, 0, a[2 * Floor[n/9]] + Mod[n, 9]]; Array[a, 100, 0] (* _Amiram Eldar_, Aug 02 2025 *) %o A245345 (Sage) # uses [basepqsum from A245355] %o A245345 [basepqsum(9,2,i) for i in [0..100]] %o A245345 (PARI) a(n) = if(n == 0, 0, a(n\9 * 2) + n % 9); \\ _Amiram Eldar_, Aug 02 2025 %Y A245345 Cf. A000120, A007953, A024650, A053830, A244040. %K A245345 nonn,base,easy %O A245345 0,3 %A A245345 _Tom Edgar_, Jul 18 2014