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.

A245338 Sum of digits of n written in fractional base 9/8.

This page as a plain text file.
%I A245338 #20 Aug 04 2025 02:17:23
%S A245338 0,1,2,3,4,5,6,7,8,8,9,10,11,12,13,14,15,16,15,16,17,18,19,20,21,22,
%T A245338 23,21,22,23,24,25,26,27,28,29,26,27,28,29,30,31,32,33,34,30,31,32,33,
%U A245338 34,35,36,37,38,33,34,35,36,37,38,39,40,41,35,36,37,38,39
%N A245338 Sum of digits of n written in fractional base 9/8.
%C A245338 The base 9/8 expansion is unique and thus the sum of digits function is well-defined.
%H A245338 Amiram Eldar, <a href="/A245338/b245338.txt">Table of n, a(n) for n = 0..10000</a>
%H A245338 <a href="/index/Ba#base_fractional">Index entries for sequences related to fractional bases</a>.
%F A245338 a(n) = A007953(A024656(n)).
%e A245338 In base 9/8 the number 16 is represented by 87 and so a(16) = 8 + 7 = 15.
%t A245338 a[n_] := a[n] = If[n == 0, 0, a[8 * Floor[n/9]] + Mod[n, 9]]; Array[a, 100, 0] (* _Amiram Eldar_, Aug 04 2025 *)
%o A245338 (Sage) # uses [basepqsum from A245355]
%o A245338 [basepqsum(9,8,i) for i in [0..100]]
%o A245338 (PARI) a(n) = if(n == 0, 0, a(n\9 * 8) + n % 9); \\ _Amiram Eldar_, Aug 04 2025
%Y A245338 Cf. A000120, A007953, A024656, A053830, A244040.
%K A245338 nonn,base,easy
%O A245338 0,3
%A A245338 _Tom Edgar_, Jul 18 2014