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.

Showing 1-2 of 2 results.

A245420 Number of nonnegative integers with property that their base 8/5 expansion (see A024647) has n digits.

Original entry on oeis.org

8, 8, 16, 24, 40, 64, 96, 160, 256, 408, 648, 1040, 1664, 2664, 4264, 6816, 10912, 17456, 27928, 44688, 71496, 114400, 183040, 292864, 468576, 749728, 1199560, 1919296, 3070872, 4913400, 7861440, 12578304, 20125288, 32200456, 51520728, 82433168, 131893072
Offset: 1

Views

Author

Tom Edgar, Jul 21 2014

Keywords

Examples

			a(2) = 8 because 50, 51, 52, 53, 54, 55, 56, and 57 are the base 8/5 expansions for the numbers 8-15 respectively and these are the only integers with 2 digits.
		

Crossrefs

Programs

  • Sage
    A=[1]
    for i in [1..100]:
        A.append(ceil(((8-5)/5)*sum(A)))
    [8*x for x in A]

A245355 Sum of digits of n written in fractional base 8/5.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 5, 6, 7, 8, 9, 10, 11, 12, 7, 8, 9, 10, 11, 12, 13, 14, 12, 13, 14, 15, 16, 17, 18, 19, 11, 12, 13, 14, 15, 16, 17, 18, 13, 14, 15, 16, 17, 18, 19, 20, 18, 19, 20, 21, 22, 23, 24, 25, 14, 15, 16, 17, 18, 19, 20, 21, 13, 14, 15, 16, 17
Offset: 0

Views

Author

Tom Edgar, Jul 18 2014

Keywords

Comments

The base 8/5 expansion is unique and thus the sum of digits function is well-defined.

Examples

			In base 8/5 the number 20 is represented by 524 and so a(20) = 5 + 2 + 4 = 11.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = If[n == 0, 0, a[5 * Floor[n/8]] + Mod[n, 8]]; Array[a, 100, 0] (* Amiram Eldar, Aug 02 2025 *)
  • PARI
    a(n) = if(n == 0, 0, a(n\8 * 5) + n % 8); \\ Amiram Eldar, Aug 02 2025
  • Sage
    def basepqsum(p, q, n):
        L = [n]
        i = 1
        while L[i-1]>=p:
            x=L[i-1]
            L[i-1]=x.mod(p)
            L.append(q*(x//p))
            i+=1
        return sum(L)
    [basepqsum(8,5,i) for i in [0..100]]
    

Formula

a(n) = A007953(A024647(n)).
Showing 1-2 of 2 results.