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.

A245341 Sum of digits of n written in fractional base 5/2.

This page as a plain text file.
%I A245341 #24 Jul 31 2025 03:49:02
%S A245341 0,1,2,3,4,2,3,4,5,6,4,5,6,7,8,3,4,5,6,7,5,6,7,8,9,4,5,6,7,8,6,7,8,9,
%T A245341 10,8,9,10,11,12,4,5,6,7,8,6,7,8,9,10,5,6,7,8,9,7,8,9,10,11,9,10,11,
%U A245341 12,13,5,6,7,8,9,7,8,9,10,11,6,7,8,9,10,8,9
%N A245341 Sum of digits of n written in fractional base 5/2.
%C A245341 The base 5/2 expansion is unique and thus the sum of digits function is well-defined.
%H A245341 Alois P. Heinz, <a href="/A245341/b245341.txt">Table of n, a(n) for n = 0..10000</a>
%H A245341 <a href="/index/Ba#base_fractional">Index entries for sequences related to fractional bases</a>.
%F A245341 a(n) = A007953(A024632(n)). - _Amiram Eldar_, Jul 30 2025
%e A245341 In base 5/2 the number 7 is represented by 22 and so a(7) = 2+2 = 4.
%p A245341 a:= proc(n) `if`(n<1, 0, irem(n, 5, 'q')+a(2*q)) end:
%p A245341 seq(a(n), n=0..81);  # _Alois P. Heinz_, May 14 2021
%t A245341 a[n_] := a[n] = If[n == 0, 0, a[2 * Floor[n/5]] + Mod[n, 5]]; Array[a, 100, 0] (* _Amiram Eldar_, Jul 30 2025 *)
%o A245341 (Sage) # uses [basepqsum from A245355]
%o A245341 [basepqsum(5,2,y) for y in [0..200]]
%o A245341 (PARI) a(n) = if(n == 0, 0, a(n\5 * 2) + n % 5); \\ _Amiram Eldar_, Jul 30 2025
%Y A245341 Cf. A024632, A007953, A053824, A215088.
%K A245341 nonn,base,easy
%O A245341 0,3
%A A245341 _James Van Alstine_, Jul 18 2014
%E A245341 Definition corrected by _Georg Fischer_, May 14 2021