The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A337857 a(n) is the smallest positive integer m with no repeated digits such that A137564(n + m) = n, or a(n) = 0 if no m exists. 2
 10, 20, 30, 40, 50, 60, 70, 80, 90, 90, 0, 109, 120, 127, 136, 145, 154, 163, 172, 180, 190, 0, 209, 218, 230, 236, 245, 254, 263, 270, 280, 290, 0, 309, 318, 327, 340, 345, 354, 360, 370, 380, 390, 0, 409, 418, 427, 436, 450, 450, 460, 470, 480, 490, 0, 509, 518, 527, 536, 540 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS Terms computed by Claudio Meller. We set a(n)=0 when n has repeated digits; for example, a(11) = 0, a(22) = 0, a(100) = 0, a(101) = 0, since compact(c) cannot result in such n. Is n=450 the first other number that has no solution? LINKS Michel Marcus, Table of n, a(n) for n = 1..449 PROG (PARI) f(n) = {my(d=digits(n)); fromdigits(vecextract(d, vecsort(vecsort(d, , 9))))}; \\ A137564 isokd(m) = my(d=digits(m)); #d == #Set(d); \\ A010784 a(n) = my(d=digits(n)); if (#Set(d) == #d, my(m=1); while (!isokd(m) || (f(n+m) != n), m++); m); \\ Michel Marcus, Jan 13 2022 (Python) def has_repeated_digits(n): s = str(n); return len(s) > len(set(s)) def A137564(n): seen, out, s = set(), "", str(n) for d in s: if d not in seen: out += d; seen.add(d) return int(out) def a(n): if n == 0 or has_repeated_digits(n): return 0 m = 1 while has_repeated_digits(m) or A137564(n+m) != n: m += 1 return m print([a(n) for n in range(1, 61)]) # Michael S. Branicky, Jul 23 2022 CROSSREFS Cf. A010784, A137564. Sequence in context: A044850 A282150 A338641 * A044895 A370400 A156819 Adjacent sequences: A337854 A337855 A337856 * A337858 A337859 A337860 KEYWORD base,nonn AUTHOR Rodolfo Kurchan, Sep 26 2020 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified August 11 20:46 EDT 2024. Contains 375073 sequences. (Running on oeis4.)