40

My roommate has insomnia so he was counting sheep to help him sleep.

He started with 2986, then continued with 47786, 764586, and 12233386.

What sequence is he following, and what was the next number?

bobble
  • 10,245
  • 4
  • 32
  • 80
DenverCoder1
  • 10,472
  • 20
  • 89

3 Answers3

44

The next number in the sequence is:

195 734 186

The sequence he is following is:

Hexadecimal numbers!

BAA = 2 986
BAAA = 47 786
BAAAA = 764 586
BAAAAA = 12 233 386
BAAAAAA = 195 734 186

11

I found it's

195734186

It's sequence where

k(n+1) = k(n) * 16 + 10

tansy
  • 221
  • 1
  • 4
  • 1
    your solution is equivalent to the others :) – daw Mar 13 '20 at 12:21
  • It's true, it's also "less right" because of "counting sheep" hint but is also different than "right one", it shows that there can be different way to solve the same problem. – tansy Mar 14 '20 at 21:31
6

To add on to tansy's answer,

The sequence is: $$k(n+1) = 16 \cdot k(n) + 10$$ for the initial condition $k(1) = 2986$.

This recurrence equation can be solved as follows: $$k(n) = \frac{70 \cdot 2^{4 n + 3}}{3} - \frac{2}{3}$$ This formula can be used to calculate the $n^{th}$ value in this sequence for any value of $n$.

$$k(1) = 2986$$ $$k(2) = 47786$$ $$k(3) = 764586$$ $$k(4) = 12233386$$ $$k(5) = 195734186$$ $$\dots$$
The pattern of multiplying by 16 and adding 10 is the same as (in binary) performing a right-shift operation 4 times and then adding 1010. In hexadecimal, 4 bits is one digit and 1010 = A. In other words, $16\cdot k(n)+10\ $ takes the representation of $k(n)$ in hexadecimal and appends $\text{A}$.

$2986$ = $\text{BAA}$.
$47786 = \text{BAAA}$.
$764586 = \text{BAAAA}$.
$12233386 = \text{BAAAAA}$.
$195734186 = \text{BAAAAAA}$.

It makes sense that he would be using this sequence to count sheep since $\text{BAA}\dots$ is the sound the sheep make.

JEL
  • 311
  • 1
  • 5
  • 1
    While this is correct, and thorough, it misses the funny part, which is that expressed in hexadecimal these spell (rot13) "ONN", "ONNN", ONNNN" ... fbhaqf gung furrc znxr -- naq pbhagvat furrc vf n genqvgvbany npgvivgl sbe bpphclvat lbhe zvaq gb uryc lbh snyy nfyrrc. – Ross Presser Mar 13 '20 at 17:49