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-3 of 3 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)

A037914 a(n) is the least base b>=2 such that the number of distinct digits in the base b representation of n is maximized.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Original title: a(n)=least base b>=2 such that f(b,n)>=f(b',n) for all b'>=2, where f(b,n)=number of distinct base b digits of n.

Crossrefs

See A037968 for the greatest number of digits over all bases b>=2.

Extensions

Offset corrected and title simplified by Sean A. Irvine, Dec 27 2020

A246535 Largest number with at most n distinct digits in any base b >= 2 (written in decimal).

Original entry on oeis.org

1, 43, 2462, 140081, 20338085, 2610787117
Offset: 1

Views

Author

Joonas Pohjonen, Aug 28 2014

Keywords

Comments

a(n) is the last occurrence of n in A037968.
a(n) >= A049363(n+1) - 1 for all n. - Derek Orr, Aug 31 2014
From Derek Orr, Aug 31 2014 (Start):
At least for 1 <= n <= 5, a(n)+1 fails when written in base n^2+1. Examples:
a(1) = 1 written in base 2 is 1 (1 distinct digit). 2 written in base (2-1)^2+1 = 2 is 10. Thus 2 fails.
a(2) = 43 written in base 3 is 1121 (2 distinct digits). 44 written in base 2^2+1 = 5 is 134. Thus 44 fails.
a(3) = 2462 written in base 4 is 212132 (3 distinct digits). 2463 written in base 3^2+1 = 10 is 2463. Thus 2463 fails.
Generalizing... (Conjecture)
a(n) written in base n+1 has n distinct digits. a(n)+1 written in base n^2+1 will always have n+1 distinct digits.
Further, for 1 < n <= 5, a(n)-1 fails when written in base n^2+1.
(End)
a(1)-a(6) are confirmed for all n <= 10^11. - Hiroaki Yamanouchi, Sep 21 2014
a(6) = 2610787117 written in base 7 is 121461216151 (5 distinct digits), and 2610787118 written in base 6^2+1 = 37 is (1)(0)(24)(1)(22)(2)(0) (5 distinct digits). Therefore, Derek Orr's conjecture seems to be wrong.
a(7) >= 314941024802. - Hiroaki Yamanouchi, Sep 21 2014

Examples

			a(2) = 43 since 43 has two distinct digits in bases 2 <= b <= 5, 7 <= b <= 41 and b = 43, and one distinct digit in bases b = 6, b = 42 and b >= 44. All greater numbers have at least 3 distinct digits in some base b >= 2.
		

Crossrefs

Cf. A037968.

Extensions

a(6) from Hiroaki Yamanouchi, Sep 21 2014
Showing 1-3 of 3 results.