login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A332070 Lexicographically earliest sequence with a(n) odd digits among the first a(n+1) decimal digits, for any n; a(1) = 1, a(2) = 2. 1
1, 2, 3, 5, 8, 11, 21, 31, 41, 51, 62, 80, 201, 331, 511, 711, 911, 1111, 1311, 1511, 1711, 1911, 2111, 3111, 4111, 5111, 6111, 7200, 8289, 9378, 10467, 11556, 12645, 13734, 14823, 20000, 26000, 40000, 60000, 80000, 200000, 400000, 600000, 800000 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Without the requirement a(2) = 2 (or: increasing, or: without repeated terms), the trivial sequence (1, 1, 1, ...) = A000012 would also satisfy the definition, repeatedly stating that the first digit is odd, ignoring all other digits. But a(2) - a(1) > 0 implies that the sequence will be strictly increasing throughout, and therefore make infinitely many nontrivial statements concerning all of its digits.
The formula comes from the fact that if we have a(n-1) odd digits among the first a(n) digits, and we need a(n) odd digits among the first a(n+1) digits, then we must use exactly a(n) - a(n-1) odd digits after the a(n)-th digit up to and including the a(n+1)-th digit, whence a(n+1) >= a(n) + a(n) - a(n-1).
LINKS
Eric Angelini, A proportion (odd digits vs all digits), personal blog "Cinquante signes" on blogspot.com, May 14 2020.
FORMULA
a(n+1) >= 2*a(n) - a(n-1) for n > 1.
EXAMPLE
There is a(1) = 1 odd digit, namely: '1', among the first a(2) = 2 digits which are '1' and '2'.
There are 2 odd digits ('1' and '3') among the first a(3) = 3 digits, '1', '2' and '3'.
Then there must be a(3) = 3 odd digits among the first a(4) digits. Since there are only 2 odd digits coming earlier, there must come at least 1 more odd digits. This excludes a(4) = 4, but makes the next smaller choice a(4) = 5 possible, provided it will be followed by an even digit in order to satisfy the requirement that there be exactly 3 odd digits among the first 5 digits.
Knowing that the first digit of a(5) must be even (see just above), and that a(5) >= 2 a(4) - a(3) = 7 (see formula, explained in comments), we have as smallest possibility a(5) = 8, which does not raise a contradiction.
Then again we can use a(6) = 2*8-5 = 11, least possibility according to the formula, and indeed not yet leading to a contradiction. However, these are digits number 6 and 7 of the sequence, both odd, and the previous two terms state that there must be 5 odd digits among the first 8 digits, so the next digit must be even.
According to the above, a(7) >= 20, the least integer > 2*11 - 8 starting with an even digit. It would be the 8th and 9th digit of the sequence. But we need a(5) = 8 odd digits among the first a(6) = 11 digits. If we use two even digits here, we can't reach the required 11 odd digits with the 5 odd digits up to a(8), the two '1's in position 6 & 7, and two more odd digits in position 10 & 11. This is only possible if the 9th digit is odd, too. So the smallest possibility is a(7) = 21.
And so on.
PROG
(PARI) upto(N)={my( a=Vec([1, 2], N), o=[1, 1], s=1, m=1); for( n=3, N, a[n]=2*a[n-1]-a[n-2]; while( m <= n && a[m] <= #o, m++); until( !a[n]++, my(ns=s, no=concat( o, [ ns+=d | d<-digits(a[n])%2 ])); for( i=m, n, a[i] <= #no && next(( a[i-1] != no[a[i]] )+1); no[#no] > a[i-1] && next(2); no[#no] + a[i] - #no >= a[i-1] || next(2)); o=no; s=ns; break)); a}
CROSSREFS
Cf. A332071 (variant based on the numbers rather than their digits).
Sequence in context: A254351 A346116 A262841 * A334741 A259973 A092362
KEYWORD
nonn,base
AUTHOR
M. F. Hasler and Eric Angelini, May 18 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 16:45 EDT 2024. Contains 371989 sequences. (Running on oeis4.)