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.

A024638 n written in fractional base 6/5.

This page as a plain text file.
%I A024638 #40 Aug 08 2023 07:58:52
%S A024638 0,1,2,3,4,5,50,51,52,53,54,55,540,541,542,543,544,545,5430,5431,5432,
%T A024638 5433,5434,5435,54320,54321,54322,54323,54324,54325,543210,543211,
%U A024638 543212,543213,543214,543215,5432100,5432101,5432102,5432103,5432104,5432105,5432150
%N A024638 n written in fractional base 6/5.
%H A024638 Andrew Howroyd, <a href="/A024638/b024638.txt">Table of n, a(n) for n = 0..1000</a>
%H A024638 <a href="/index/Ba#base_fractional">Index entries for sequences related to fractional bases</a>
%F A024638 To represent a number in base b, if a digit exceeds b, subtract b and carry 1. In fractional base a/b, subtract a and carry b.
%p A024638 a:= proc(n) `if`(n<1, 0, irem(n, 6, 'q')+a(5*q)*10) end:
%p A024638 seq(a(n), n=0..45);  # _Alois P. Heinz_, Aug 19 2019
%t A024638 a[n_]:= If[n==0, 0, 10*a[5*Floor[n/6]] + Mod[n, 6]]; Table[a[n], {n, 0, 50}] (* _G. C. Greubel_, Aug 19 2019 *)
%o A024638 (Sage)
%o A024638 def basepqExpansion(p, q, n):
%o A024638     L, i = [n], 1
%o A024638     while L[i-1] >= p:
%o A024638         x = L[i-1]
%o A024638         L[i-1] = x.mod(p)
%o A024638         L.append(q*floor(x/p))
%o A024638         i += 1
%o A024638     L.reverse()
%o A024638     return Integer(''.join(map(str, L)))
%o A024638 [basepqExpansion(6,5,i) for i in [0..50]] # _Tom Edgar_, _Hailey R. Olafson_, and _James Van Alstine_, Jul 18 2014; modified and corrected by _Peter Luschny_, Aug 19 2019
%o A024638 (PARI) a(n) = {if(n<1, 0, a(n\6 * 5) * 10 + n%6)}; \\ _Andrew Howroyd_, Aug 19 2019
%Y A024638 Cf. A245321, A245399.
%Y A024638 Cf. A024629.
%K A024638 nonn,base
%O A024638 0,3
%A A024638 _David W. Wilson_
%E A024638 Terms a(42) and beyond from _Andrew Howroyd_, Aug 19 2019