cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-1 of 1 results.

A067433 Triangle in which row n gives trajectory of n under the map k -> k/3 if k is divisible by 3, otherwise k -> next multiple of 3, stopping when reaching 1 (the initial term n is not included).

Original entry on oeis.org

1, 3, 1, 1, 6, 2, 3, 1, 6, 2, 3, 1, 2, 3, 1, 9, 3, 1, 9, 3, 1, 3, 1, 12, 4, 6, 2, 3, 1, 12, 4, 6, 2, 3, 1, 4, 6, 2, 3, 1, 15, 5, 6, 2, 3, 1, 15, 5, 6, 2, 3, 1, 5, 6, 2, 3, 1, 18, 6, 2, 3, 1, 18, 6, 2, 3, 1, 6, 2, 3, 1, 21, 7, 9, 3, 1, 21, 7, 9, 3, 1, 7, 9, 3
Offset: 1

Views

Author

Cino Hilliard, Mar 29 2003

Keywords

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.

Examples

			4 -> 6 -> 2 -> 3 -> 1, so row 4 is 6,2,3,1. Row 5 is the same.
		

Crossrefs

Cf. A080816.

Programs

  • 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 *)
  • 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" "); ); ) }

Extensions

Corrected by Harvey P. Dale, Sep 16 2012
Showing 1-1 of 1 results.