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.

Previous Showing 21-25 of 25 results.

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)).

A037322 Numbers whose base-5 and base-6 expansions have the same digit sum.

Original entry on oeis.org

1, 2, 3, 4, 45, 46, 47, 66, 67, 68, 69, 85, 86, 87, 88, 89, 145, 146, 147, 148, 149, 168, 169, 186, 187, 188, 189, 225, 226, 227, 265, 266, 267, 268, 269, 306, 307, 308, 309, 325, 326, 327, 328, 329, 370, 371, 408, 409, 490, 491
Offset: 1

Views

Author

Keywords

Programs

  • Mathematica
    Select[Range[500],Total[IntegerDigits[#,5]]==Total[IntegerDigits[#,6]]&] (* Harvey P. Dale, Mar 27 2022 *)

Formula

{n: A053824(n) = A053827(n).} - R. J. Mathar, Jun 30 2021

A089293 Sum of digits in the mixed-base enumeration system n=...d(4)d(3)d(2)d(1), where the digits satisfy 0<=d(i)<=1 if i is odd, 0<=d(i)<=2 if i is even.

Original entry on oeis.org

0, 1, 1, 2, 2, 3, 1, 2, 2, 3, 3, 4, 1, 2, 2, 3, 3, 4, 2, 3, 3, 4, 4, 5, 2, 3, 3, 4, 4, 5, 3, 4, 4, 5, 5, 6, 1, 2, 2, 3, 3, 4, 2, 3, 3, 4, 4, 5, 2, 3, 3, 4, 4, 5, 3, 4, 4, 5, 5, 6, 3, 4, 4, 5, 5, 6, 4, 5, 5, 6, 6, 7, 1, 2, 2, 3, 3, 4, 2, 3, 3, 4, 4, 5, 2, 3, 3, 4, 4, 5, 3, 4, 4, 5, 5, 6, 3, 4, 4, 5, 5, 6, 4, 5, 5
Offset: 0

Views

Author

John W. Layman, Jan 15 2004

Keywords

Comments

Counting 0,1,2,3,... (base 10) in this mixed-base system proceeds as follows: 0,1,10,11,20,21,100,101,110,111,120,121,1000,.. = A109827.

Examples

			11(base 10) = 121(mixed-base), so a(11)=4.
		

Crossrefs

Cf. A109827 (mixed-base).
Sums of digits in other bases: A000120 (binary), A053735 (ternary), A053827 (base 6).

Programs

  • PARI
    a(n) = vecsum(digits(n,6)\/2); \\ Kevin Ryde, Aug 03 2021

Formula

a(n)=a(n-1)+1 if n=1, 3, 5 mod 6; a(n)=a(n-1) if n=2, 4 mod 5; a(n)=a(n/6) if n=0 mod 6.

A135738 Least positive integer with even digit sum in bases 2..n.

Original entry on oeis.org

3, 6, 10, 10, 54, 54, 54, 54, 130, 130, 130, 130, 390, 390, 2000, 2000, 3238, 3238, 4080, 4080, 7326, 7326, 16584, 16584, 17310, 17310, 17310, 17310, 17310, 17310, 17310, 17310, 231000, 231000, 231000, 231000, 466352, 466352, 466352, 466352, 3020830
Offset: 2

Views

Author

M. F. Hasler, Dec 06 2007

Keywords

Comments

The sequence is obviously increasing. It seems that a(2n+1) = a(2n) for n > 1. Is there a simple proof? Is there a simple way to construct a(n)? Notice the pattern in base N, e.g., 130 = 10000010_2 = 11211_3 = 2002_4 = 1010_5 = 334_6 = 244_7 = 202_8 = 154_9 = 109_11 = {10}{10}_12 = {10}0_13.

Examples

			a(2)=3 since 1=1_2, 2=10_2, so 3=11_2 is the number > 0 with even digit sum (1+1) in base 2.
a(3)=6 since 4=100_2, 5=12_3, so 6=20_3=110_2 is the least N > 0 with even digit sum in base 2 and in base 3.
a(4)=a(5)=10=1010_2=101_3=22_4=20_5 is the least N > 0 having even digit sum in bases 2 through 4 and has so also in base 5.
		

Crossrefs

Programs

  • PARI
    digitsum(n,b=10,s)={n=[n];while(n=divrem(n[1],b),s+=n[2]);s}
    A135738(Bmax,n=1)={until(!n++,for(b=2,Bmax,digitsum(n,b)%2&next(2));return(n))} /* n-th element of the sequence */
    t=1;for(b=2,100,print(b,":",t=A135738(b,t))) /* display the list */

Extensions

Corrected example a(3)=5 to a(3)=6 David Yablon (davar55(AT)yahoo.com), Mar 19 2010

A037327 Numbers whose base-6 and base-7 expansions have the same digit sum.

Original entry on oeis.org

1, 2, 3, 4, 5, 66, 67, 68, 69, 126, 127, 128, 129, 130, 131, 156, 157, 158, 159, 160, 189, 190, 191, 246, 247, 248, 249, 250, 251, 280, 281, 308, 309, 310, 311, 366, 367, 368, 369, 370, 396, 397, 398, 456, 457, 458, 459, 460, 461, 518, 519, 520, 521, 546, 547
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • PARI
    isok(k) = sumdigits(k, 6) == sumdigits(k, 7); \\ Michel Marcus, Mar 18 2023
    
  • Python
    from numpy import base_repr
    def ok(n):
        return sum(map(int, base_repr(n, 6))) == sum(map(int, base_repr(n, 7)))
    print([n for n in range(1, 10**5) if ok(n)])
    # Christoph B. Kassir, Apr 05 2023

Formula

{n: A053827(n) = A053828(n)}. - R. J. Mathar, Jun 30 2021
Previous Showing 21-25 of 25 results.