A108551 Self-descriptive numbers in various bases represented in base 10.
100, 136, 1425, 389305, 8946176, 225331713, 6210001000, 186492227801, 6073061476032, 213404945384449, 8054585122464440, 325144322753909625, 13983676842985394176, 638488718313248327681, 30852387539151417415368, 1573159469597805848539033, 84423475200000000000008000
Offset: 1
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.
Links
- Iain Fox, Table of n, a(n) for n = 1..350
- Shyam Sunder Gupta, On Some Special Numbers, Exploring the Beauty of Fascinating Numbers, Springer (2025) Ch. 22, 527-565.
- Eric Weisstein's World of Mathematics, Self-Descriptive Number.
- Wikipedia, Self-descriptive number
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
Extensions
a(14)-a(17) from Iain Fox, Sep 16 2020
Comments