3
$\begingroup$

In the following sequence, what should be the next number?

1 1 1 2 5 1 1 2 2 4 5 8 17 50 11 ?
$\endgroup$
  • 1
    $\begingroup$ I notice that rot13(Rirel ahzore vf n fhz bs pbafrphgvir cerivbhf ahzoref). $\endgroup$ – Dr Xorile Mar 20 at 20:57
  • $\begingroup$ @DrXorile Not for long it does... $\endgroup$ – PascalVKooten Apr 18 at 11:18
3
$\begingroup$

The answer is:

14

The pattern here looks at how often the decimals remain the same at a certain depth when dividing (feel free to edit this answer to make it clearer), from numbers below 1.

It helps to consider 2 numbers/rows at a time:

 1/1 = 1.00, when we divide 1 by 2, the 0 changes to a 5, so [1]
       |  
 1/2 = 0.50, when we divide 1 by 3, the 5 changes to a 3, so [1]
         |
 1/3 = 0.33, when we divide 1 by 4, the 3 changes to a 2, so [1]
         |
 1/4 = 0.25, when we divide 1 by 5, the 2 stays a 2, -> continue   
         =
 1/5 = 0.20, when we divide 1 by 6  the 2 changes to a 1, so [2]
         |
 1/6 = 0.16, when we divide 1 by 7, the 1 stays a 1, -> continue
         =
 1/7 = 0.14, when we divide 1 by 8, the 1 stays a 1, -> continue
         =
 1/8 = 0.12, when we divide 1 by 9, the 1 stays a 1, -> continue
         =
 1/9 = 0.11, when we divide 1 by 10,the 1 stays a 1, -> continue
         =
1/10 = 0.10, when we divide 1 by 11,the 1 changes to a 9, so [5]
         |
1/11 = 0.09, when we divide 1 by 12,the 9 changes to a 8, so [1]
          |
1/12 = 0.08, when we divide 1 by 13,the 8 changes to a 7, so [1]

         ... and so on ...

Notably, after 1/10, we move to <0.1, so then you check the next significant number, in the 0.01 - 0.09 range.

You can generate the sequence using this (unoptimized) Python code:

counts = []
last = None
ending = ""
it = 2
count = 1
while True:
    v = 1 / it
    ending = "0"
    sv = str(v).replace("0.", "").lstrip("0")
    if sv:
        ending = sv[0]
    if ending != last:
        counts.append(count)
        print("new:", it, "[{}]".format(count))
        last = ending
        count = 1
    else:
        count += 1
    #print(v)
    it += 1

Here is a plot:

enter image description here

I found it to be a rather weird sequence, but perhaps it reminds the community of similar sequences? I hope you enjoy it!

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.