Numbers with equal rises and falls: Difference between revisions
Content deleted Content added
m →{{header|REXX}}: elided a blank line, moved one-liner functions to top of subroutine code. |
m added whitespace and highlighting, added the word "decimal", moved the (URL) reference to the OEIS entry to ";See also:". |
||
Line 1: | Line 1: | ||
{{draft task}} |
{{draft task}} |
||
When a number is written in base 10, adjacent digits may "rise" or "fall" |
When a number is written in base 10, adjacent digits may "rise" or "fall" as the number is read (usually from left to right). |
||
as the number is read (usually from left to right). |
|||
⚫ | |||
⚫ | |||
<br> |
|||
⚫ | |||
<br> |
|||
⚫ | |||
:* A rise is an index i such that d(i) < d(i+1) |
|||
:* A fall is an index i such that d(i) > d(i+1). |
|||
<br> |
|||
⚫ | |||
⚫ | |||
⚫ | |||
<br> |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
(10,000,000th) number in the sequence is 41909002. |
|||
:* A ''rise'' is an index <big>i</big> such that <big> d(i) < d(i+1)</big> |
|||
:* A ''fall'' is an index <big>i</big> such that <big> d(i) > d(i+1)</big> |
|||
⚫ | |||
*[[OEIS:A296712]] the Oeis entry. |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
:* Show that the '''10 millionth''' (10,000,000<sup>th</sup>) number in the sequence is '''41909002''' |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
=={{header|11l}}== |
=={{header|11l}}== |