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