OFFSET
1,1
COMMENTS
This sequence differs from A241754 because this sequence uses permutations only once.
Permutations are of the same length k, leading zeros are allowed.
The k's in the sequence are: 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 7, 10, 10, 10, 10, 10, 10, 10, 10, 10, 6, 7, 7, 8, 7, 9, 9.
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..33 (terms < 10^16)
EXAMPLE
10545 = 014 + 015 + 041 + 045 + 051 + 054 + 055 + 104 + 105 + 140 + 145 + 150 + 154 + 155 + 401 + 405 + 410 + 415 + 450 + 451 + 455 + 501 + 504 + 505 + 510 + 514 + 515 + 540 + 541 + 545 + 550 + 551 + 554.
PROG
(Python)
import itertools
def getData(a, b):
dig = (itertools.permutations(str(a), b))
for d in dig:
yield d
for w in range(2, 6):
kk=int(w*'1')
for i in range (kk, 10**(w+3), kk):
m=[]
get = getData(i, w)
while True:
try:
n = next(get)
ee=int("".join((n)))
if ee not in m:
m.append(ee)
except StopIteration:
if sum (m)==i and len(m)>1:
m.sort()
print (sum(m), len(m), m, i)
break
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Pieter Post, Sep 16 2018
EXTENSIONS
a(12)-a(26) from Giovanni Resta, Sep 16 2018
STATUS
approved