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.

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.

This page as a plain text file.
%I A379901 #13 Jan 08 2025 05:55:28
%S A379901 30,50,70,90,51,71,91,52,72,92,73,93,74,94,95,96,301,501,701,901,303,
%T A379901 502,503,702,902,703,505,704,705,903,307,507,707,904,905,906,907,909,
%U A379901 509,710,910,911,309,510,711,912,311,511,712,313,913,512,513,713,914,515
%N 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.
%H A379901 Michael S. Branicky, <a href="/A379901/b379901.txt">Table of n, a(n) for n = 1..10000</a>
%o A379901 (Python)
%o A379901 from itertools import count, islice
%o A379901 def cond(s): return all(s[i+1] > s[i] for i in range(len(s)-1) if s[i] in "02468")
%o A379901 def A342042gen(): # generator of A342042
%o A379901     seen, an = set(), 0
%o A379901     while True:
%o A379901         yield an
%o A379901         seen.add(an)
%o A379901         d = an%10
%o A379901         an = minfirst = (1 - d%2)*(d+1)
%o A379901         stran = str(an)
%o A379901         while an in seen or not cond(stran):
%o A379901             an += 1
%o A379901             stran = str(an)
%o A379901             if int(stran[0]) < minfirst:
%o A379901                 an = minfirst*10**(len(stran)-1)
%o A379901 def A3799012gen(): # generator of maxima, indices
%o A379901     g = A342042gen()
%o A379901     p = next(g)
%o A379901     m = next(g)
%o A379901     n = next(g)
%o A379901     for k in count(2):
%o A379901         if p < m > n: yield (m, k)
%o A379901         p, m, n = m, n, next(g)
%o A379901 print([t[0] for t in islice(A3799012gen(), 56)]) # _Michael S. Branicky_, Jan 08 2025
%Y A379901 Cf. A342042, A379902 (corresponding k's), A379903, A379904.
%K A379901 nonn,base
%O A379901 1,1
%A A379901 _Paolo Xausa_, Jan 05 2025