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 31-38 of 38 results.

A245335 Sum of digits of n in fractional base 5/4.

Original entry on oeis.org

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

Views

Author

James Van Alstine, Jul 18 2014

Keywords

Comments

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

Examples

			In base 5/4 the number 7 is represented by 42 and so a(7) = 4+2 = 6.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = If[n == 0, 0, a[4 * Floor[n/5]] + Mod[n, 5]]; Array[a, 100, 0] (* Amiram Eldar, Jul 31 2025 *)
  • PARI
    a(n) = my(ret=0,r); while(n, [n,r]=divrem(n,5); ret+=r; n<<=2); ret; \\ Kevin Ryde, Aug 11 2023
  • Sage
    # uses [basepqsum from A245355]
    [basepqsum(5,4,y) for y in [0..200]]
    

Formula

a(n) = A007953(A024634(n)). - Kevin Ryde, Aug 11 2023

A245341 Sum of digits of n written in fractional base 5/2.

Original entry on oeis.org

0, 1, 2, 3, 4, 2, 3, 4, 5, 6, 4, 5, 6, 7, 8, 3, 4, 5, 6, 7, 5, 6, 7, 8, 9, 4, 5, 6, 7, 8, 6, 7, 8, 9, 10, 8, 9, 10, 11, 12, 4, 5, 6, 7, 8, 6, 7, 8, 9, 10, 5, 6, 7, 8, 9, 7, 8, 9, 10, 11, 9, 10, 11, 12, 13, 5, 6, 7, 8, 9, 7, 8, 9, 10, 11, 6, 7, 8, 9, 10, 8, 9
Offset: 0

Views

Author

James Van Alstine, Jul 18 2014

Keywords

Comments

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

Examples

			In base 5/2 the number 7 is represented by 22 and so a(7) = 2+2 = 4.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) `if`(n<1, 0, irem(n, 5, 'q')+a(2*q)) end:
    seq(a(n), n=0..81);  # Alois P. Heinz, May 14 2021
  • Mathematica
    a[n_] := a[n] = If[n == 0, 0, a[2 * Floor[n/5]] + Mod[n, 5]]; Array[a, 100, 0] (* Amiram Eldar, Jul 30 2025 *)
  • PARI
    a(n) = if(n == 0, 0, a(n\5 * 2) + n % 5); \\ Amiram Eldar, Jul 30 2025
  • Sage
    # uses [basepqsum from A245355]
    [basepqsum(5,2,y) for y in [0..200]]
    

Formula

a(n) = A007953(A024632(n)). - Amiram Eldar, Jul 30 2025

Extensions

Definition corrected by Georg Fischer, May 14 2021

A245343 Sum of digits of n written in fractional base 5/3.

Original entry on oeis.org

0, 1, 2, 3, 4, 3, 4, 5, 6, 7, 4, 5, 6, 7, 8, 7, 8, 9, 10, 11, 6, 7, 8, 9, 10, 7, 8, 9, 10, 11, 10, 11, 12, 13, 14, 7, 8, 9, 10, 11, 10, 11, 12, 13, 14, 9, 10, 11, 12, 13, 10, 11, 12, 13, 14, 13, 14, 15, 16, 17, 8, 9, 10, 11, 12, 11, 12, 13, 14, 15
Offset: 0

Views

Author

James Van Alstine, Jul 18 2014

Keywords

Comments

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

Examples

			In base 5/3 the number 7 is represented by 32 and so a(7) = 3+2 = 5.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = If[n == 0, 0, a[3 * Floor[n/5]] + Mod[n, 5]]; Array[a, 100, 0] (* Amiram Eldar, Jul 30 2025 *)
  • PARI
    a(n) = if(n == 0, 0, a(n\5 * 3) + n % 5); \\ Amiram Eldar, Jul 30 2025
  • Sage
    # uses [basepqsum from A245355]
    [basepqsum(5,3,y) for y in [0..200]]
    

Formula

a(n) = A007953(A024633(n)). - Amiram Eldar, Jul 30 2025

Extensions

Name corrected by Bernard Schott, Mar 18 2020

A000999 5-adic valuation of binomial(2*n,n): largest k such that 5^k divides binomial(2*n, n).

Original entry on oeis.org

0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 2, 2, 1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 2, 2, 1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 3, 3, 2, 2, 2, 3, 3, 2, 2, 2, 3, 3, 1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 1
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Table[IntegerExponent[Binomial[2*n, n], 5], {n, 0, 100}] (* T. D. Noe, Jun 21 2012 *)
  • PARI
    a(n)=if(n<0,0,valuation(binomial(2*n,n),5))
    
  • PARI
    a(n) = my(v=digits(n,5),c=0); sum(i=0,#v-1, c=(c+v[#v-i]>=3)); \\ Kevin Ryde, Mar 07 2023

Formula

From Amiram Eldar, Feb 12 2021: (Start)
a(n) = A112765(A000984(n)).
a(n) = (2*A053824(n) - A053824(2*n))/4. (End)

Extensions

More terms from Michael Somos, Jun 27 2002

A037310 Numbers whose base-3 and base-5 expansions have the same digit sum.

Original entry on oeis.org

1, 2, 6, 7, 8, 10, 11, 15, 16, 17, 20, 30, 31, 32, 40, 41, 55, 56, 60, 61, 62, 65, 70, 71, 78, 79, 100, 101, 105, 106, 107, 129, 135, 136, 137, 141, 142, 143, 145, 146, 153, 154, 159, 170, 177, 178, 179, 180, 181, 182, 186, 187, 188
Offset: 1

Views

Author

Keywords

Comments

Also, numbers n such that the exponent of the largest power of 3 dividing n! is exactly twice the exponent of the largest power of 5 dividing n!. - Ivan Neretin, May 21 2015

Crossrefs

Cf. A037301 (similar, based upon 2 and 3).

Programs

  • Maple
    select(t -> convert(convert(t,base,3),`+`)=convert(convert(t,base,5),`+`), [$1..1000]); # Robert Israel, May 21 2015
  • Mathematica
    Select[Range[200],Total[IntegerDigits[#,3]]==Total[IntegerDigits[#,5]]&] (* Harvey P. Dale, Jun 06 2016 *)
  • PARI
    is(n)=sumdigits(n,3)==sumdigits(n,5) \\ Charles R Greathouse IV, May 21 2015

Formula

A053735(a(n)) = A053824(a(n)). - Robert Israel, May 21 2015

A037316 Numbers whose base-4 and base-5 expansions have the same digit sum.

Original entry on oeis.org

1, 2, 3, 28, 29, 40, 41, 42, 43, 52, 53, 54, 76, 77, 78, 79, 90, 91, 100, 101, 102, 103, 115, 136, 137, 138, 139, 160, 161, 162, 163, 188, 189, 210, 211, 236, 237, 238, 239, 270, 271, 280, 281, 282, 283, 295, 305, 306, 307, 330, 331
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A053737 (base-4 sum of digits), A053824 (base-5 sum of digits).

Programs

  • Maple
    filter:= n -> convert(convert(n,base,4),`+`)=convert(convert(n,base,5),`+`):
    select(filter, [$1..1000]); # Robert Israel, Mar 11 2018
  • Mathematica
    Select[Range[400],Total[IntegerDigits[#,4]]==Total[IntegerDigits[#,5]]&] (* Harvey P. Dale, Sep 15 2018 *)
  • PARI
    isok(k) = sumdigits(k, 4) == sumdigits(k, 5); \\ Michel Marcus, Jun 02 2021

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

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
Previous Showing 31-38 of 38 results.