login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A153980
Positive integers k equal to the sum of all the different integers formed by the digits of k (k itself excluded), keeping the order of the digits.
1
259146, 2185871, 2191530, 20317438, 22608949, 30512946, 33685085, 46400839, 81780856, 202677438, 302561193, 694999138, 711286401, 788309388, 1006626821, 1105599276
OFFSET
1,1
COMMENTS
a(17) > 2.25*10^9. - Tyler Busby, Apr 17 2024
a(17) > 5*10^10. - Michael S. Branicky, Oct 10 2024
EXAMPLE
Example 1 : 10554 is not in the sequence, because
0+ 1+ 4+ 5+ 10+ 14+ 15+ 54+ 55+ 104+ 105+ 154+ 155+ 554+ 1054+ 1055+ 1554 = 4893 (instead of 10554)
Example 2 : 259146 is in the sequence, because
1+ 2+ 4+ 5+ 6+ 9+ 14+ 16+ 21+ 24+ 25+ 26+ 29+ 46+ 51+ 54+ 56+ 59+ 91+ 94+ 96+ 146+ 214+ 216+ 246+ 251+ 254+ 256+ 259+ 291+ 294+ 296+ 514+ 516+ 546+ 591+ 594+ 596+ 914+ 916+ 946+ 2146+ 2514+ 2516+ 2546+ 2591+ 2594+ 2596+ 2914+ 2916+ 2946+ 5146+ 5914+ 5916+ 5946+ 9146+ 25146+ 25914+ 25916+ 25946+ 29146+ 59146 = 259146
MATHEMATICA
big = 55000000; seq = {}; i = 1;
f[x_] := Union[ Map[FromDigits, Subsets[IntegerDigits[x], {1, Length[IntegerDigits[x]] - 1}]]];
While[i < big, If[Total[f[i]] == i, Print[i]; AppendTo[seq, i]]; i++ ];
Print[seq]
PROG
(Python)
from itertools import combinations
def ok(n):
s, ds, ss = str(n), set(), 0
for d in range(len(s)-1, 0, -1):
for c in combinations(s, d):
t = int("".join(c))
if t not in ds:
ds.add(t)
ss += t
if ss > n:
return False
return n and ss == n
print([k for k in range(10**6) if ok(k)]) # Michael S. Branicky, Nov 07 2022
CROSSREFS
Cf. A065794 (where the integers formed can appear several times).
Sequence in context: A157670 A252921 A216204 * A317747 A252445 A184781
KEYWORD
base,nonn,more,changed
AUTHOR
Jean-Marc Falcoz, Jan 04 2009
EXTENSIONS
a(9) and a(10) from Sean A. Irvine, Dec 17 2009
a(11)-a(16) from Bert Dobbelaere, Apr 18 2019
Incorrect formula removed by Robert Israel, Oct 10 2024
STATUS
approved