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.

A024647 n written in fractional base 8/5.

This page as a plain text file.
%I A024647 #19 Aug 02 2025 06:25:59
%S A024647 0,1,2,3,4,5,6,7,50,51,52,53,54,55,56,57,520,521,522,523,524,525,526,
%T A024647 527,570,571,572,573,574,575,576,577,5240,5241,5242,5243,5244,5245,
%U A024647 5246,5247,5710,5711,5712,5713,5714,5715,5716,5717,5760,5761,5762,5763,5764,5765
%N A024647 n written in fractional base 8/5.
%C A024647 To represent a number in base 8, if a digit exceeds 7, subtract 8 and carry 1. In the fractional base 8/5, subtract 8 and carry 5.
%H A024647 Amiram Eldar, <a href="/A024647/b024647.txt">Table of n, a(n) for n = 0..10000</a>
%H A024647 <a href="/index/Ba#base_fractional">Index entries for sequences related to fractional bases</a>.
%e A024647 The integers 0 through 7 are written with the digits 0 through 7.
%e A024647 Then, since b = 8/5 is written as 10, and 8 is five times 8/5, 8 is 50 in base 8/5, and therefore a(8) = 50.
%e A024647 a(16) = 520, since 5 * (8/5)^2 + 2 * (8/5) = 5 * 64/25 + 2 * 8/5 = 64/5 + 16/5 = 80/5 = 16.
%t A024647 Select[Table[FromDigits[IntegerDigits[n, 8]], {n, 0, 4095}], IntegerQ[FromDigits[IntegerDigits[#], 8/5]] &] (* _Alonso del Arte_, Aug 05 2019 *)
%t A024647 a[n_] := a[n] = If[n == 0, 0, 10 * a[5 * Floor[n/8]] + Mod[n, 8]]; Array[a, 50, 0] (* _Amiram Eldar_, Aug 02 2025 *)
%o A024647 (PARI) a(n) = if(n == 0, 0, 10 * a(n\8 * 5) + n % 8); \\ _Amiram Eldar_, Aug 02 2025
%Y A024647 Cf. A245355.
%K A024647 nonn,base,easy
%O A024647 0,3
%A A024647 _David W. Wilson_