A379901 Local maxima in A342042, in order of appearance: numbers m such that A342042(k-1) < A342042(k) = m > A342042(k+1), for k >= 2.
30, 50, 70, 90, 51, 71, 91, 52, 72, 92, 73, 93, 74, 94, 95, 96, 301, 501, 701, 901, 303, 502, 503, 702, 902, 703, 505, 704, 705, 903, 307, 507, 707, 904, 905, 906, 907, 909, 509, 710, 910, 911, 309, 510, 711, 912, 311, 511, 712, 313, 913, 512, 513, 713, 914, 515
Offset: 1
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..10000
Programs
-
Python
from itertools import count, islice def cond(s): return all(s[i+1] > s[i] for i in range(len(s)-1) if s[i] in "02468") def A342042gen(): # generator of A342042 seen, an = set(), 0 while True: yield an seen.add(an) d = an%10 an = minfirst = (1 - d%2)*(d+1) stran = str(an) while an in seen or not cond(stran): an += 1 stran = str(an) if int(stran[0]) < minfirst: an = minfirst*10**(len(stran)-1) def A3799012gen(): # generator of maxima, indices g = A342042gen() p = next(g) m = next(g) n = next(g) for k in count(2): if p < m > n: yield (m, k) p, m, n = m, n, next(g) print([t[0] for t in islice(A3799012gen(), 56)]) # Michael S. Branicky, Jan 08 2025
Comments