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.

Previous Showing 11-11 of 11 results.

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.

Original entry on oeis.org

11, 121, 99, 1898, 12898, 123898, 1234898, 12345898, 123456898, 110, 1909, 10330, 9188, 9088, 19787, 129787, 1239787, 12349787, 123459787, 1210, 12909, 103430, 1024540, 2988, 1988, 27987, 237987, 2347987, 23457987, 12310, 123909, 1034530, 10245640, 102356750, 988, 12988
Offset: 1

Views

Author

Rodolfo Kurchan, Sep 26 2020

Keywords

Comments

Terms computed by Claudio Meller.
Does the term -1 first appear at a(55)?
All terms < 9876543210. - Robert Israel, Jan 14 2022

Examples

			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).
		

Crossrefs

Cf. A109303.

Programs

  • 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
Previous Showing 11-11 of 11 results.