login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A108551 Self-descriptive numbers in various bases represented in base 10. 4

%I #33 Oct 24 2020 17:33:31

%S 100,136,1425,389305,8946176,225331713,6210001000,186492227801,

%T 6073061476032,213404945384449,8054585122464440,325144322753909625,

%U 13983676842985394176,638488718313248327681,30852387539151417415368,1573159469597805848539033,84423475200000000000008000

%N Self-descriptive numbers in various bases represented in base 10.

%C A self-descriptive number in base b has b digits, indexed by 0 ... b-1 and for all n, the n-th digit equals the number of n's in the number. In base 10 there is exactly one such number, 6210001000.

%C From _Iain Fox_, Sep 16 2020: (Start)

%C (b-4)*b^(b-1) + 2*b^(b-2) + b^(b-3) + b^3 is in this sequence for b=4 and b>6.

%C For b>6, there exists exactly one self-descriptive number of base b. This number is of the form stated in the comment above.

%C Proof: A number in this sequence is of the form x_0*b^(b-1) + x_1*b^(b-2) + ... + x_{b-2}*b + x_{b-1} where x_i is an integer on the interval [0, b-1] and represents the number of times i appears in the sequence d = x_0, x_1, ..., x_{b-1}. Trivially, x_0 > 0. Let p be the number of nonzero terms in the sequence d. It is easy to see that p = Sum_{i=1..b-1} x_i. Since x_0 > 0, the number of nonzero terms in the sequence e = x_1, x_2, ..., x_{b-1} is p-1. Since the sum of the terms of e is one more than the number of nonzero terms in e, one term of e is 2 and the rest are either 0 or 1. This means that the only terms that can be in d are 0, 1, 2, and x_0, and thus there can be a maximum of four nonzero terms in d. Since there is a maximum of four nonzero terms in d, it is trivial that, for b>6, x_0>2. Thus, for b>6, there are exactly four nonzero terms in d. It is simple to determine that the four nonzero terms are x_0 = b-4, x_1 = 2, x_2 = 1, and x_{x_0} = x_{b-4} = 1.

%C (End)

%D Clifford Pickover, Keys to Infinity, Chapter 28, "Chaos in Ontario." New York: Wiley, pp. 217-219, 1995.

%H Iain Fox, <a href="/A108551/b108551.txt">Table of n, a(n) for n = 1..350</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/Self-DescriptiveNumber.html">Self-Descriptive Number</a>.

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Self-descriptive_number">Self-descriptive number</a>

%F From _Iain Fox_, Sep 16 2020: (Start)

%F For n>3,

%F a(n) = (n-1)*(n+3)^(n+2) + 2*(n+3)^(n+1) + (n+3)^n + (n+3)^3 = (n+2)*(n*(n+3)-1)*(n+3)^n + (n+3)^3.

%F a(n) = A274943(n+3).

%F (End)

%e 1210_4 = 100, 2020_4 = 136, 21200_5 = 1425, 3211000_7 = 389305,

%e 42101000_8 = 8946176, 521001000_9 = 225331713, 6210001000_10,

%e 72100001000_11 = 186492227801, 821000001000_12 = 6073061476032,

%e 9210000001000_13 = 213404945384449, (10)2100000001000_14 =

%e 8054585122464440, (11)21000000001000_15 = 325144322753909625,

%e (12)21000000001000_16 = 13983676842985394176, etc.

%t Do[id = IntegerDigits[n, base]; If[id == (Count[id, # ] & /@ Range[0, base - 1]), Print[n]], {base, 2, 10}, {n, base^(base - 1), (base^base) - 1, base}]

%t (* first do *) Needs["DiscreteMath`Combinatorica`"] (* then *) fQ[lst_] := (lst == (Count[lst, # ] & /@ Range[0, Length[lst] - 1])); f[n_] := Block[{pts = PadLeft[ #, n] & /@ Partitions[n], k = 1, l = PartitionsP[n], lst = {}}, While[k < l, AppendTo[ lst, FromDigits[ Flatten[ Select[ Permutations[ pts[[k]]], fQ[ # ] &]], n]]; k++ ]; Drop[ Union[ lst], 1]]; Table[ f[n], {n, 2, 15}] (* _Robert G. Wilson v_, Jun 07 2005 *)

%o (PARI) a(n)=if(n<4, [100, 136, 1425][n], (n+2)*(n*(n+3)-1)*(n+3)^n+(n+3)^3) \\ _Iain Fox_, Sep 16 2020

%Y Cf. A046043. See A274943 for another version.

%K base,nonn

%O 1,1

%A _Alonso del Arte_, Jun 07 2005

%E a(14)-a(17) from _Iain Fox_, Sep 16 2020

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 17:10 EDT 2024. Contains 371962 sequences. (Running on oeis4.)