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

A049363 a(1) = 1; for n > 1, smallest digitally balanced number in base n.

Original entry on oeis.org

1, 2, 11, 75, 694, 8345, 123717, 2177399, 44317196, 1023456789, 26432593615, 754777787027, 23609224079778, 802772380556705, 29480883458974409, 1162849439785405935, 49030176097150555672, 2200618769387072998445, 104753196945250864004691, 5271200265927977839335179
Offset: 1

Views

Author

Keywords

Comments

A037968(a(n)) = n and A037968(m) < n for m < a(n). - Reinhard Zumkeller, Oct 27 2003
Also smallest pandigital number in base n. - Franklin T. Adams-Watters, Nov 15 2006

Examples

			a(6) = 102345_6 = 1*6^5 + 2*6^3 + 3*6^2 + 4*6^1 + 5*6^0 = 8345.
		

Crossrefs

Column k=1 of A061845 and A378000 (for n>1).

Programs

  • Haskell
    a049363 n = foldl (\v d -> n * v + d) 0 (1 : 0 : [2..n-1])
    -- Reinhard Zumkeller, Apr 04 2012
    
  • Maple
    a:= n-> n^(n-1)+add((n-i)*n^(i-1), i=1..n-2):
    seq(a(n), n=1..23);  # Alois P. Heinz, May 02 2020
  • Mathematica
    Table[FromDigits[Join[{1,0},Range[2,n-1]],n],{n,20}] (* Harvey P. Dale, Oct 12 2012 *)
  • PARI
    A049363(n)=n^(n-1)+sum(i=1,n-2,n^(i-1)*(n-i))  \\ M. F. Hasler, Jan 10 2012
    
  • PARI
    A049363(n)=if(n>1,(n^n-n)/(n-1)^2+n^(n-2)*(n-1)-1,1)  \\ M. F. Hasler, Jan 12 2012
    
  • Python
    def A049363(n): return (n**n-n)//(n-1)**2+n**(n-2)*(n-1)-1 if n>1 else 1 # Chai Wah Wu, Mar 13 2024

Formula

a(n) = (102345....n-1) in base n. - Ulrich Schimke (ulrschimke(AT)aol.com)
For n > 1, a(n) = (n^n-n)/(n-1)^2 + n^(n-2)*(n-1) - 1 = A023811(n) + A053506(n). - Franklin T. Adams-Watters, Nov 15 2006
a(n) = n^(n-1) + Sum_{m=2..n-1} m * n^(n - 1 - m). - Alexander R. Povolotsky, Sep 18 2022

Extensions

More terms from Ulrich Schimke (ulrschimke(AT)aol.com)

A378000 Array read by ascending antidiagonals: T(n,k) is the k-th positive integer that is digitally balanced in base n.

Original entry on oeis.org

2, 11, 9, 75, 15, 10, 694, 78, 19, 12, 8345, 698, 99, 21, 35, 123717, 8350, 714, 108, 260, 37, 2177399, 123723, 8375, 722, 114, 266, 38, 44317196, 2177406, 123759, 8385, 738, 120, 268, 41, 1023456789, 44317204, 2177455, 123771, 8410, 742, 135, 278, 42
Offset: 2

Views

Author

Paolo Xausa, Nov 14 2024

Keywords

Comments

A digitally balanced number in base b contains every digit from 0 to b-1 in equal amount.

Examples

			Array begins:
  n\k|           1            2            3            4            5  ...
  -------------------------------------------------------------------------
   2 |           2,           9,          10,          12,          35, ... = A031443
   3 |          11,          15,          19,          21,         260, ... = A049354
   4 |          75,          78,          99,         108,         114, ... = A049355
   5 |         694,         698,         714,         722,         738, ... = A049356
   6 |        8345,        8350,        8375,        8385,        8410, ... = A049357
   7 |      123717,      123723,      123759,      123771,      123807, ... = A049358
   8 |     2177399,     2177406,     2177455,     2177469,     2177518, ... = A049359
   9 |    44317196,    44317204,    44317268,    44317284,    44317348, ... = A049360
  10 |  1023456789,  1023456798,  1023456879,  1023456897,  1023456978, ...
  11 | 26432593615, 26432593625, 26432593725, 26432593745, 26432593845, ...
  ...         |                                                       \______ A378001 (main diagonal)
           A049363
T(2,4) = 12 = 1100_2 is the fourth number in base 2 containing an equal amount of zeros and ones.
T(9,5) = 44317348 = 102345867_9 is the fifth number in base 9 containing an equal amount of digits from 0 to 8.
		

Crossrefs

Cf. A049363 (first column, from n = 2), A378001 (main diagonal).

Programs

  • Mathematica
    Module[{dmax = 10, a, m}, a = Table[m = FromDigits[Join[{1, 0}, Range[2, n-1]], n] - 1; Table[While[!SameQ@@DigitCount[++m, n]]; m, dmax-n+2], {n, dmax+1, 2, -1}]; Array[Diagonal[a, # - dmax] &, dmax]]

A049364 Smallest number that is digitally balanced in all bases 2, 3, ... n.

Original entry on oeis.org

2, 572, 8410815, 59609420837337474
Offset: 2

Views

Author

Keywords

Crossrefs

Cf. A031443, A049354, A049355, etc.
See A065963 for another version.

Extensions

a(5) from Joe K. Crump (joecr(AT)carolina.rr.com), Aug 29 2000, who reports that the next term is greater than 22185312344622607538702383625075608111920737991870030337.
a(6) > 5^434 and would be too large to include. This result comes from combining Joe K. Crump's algorithm with the observation that digitally balanced numbers in base 5 are all even and digitally balanced numbers in base 3 are even iff they are of even length. - Martin Fuller, Nov 27 2006

A049362 Digitally balanced numbers in bases 2, 3 and 4.

Original entry on oeis.org

8410815, 8411067, 8411631, 8411871, 8411895, 8412153, 8412855, 8413083, 8413161, 8416095, 8416119, 8416125, 8417133, 8417205, 8418795, 8418999, 8419035, 8419065, 8419743, 8419815, 8420055, 8420217, 8420253, 8427135
Offset: 1

Views

Author

Keywords

Comments

Is this sequence infinite?

Crossrefs

Intersection of A031443, A049354 and A049355.

Programs

  • Mathematica
    dbQ[n_, b_] := SameQ @@ DigitCount[n, b, Range[0, b - 1]]; With[{digMax = 3, termsNumber = 24}, Select[Union @@ Table[(FromDigits[#, 4] &) /@ Select[Permutations[Flatten[Table[Range[0, 3], k]]], #[[1]] > 0 &], {k, 1, digMax}], dbQ[#, 2] && dbQ[#, 3] &][[1 ;; termsNumber]]] (* Amiram Eldar, Feb 15 2024 *)

A145100 Integers in which no more than half the digits (rounded up) are the same, for all bases up to ten.

Original entry on oeis.org

1, 2, 17, 19, 25, 38, 52, 56, 75, 76, 82, 83, 90, 92, 97, 98, 100, 102, 104, 105, 108, 113, 116, 135, 139, 141, 142, 147, 150, 153, 163, 165, 177, 178, 180, 184, 195, 197, 198, 201, 204, 209, 210, 212, 225, 226, 232, 267, 269, 275, 278, 279, 291, 293, 294, 298
Offset: 1

Views

Author

Reikku Kulon, Oct 01 2008

Keywords

Examples

			267 in bases [2, 10] is 100001011, 100220, 10023, 2032, 1123, 531, 413, 326, 267. There are five zeros out of nine digits in its binary representation and no more than half the digits in the other bases are identical.
		

Crossrefs

A145101 Integers in which no digit occurs more than once more often than any other digit and not all repeated digits are identical, for all bases up to ten.

Original entry on oeis.org

1, 2, 17, 19, 25, 38, 52, 56, 75, 76, 82, 90, 92, 98, 100, 102, 104, 105, 108, 116, 141, 142, 150, 153, 177, 178, 180, 184, 195, 198, 204, 210, 212, 225, 226, 232, 294, 308, 316, 332, 395, 396, 410, 412, 420, 434, 450, 460, 481, 542, 572, 611, 689, 752, 818
Offset: 1

Views

Author

Reikku Kulon, Oct 01 2008

Keywords

Comments

Subset of A145100. The first number not in both sequences is 83.

Examples

			97 is in A145100 but not in this sequence: in base 3 it is 10121 and 1 occurs two times more often than either 0 or 2.
98 is in this sequence: in bases [2, 10] it is 1100010, 10122, 1202, 343, 242, 200, 142, 118, 98.
		

Crossrefs

A145104 Digitally fair numbers: integers n such that in all bases b = 2..10 no digit occurs more often than ceiling(d/b) times, where d is the number of digits of n in base b.

Original entry on oeis.org

1, 2, 19, 198, 25410896, 31596420, 10601629982, 10753657942, 11264883970, 11543640378, 11553029646, 11665278790, 12034384190, 12038440382, 12366849814, 12519032774, 12781964290, 12971872086, 13156400486
Offset: 1

Views

Author

Reikku Kulon, Oct 01 2008

Keywords

Comments

Presumed infinite. Next term >= 3^20.

Crossrefs

Extensions

More terms from Hagen von Eitzen, Jun 20 2009
Showing 1-7 of 7 results.