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 A245344 #21 Aug 02 2025 06:26:44 %S A245344 0,1,2,3,4,5,6,3,4,5,6,7,8,9,6,7,8,9,10,11,12,5,6,7,8,9,10,11,8,9,10, %T A245344 11,12,13,14,7,8,9,10,11,12,13,10,11,12,13,14,15,16,5,6,7,8,9,10,11,8, %U A245344 9,10,11,12,13,14,11,12,13,14,15,16,17 %N A245344 Sum of digits of n written in fractional base 7/3. %C A245344 The base 7/3 expansion is unique, and thus the sum of digits function is well-defined. %H A245344 Alois P. Heinz, <a href="/A245344/b245344.txt">Table of n, a(n) for n = 0..10000</a> %H A245344 <a href="/index/Ba#base_fractional">Index entries for sequences related to fractional bases</a>. %F A245344 a(n) = A007953(A024640(n)). - _Amiram Eldar_, Aug 02 2025 %e A245344 In base 7/3 the number 7 is represented by 30 and so a(7) = 3 + 0 = 3. %p A245344 a:= proc(n) `if`(n<1, 0, irem(n, 7, 'q')+a(3*q)) end: %p A245344 seq(a(n), n=0..69); # _Alois P. Heinz_, May 14 2021 %t A245344 a[n_] := a[n] = If[n == 0, 0, a[3 * Floor[n/7]] + Mod[n, 7]]; Array[a, 100, 0] (* _Amiram Eldar_, Aug 02 2025 *) %o A245344 (Sage) # uses [basepqsum from A245355] %o A245344 [basepqsum(7,3,y) for y in [0..200]] %o A245344 (PARI) a(n) = if(n == 0, 0, a(n\7 * 3) + n % 7); \\ _Amiram Eldar_, Aug 02 2025 %Y A245344 Cf. A007953, A024640, A053828, A007953. %K A245344 nonn,base,easy %O A245344 0,3 %A A245344 _James Van Alstine_, Jul 18 2014 %E A245344 Definition corrected by _Georg Fischer_, May 14 2021