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.

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.

This page as a plain text file.
%I A379903 #15 Jan 08 2025 05:55:19
%S A379903 0,13,15,17,19,25,27,29,35,37,39,47,49,57,59,69,79,103,105,107,109,
%T A379903 113,304,115,117,306,119,125,506,127,129,133,135,137,508,139,147,149,
%U A379903 153,155,157,159,169,173,175,177,179,193,195,312,197,199,233,235,237,514
%N 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.
%C A379903 a(1) = 0 is included as well.
%H A379903 Michael S. Branicky, <a href="/A379903/b379903.txt">Table of n, a(n) for n = 1..10000</a>
%o A379903 (Python)
%o A379903 from itertools import count, islice
%o A379903 def cond(s): return all(s[i+1] > s[i] for i in range(len(s)-1) if s[i] in "02468")
%o A379903 def A342042gen(): # generator of A342042
%o A379903     seen, an = set(), 0
%o A379903     while True:
%o A379903         yield an
%o A379903         seen.add(an)
%o A379903         d = an%10
%o A379903         an = minfirst = (1 - d%2)*(d+1)
%o A379903         stran = str(an)
%o A379903         while an in seen or not cond(stran):
%o A379903             an += 1
%o A379903             stran = str(an)
%o A379903             if int(stran[0]) < minfirst:
%o A379903                 an = minfirst*10**(len(stran)-1)
%o A379903 def A3799034gen(): # generator of minima, indices
%o A379903     g = A342042gen()
%o A379903     p = float('inf'); m = next(g); n = next(g)
%o A379903     for k in count(1):
%o A379903         if p > m < n: yield (m, k)
%o A379903         p, m, n = m, n, next(g)
%o A379903 print([t[0] for t in islice(A3799034gen(), 56)]) # _Michael S. Branicky_, Jan 08 2025
%Y A379903 Cf. A342042, A379901, A379902, A379904 (corresponding k's).
%K A379903 nonn,base
%O A379903 1,2
%A A379903 _Paolo Xausa_, Jan 05 2025