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

A108551 Self-descriptive numbers in various bases represented in base 10.

Original entry on oeis.org

100, 136, 1425, 389305, 8946176, 225331713, 6210001000, 186492227801, 6073061476032, 213404945384449, 8054585122464440, 325144322753909625, 13983676842985394176, 638488718313248327681, 30852387539151417415368, 1573159469597805848539033, 84423475200000000000008000
Offset: 1

Views

Author

Alonso del Arte, Jun 07 2005

Keywords

Comments

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.
From Iain Fox, Sep 16 2020: (Start)
(b-4)*b^(b-1) + 2*b^(b-2) + b^(b-3) + b^3 is in this sequence for b=4 and b>6.
For b>6, there exists exactly one self-descriptive number of base b. This number is of the form stated in the comment above.
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.
(End)

Examples

			1210_4 = 100, 2020_4 = 136, 21200_5 = 1425, 3211000_7 = 389305,
42101000_8 = 8946176, 521001000_9 = 225331713, 6210001000_10,
72100001000_11 = 186492227801, 821000001000_12 = 6073061476032,
9210000001000_13 = 213404945384449, (10)2100000001000_14 =
8054585122464440, (11)21000000001000_15 = 325144322753909625,
(12)21000000001000_16 = 13983676842985394176, etc.
		

References

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

Crossrefs

Cf. A046043. See A274943 for another version.

Programs

  • Mathematica
    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}]
    (* 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 *)
  • 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

Formula

From Iain Fox, Sep 16 2020: (Start)
For n>3,
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.
a(n) = A274943(n+3).
(End)

Extensions

a(14)-a(17) from Iain Fox, Sep 16 2020
Showing 1-1 of 1 results.