OFFSET
1,1
COMMENTS
A007953(a(n)) = 6; number of repdigits = #{6,33,222,111111} = A242627(6) = 4. - Reinhard Zumkeller, Jul 17 2014
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..12376 (terms 1..924 from Vincenzo Librandi; all terms with <= 12 digits)
MATHEMATICA
Select[Range[10^4], Total[IntegerDigits[#]] == 6 &] (* Vincenzo Librandi, Mar 07 2013 *)
PROG
(Magma) [n: n in [1..1500] | &+Intseq(n) eq 6 ]; // Vincenzo Librandi, Mar 07 2013
(Haskell)
a052220 n = a052220_list !! (n-1)
a052220_list = filter ((== 6) . a007953) [0..]
-- Reinhard Zumkeller, Jul 17 2014
(Python)
from sympy.utilities.iterables import multiset_permutations
def auptodigs(maxdigits):
alst = []
for d in range(1, maxdigits+1):
digset = "0"*(d-1) + "11111122233456"
for p in multiset_permutations(digset, d):
if p[0] != '0' and sum(map(int, p)) == 6:
alst.append(int("".join(p)))
return alst
print(auptodigs(4)) # Michael S. Branicky, Jun 15 2021
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Henry Bottomley, Feb 01 2000
EXTENSIONS
Offset changed from Bruno Berselli, Mar 07 2013
STATUS
approved