Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A063574
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A063574 Number of steps to reach an integer == 1 (mod 4) when iterating the map n -> 3n/2 if n even or (3n+1)/2 if n odd. +0
4
0, 2, 1, 2, 0, 1, 2, 4, 0, 4, 1, 3, 0, 1, 3, 4, 0, 2, 1, 2, 0, 1, 2, 3, 0, 3, 1, 7, 0, 1, 4, 6, 0, 2, 1, 2, 0, 1, 2, 5, 0, 6, 1, 3, 0, 1, 3, 5, 0, 2, 1, 2, 0, 1, 2, 3, 0, 3, 1, 4, 0, 1, 5, 6, 0, 2, 1, 2, 0, 1, 2, 4, 0, 4, 1, 3, 0, 1, 3, 4, 0, 2, 1, 2, 0, 1, 2, 3, 0, 3, 1, 5, 0, 1, 4, 5, 0, 2, 1, 2, 0, 1, 2, 7, 0 (list; graph; listen)
OFFSET

1,2

REFERENCES

L. Flatto, Z-numbers and beta-transformations, in Symbolic dynamics and its applications (New Haven, CT, 1991), 181-201, Contemp. Math., 135, Amer. Math. Soc., Providence, RI, 1992.

K. Mahler, An unsolved problem on the powers of 3/2, J. Austral. Math. Soc. 8 1968 313-321.

FORMULA

For odd n: a(n)=A007814(n+1), for even n: A007814(n) steps until an odd number is reached, which leads directly to the formula: with b(n)=A007814(n) (binary carry sequence) a(n)=b(n)+b((3^b(n)*n/2^b(n)+1)/2) - Lambert Herrgesell (zero815(AT)googlemail.com) and Lambert Klasen (lambert.klasen(AT)gmx.net), Apr 24 2006. Hence in particular, a(n) is well-defined.

EXAMPLE

8 -> 12 -> 18 -> 27 -> 41 takes 4 steps so a(8) = 4.

PROGRAM

PARI {stop=1000; for(n=1, 105, c=0; k=n; while((k%4)!=1&&c<stop, k=if(k%2==0, 3*k/2, (3*k+1)/2); c++); print1(if(c<stop, c, -1), ", "))}

(PARI) b(n)=valuation(n, 2); a(n)=b(n)+b((3^b(n)*n/2^b(n)+1)/2) - Lambert Herrgesell (zero815(AT)googlemail.com) and Lambert Klasen (lambert.klasen(AT)gmx.net), Apr 24 2006

CROSSREFS

Cf. A007494.

Sequence in context: A114004 A049986 A137289 this_sequence A144515 A028933 A143352

Adjacent sequences: A063571 A063572 A063573 this_sequence A063575 A063576 A063577

KEYWORD

easy,nice,nonn

AUTHOR

N. J. A. Sloane (njas(AT)research.att.com), Sep 23 2002

EXTENSIONS

Extended by Klaus Brockhaus (klaus-brockhaus(AT)t-online.de), Sep 23 2002

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 27 14:50 EST 2009. Contains 167570 sequences.


AT&T Labs Research