A379903 Local minima in A342042, in order of appearance: numbers m such that A342042(k-1) > A342042(k) = m < A342042(k+1), for k >= 2.
0, 13, 15, 17, 19, 25, 27, 29, 35, 37, 39, 47, 49, 57, 59, 69, 79, 103, 105, 107, 109, 113, 304, 115, 117, 306, 119, 125, 506, 127, 129, 133, 135, 137, 508, 139, 147, 149, 153, 155, 157, 159, 169, 173, 175, 177, 179, 193, 195, 312, 197, 199, 233, 235, 237, 514
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 A3799034gen(): # generator of minima, indices g = A342042gen() p = float('inf'); m = next(g); n = next(g) for k in count(1): if p > m < n: yield (m, k) p, m, n = m, n, next(g) print([t[0] for t in islice(A3799034gen(), 56)]) # Michael S. Branicky, Jan 08 2025
Comments