A342042 When a digit d in the digit-stream of this sequence is even, the next digit is > d.
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 30, 13, 14, 50, 15, 16, 70, 17, 18, 90, 19, 23, 24, 51, 25, 26, 71, 27, 28, 91, 29, 31, 32, 33, 34, 52, 35, 36, 72, 37, 38, 92, 39, 45, 46, 73, 47, 48, 93, 49, 53, 54, 55, 56, 74, 57, 58, 94, 59, 67, 68, 95, 69, 75, 76, 77, 78, 96, 79, 89, 97, 98, 99, 101
Offset: 1
Links
- N. J. A. Sloane, Table of n, a(n) for n = 1..20000 [Computed using Rémy Sigrist's PARI program. The first 10000 terms were computed by Peter Kagey]
- Sebastian Karlsson, Proof of Theorem.
- Sebastian Karlsson, Proof of the second Theorem.
- Rémy Sigrist, Colored scatterplot of the first 20000 terms (where the color is function of the leading digit of a(n))
- Rémy Sigrist, PARI program for A342042
- N. J. A. Sloane, A Nasty Surprise in a Sequence and Other OEIS Stories, Experimental Mathematics Seminar, Rutgers University, Oct 10 2024, Youtube video; Slides [Mentions this sequence]
- N. J. A. Sloane, An Alternative Proof of the Theorem.
Crossrefs
Programs
-
PARI
\\ See Links section.
-
Python
def cond(s, minfirst): return all(s[i+1] > s[i] for i in range(len(s)-1) if s[i] in "02468") def aupton(terms): alst, seen = [0], {0} while len(alst) < terms: d = alst[-1]%10 an = minfirst = (1 - d%2)*(d+1) stran = str(an) while an in seen or not cond(stran, minfirst): an += 1 stran = str(an) if int(stran[0]) < minfirst: an = minfirst*10**(len(stran)-1) alst.append(an); seen.add(an) return alst print(aupton(77)) # Michael S. Branicky, Sep 07 2021
Extensions
Edited by N. J. A. Sloane, Nov 24 2024
Comments