OFFSET
1,1
COMMENTS
Terms computed by Claudio Meller.
Does the term -1 first appear at a(55)?
All terms < 9876543210. - Robert Israel, Jan 14 2022
LINKS
Michel Marcus, Table of n, a(n) for n = 1..54
Michel Marcus, Positions and lengths
Michel Marcus, Lengths and positions
EXAMPLE
a(3) = 99 is the smallest number in the first appearance sequence of 3 consecutive numbers with repeated digits, 99, 100 and 101, a(15) = 19787 is the smallest number in the first appearance sequence of 15 consecutive numbers with repeated digits that starts in 19787 and finish in 19801 (19802 has no repeated digits).
PROG
(PARI) isokd(n) = my(d=digits(n)); #d != #Set(d); \\ A109303
isok(k, n) = {if (! isokd(k-1), for (i=k, k+n-1, if (! isokd(i), return (0)); ); ! isokd(k+n); ); }
a(n) = {my(k=1); while (!isok(k, n), k++); k; } \\ Michel Marcus, Jan 13 2022
(PARI) lista(nn) = {my(map=Map(), r=isokd(1), nb, k, nbmax=0); for (n=2, nn, my(rr = isokd(n)); if (r, if (rr, nb++, if (! mapisdefined(map, nb), mapput(map, nb, k)); nb=0), if (rr, nb=1; k=n, nb=0); ); r = rr; ); map; } \\ Michel Marcus, Jan 14 2022
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Rodolfo Kurchan, Sep 26 2020
STATUS
approved