

A265287


Number of steps needed to reach 1 in the "sqrt(2)*x + 1" problem.


1



0, 1, 5, 2, 4, 6, 6, 3, 14, 5, 5, 7, 13, 7, 7, 4, 18, 15, 12, 6, 9, 6, 20, 8, 17, 14, 11, 8, 11, 8, 8, 5, 19, 19, 19, 16, 19, 13, 10, 7, 13, 10, 13, 7, 7, 21, 18, 9, 21, 18, 18, 15, 18, 12, 12, 9, 30, 12, 12, 9, 12, 9, 9, 6, 23, 20, 17, 20, 23, 20, 23, 17, 17
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,3


COMMENTS

The sqrt(2)*x + 1 problem is as follows: start with a number x. If x is even, divide it by 2, otherwise multiply it by sqrt(2) and add 1, and then take the integer part.
Conjecture: the trajectory reaches 1 for all n.
Generalization:
If we consider the "sqrt(3)*x + 1" problem (see A264789), we observe three possible behaviors for such trajectories when n>0:
(i) The trajectory reaches 1 (and enters the "trivial" cycle 21212...).
(ii) Cyclic trajectory. The trajectory becomes periodic and the period does not contain a 1.
(iii) The trajectory is divergent (I conjecture that this cannot occur).
If we consider the "sqrt(q)*x+1" problem with q>3 but different from 9, we observe divergent trajectories.


LINKS

Michel Lagneau, Table of n, a(n) for n = 1..10000


EXAMPLE

a(7) = 6 because 7 > 10 > 5 > 8 > 4 > 2 > 1 with 6 iterations where:
10 = floor(7*sqrt(2)+1);
5 = 10/2;
8 = floor(5*sqrt(2)+1);
4 = 8/2;
2 = 4/2 and 1 = 2/2 is the end of the cycle.


MATHEMATICA

f[n_]:=Module[{a=n, k=0}, While[a!=1, k++; If[EvenQ[a], a=a/2, a=Floor[a*Sqrt[2]+1]]]; k]; Table[f[n], {n, 100}]


CROSSREFS

Cf. A006577, A264789.
Sequence in context: A064853 A177148 A188739 * A257701 A202494 A112597
Adjacent sequences: A265284 A265285 A265286 * A265288 A265289 A265290


KEYWORD

nonn


AUTHOR

Michel Lagneau, Dec 06 2015


STATUS

approved



