cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A337707 a(n) is the lowest number in the sequence of the first occurrence of exactly n consecutive numbers with at least one repeated digit, or -1 if no such number exists.

This page as a plain text file.
%I A337707 #54 Jan 17 2022 10:08:55
%S A337707 11,121,99,1898,12898,123898,1234898,12345898,123456898,110,1909,
%T A337707 10330,9188,9088,19787,129787,1239787,12349787,123459787,1210,12909,
%U A337707 103430,1024540,2988,1988,27987,237987,2347987,23457987,12310,123909,1034530,10245640,102356750,988,12988
%N A337707 a(n) is the lowest number in the sequence of the first occurrence of exactly n consecutive numbers with at least one repeated digit, or -1 if no such number exists.
%C A337707 Terms computed by _Claudio Meller_.
%C A337707 Does the term -1 first appear at a(55)?
%C A337707 All terms < 9876543210. - _Robert Israel_, Jan 14 2022
%H A337707 Michel Marcus, <a href="/A337707/b337707.txt">Table of n, a(n) for n = 1..54</a>
%H A337707 Michel Marcus, <a href="/A337707/a337707.txt">Positions and lengths</a>
%H A337707 Michel Marcus, <a href="/A337707/a337707_1.txt">Lengths and positions</a>
%e A337707 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).
%o A337707 (PARI) isokd(n) = my(d=digits(n)); #d != #Set(d); \\ A109303
%o A337707 isok(k, n) = {if (! isokd(k-1), for (i=k, k+n-1, if (! isokd(i), return (0)););! isokd(k+n););}
%o A337707 a(n) = {my(k=1); while (!isok(k, n), k++); k;} \\ _Michel Marcus_, Jan 13 2022
%o A337707 (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
%Y A337707 Cf. A109303.
%K A337707 base,nonn
%O A337707 1,1
%A A337707 _Rodolfo Kurchan_, Sep 26 2020