[go: up one dir, main page]

login
Largest metadrome (number with digits in strict ascending order) in base n.
21

%I #73 Apr 04 2024 10:00:27

%S 0,1,5,27,194,1865,22875,342391,6053444,123456789,2853116705,

%T 73686780563,2103299351334,65751519677857,2234152501943159,

%U 81985529216486895,3231407272993502984,136146740744970718253,6106233505124424657789,290464265927977839335179

%N Largest metadrome (number with digits in strict ascending order) in base n.

%C Also smallest zeroless pandigital number in base n. - _Franklin T. Adams-Watters_, Nov 15 2006

%C The smallest permutational number in A134640 in the n-positional system. - _Artur Jasinski_, Nov 07 2007

%H Vincenzo Librandi, <a href="/A023811/b023811.txt">Table of n, a(n) for n = 1..200</a>

%H Christian Perfect, <a href="http://aperiodical.com/2013/07/integer-sequence-reviews-on-numberphile-or-vice-versa/">Integer sequence reviews on Numberphile (or vice versa)</a>, 2013.

%H Chai Wah Wu, <a href="https://arxiv.org/abs/2403.20304">Pandigital and penholodigital numbers</a>, arXiv:2403.20304 [math.GM], 2024. See p. 1.

%F a(n) = Sum_{j=1...n-1} j*n^(n-1-j).

%F lim_{n->infinity} a(n)/a(n-1) - a(n-1)/a(n-2) = exp(1). - Conjectured by _Gerald McGarvey_, Sep 26 2004. Follows from the formula below and lim_{n->infinity} (1+1/n)^n = e. - _Franklin T. Adams-Watters_, Jan 25 2010

%F a(n) = (n^n-n^2+n-1)/(n-1)^2 = A058128(n)-1 = n*A060073(n)-1 (for n>=2). - _Henry Bottomley_, Feb 21 2001

%e a(5) = 1234[5] (in base 5) = 1*5^3 + 2*5^2 + 3*5 + 4 = 125 + 50 + 15 + 4 = 194.

%e a(10) = 123456789 (in base 10).

%p 0, seq((n^n-n^2+n-1)/(n-1)^2, n=2..100); # _Robert Israel_, Dec 13 2015

%t Table[Total[(#1 n^#2) & @@@ Transpose@ {Range[n - 1], Reverse@ (Range[n - 1] - 1)}], {n, 20}] (* _Michael De Vlieger_, Jul 24 2015 *)

%t Table[Sum[(b - k)*b^(k - 1), {k, b - 1}], {b, 30}] (* _Clark Kimberling_, Aug 22 2015 *)

%t Table[FromDigits[Range[0, n - 1], n], {n, 20}] (* _L. Edson Jeffery_, Dec 13 2015 *)

%o (PARI) {for(i=1,18,cuo=0; for(j=1,i-1,cuo=cuo+j*i^(i-j-1)); print1(cuo,", "))} \\\ _Douglas Latimer_, May 16 2012

%o (PARI) A023811(n)=if(n>1,(n^n-n^2)\(n-1)^2+1) \\ _M. F. Hasler_, Jan 22 2013

%o (Magma) [0] cat [(n^n-n^2+n-1)/(n-1)^2: n in [2..20]]; // _Vincenzo Librandi_, May 22 2012

%o (Haskell)

%o a023811 n = foldl (\val dig -> val * n + dig) 0 [0 .. n - 1]

%o -- _Reinhard Zumkeller_, Aug 29 2014

%o (Python)

%o def a(n): return (n**n - n**2 + n - 1)//((n - 1)**2) if n > 1 else 0

%o print([a(n) for n in range(1, 21)]) # _Michael S. Branicky_, Apr 24 2023

%Y Cf. A049363, A051846, A058128, A060073.

%Y Cf. A062813, A134640.

%K nonn,easy,base

%O 1,3

%A _Olivier GĂ©rard_

%E Edited by _M. F. Hasler_, Jan 22 2013