OFFSET
1,2
COMMENTS
These numbers converge to various last 3-digit endings and only to 2 last 2-digit numbers: 2,1 or 3,1. m=3. p=1 below. If m=2, p=1 you get the x+1 conjecture. If m=2, p=3 you get the 3x+1 conjecture. See Link for numbers with a large number of digits. Other conjectures are possible by trial-and-error input of m and n. It is interesting to note that for many m and p=m+1 the program converges to 1. However, for m prime and p=m+1 the program always converges to m^2, m, 1. Also for m+1 prime the program converges to m^2, m, 1 most of the time. An exception is m=6. The sequence converges but to what I call an uninteresting ending.
LINKS
Cino Hilliard, The x+1 conjecture [Dead link]
EXAMPLE
4 -> 6 -> 2 -> 3 -> 1, so row 4 is 6,2,3,1. Row 5 is the same.
MATHEMATICA
nxt[n_]:=If[Divisible[n, 3], n/3, 3(Floor[n/3]+1)]; Join[{1}, Flatten[ Table[ Rest[ NestWhileList[nxt, i, #!=1&]], {i, 30}]]] (* Harvey P. Dale, Sep 16 2012 *)
PROG
(PARI) multxp2(n, m, p) = { print1(1" "); for(j=1, n, x=j; c=0; while(x>1, r = x%m; if(r==0, x=x/m, x=x*p+m-r); print1(x" "); ); ) }
CROSSREFS
KEYWORD
easy,tabf,nonn
AUTHOR
Cino Hilliard, Mar 29 2003
EXTENSIONS
Corrected by Harvey P. Dale, Sep 16 2012
STATUS
approved