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.

A245399 Number of nonnegative integers with property that their base 6/5 expansion (see A024638) has n digits.

Original entry on oeis.org

6, 6, 6, 6, 6, 6, 12, 12, 12, 18, 18, 24, 30, 36, 42, 48, 60, 72, 84, 102, 126, 150, 180, 216, 258, 312, 372, 444, 534, 642, 768, 924, 1110, 1332, 1596, 1914, 2298, 2760, 3312, 3972, 4770, 5724, 6864, 8238, 9888, 11862, 14238, 17082, 20502, 24600, 29520, 35424
Offset: 1

Views

Author

Hailey R. Olafson, Jul 21 2014

Keywords

Examples

			a(3) = 6 because 540, 541, 542, 543, 544 and 545 are the base 6/5 expansions for the integers 12, 13, 14, 15, 16 and 17 respectively and these are the only integers with 3 digits.
		

Crossrefs

Programs

  • Mathematica
    A120170[n_]:= A120170[n] = If[n==1, 1, Ceiling[Sum[A120170[j], {j, n-1}]/5]]; Table[6*A120170[n], {n, 60}] (* G. C. Greubel, Aug 19 2019 *)
  • Sage
    A=[1]
    for i in [1..60]:
        A.append(ceil(((6-5)/5)*sum(A)))
    [6*x for x in A]

Formula

a(n) = 6*A120170(n).

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

Original entry on oeis.org

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, 17, 18, 19, 15, 16, 17, 18, 19, 20, 15, 16, 17, 18, 19, 20, 20, 21, 22, 23, 24, 25, 19, 20, 21, 22, 23, 24, 23, 24, 25, 26, 27, 28, 21, 22, 23, 24, 25, 26, 24, 25
Offset: 0

Views

Author

Tom Edgar, Jul 18 2014

Keywords

Comments

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

Examples

			In base 6/5 the number 15 is represented by 543 and so a(15) = 5 + 4 + 3 = 12.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) `if`(n<1, 0, irem(n, 6, 'q')+a(5*q)) end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Aug 19 2019
  • Mathematica
    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 *)
  • PARI
    a(n) = if(n == 0, 0, a(n\6 * 5) + n % 6); \\ Amiram Eldar, Jul 31 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(6,5,i) for i in [0..70]]
    

Formula

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