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.

A245321 Sum of digits of n written in fractional base 6/5.

This page as a plain text file.
%I A245321 #35 Jul 31 2025 02:38:56
%S A245321 0,1,2,3,4,5,5,6,7,8,9,10,9,10,11,12,13,14,12,13,14,15,16,17,14,15,16,
%T A245321 17,18,19,15,16,17,18,19,20,15,16,17,18,19,20,20,21,22,23,24,25,19,20,
%U A245321 21,22,23,24,23,24,25,26,27,28,21,22,23,24,25,26,24,25
%N A245321 Sum of digits of n written in fractional base 6/5.
%C A245321 The base 6/5 expansion is unique and thus the sum of digits function is well-defined.
%H A245321 Amiram Eldar, <a href="/A245321/b245321.txt">Table of n, a(n) for n = 0..10000</a> (terms 0..1000 from G. C. Greubel)
%H A245321 <a href="/index/Ba#base_fractional">Index entries for sequences related to fractional bases</a>.
%F A245321 a(n) = A007953(A024638(n)).
%e A245321 In base 6/5 the number 15 is represented by 543 and so a(15) = 5 + 4 + 3 = 12.
%p A245321 a:= proc(n) `if`(n<1, 0, irem(n, 6, 'q')+a(5*q)) end:
%p A245321 seq(a(n), n=0..100);  # _Alois P. Heinz_, Aug 19 2019
%t A245321 a[n_]:= a[n] = If[n==0, 0, a[5*Floor[n/6]] + Mod[n,6]]; Table[a[n], {n, 0, 70}] (* _G. C. Greubel_, Aug 19 2019 *)
%o A245321 (Sage)
%o A245321 def basepqsum(p,q,n):
%o A245321     L=[n]
%o A245321     i=1
%o A245321     while L[i-1]>=p:
%o A245321         x=L[i-1]
%o A245321         L[i-1]=x.mod(p)
%o A245321         L.append(q*(x//p))
%o A245321         i+=1
%o A245321     return sum(L)
%o A245321 [basepqsum(6,5,i) for i in [0..70]]
%o A245321 (PARI) a(n) = if(n == 0, 0, a(n\6 * 5) + n % 6); \\ _Amiram Eldar_, Jul 31 2025
%Y A245321 Cf. A000120, A007953, A024638, A053827, A244040.
%K A245321 nonn,base,easy
%O A245321 0,3
%A A245321 _Tom Edgar_, Jul 18 2014