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.
%I A055098 #22 Oct 11 2022 14:11:33 %S A055098 1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,1,2,1,2,2,2,2,2,2,2,1,2,2,1,2, %T A055098 2,2,2,2,2,1,2,2,2,1,2,2,2,2,2,1,2,2,2,2,1,2,2,2,2,1,2,2,2,2,2,1,2,2, %U A055098 2,1,2,2,2,2,2,2,1,2,2,1,2,2,2,2,2,2,2,1,2,1,2,2,2,2,2,2,2,2,1,1,2,4 %N A055098 Number of distinct anagrams of digits of n without leading zeros. %H A055098 Reinhard Zumkeller, <a href="/A055098/b055098.txt">Table of n, a(n) for n = 1..10000</a> %F A055098 a(n) = O(n/(log n)^(9/2)). - _Charles R Greathouse IV_, Aug 24 2022 %e A055098 a(101)=2 since the digits of 101 can be ordered 101 or 110 (but not 011). %t A055098 a[n_] := Length[ DeleteCases[ Permutations[ IntegerDigits[n]], {0 .., __}]]; Table[a[n], {n, 1, 102}] (* _Jean-François Alcover_, Nov 30 2011 *) %o A055098 (Haskell) %o A055098 import Data.List (permutations, nub) %o A055098 a055098 n = length $ nub $ filter ((> '0') . head) $ permutations $ show n %o A055098 -- _Reinhard Zumkeller_, Aug 14 2011 %o A055098 (PARI) a(n)={my(v=digits(n), f=vector(10), n=#v); for(i=1, #v, f[1+v[i]]++); (1 - f[1]/n) * n! / prod(i=1, #f, f[i]!)} \\ _Andrew Howroyd_, Jan 27 2020 %o A055098 (Python) %o A055098 from math import factorial, prod %o A055098 def a(n): %o A055098 s = str(n); d, c = len(s), [s.count(str(i)) for i in range(10)] %o A055098 return (d-c[0])*factorial(d-1)//prod(map(factorial, c)) %o A055098 print([a(n) for n in range(1, 50)]) # _Michael S. Branicky_, Aug 24 2022 %Y A055098 Cf. A046810, A047726. %K A055098 base,easy,nice,nonn %O A055098 1,12 %A A055098 _Henry Bottomley_, Apr 19 2000