login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A203640 Length of the cycle reached for the map x->A203639(x), starting at n. 3
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,16
COMMENTS
Differs from A063775 at n = 64, 81, 128, 144, 162, 192, ... Differs from A053164 at n = 64, 81, 128, 144, 162, 192, 216, 243,... Differs from A043289 at n = 64, 128, 144, 192, 216, 225,... - R. J. Mathar, Jan 11 2012
LINKS
EXAMPLE
Starting from n = 12, the derived sequence is A203639(12) = 4, A203639(4) = 4, A203639(4) = 4, etc, and the sequence 12, 4, 4, 4, 4, ... has cycle length 1. Therefore a(12) = 1.
From Antti Karttunen, Sep 13 2017: (Start)
Starting from n = 16, the derived sequence is A203639(16) = 32, A203639(32) = 80, A203639(80) = 32, etc, and the sequence 16, 32, 80, 32, 80, ... has cycle length 2. Therefore a(16) = 2.
Starting from n = 2916, the derived sequence is A203639(2916) = 5832, A203639(5832) = 17496, A203639(17496) = 61236, A203639(61236) = 20412, A203639(20412) = 5832, etc, and the sequence 2916, 5832, 17496, 61236, 20412, 5832, 17496, 61236, 20412, ... has cycle length 4. Therefore a(2916) = 4. This is also the first point where the sequence attains a value larger than 2. (End)
MAPLE
idx := proc(L, n) for i from 1 to nops(L) do if op(i, L)=n then return i ; end if; end do: return -1; end proc:
A203640 := proc(n) local s, dr, d; s := [n] ; dr :=n ; for d from 1 do dr := A203639(dr) ; ii := idx(s, dr) ; if ii >0 then return nops(s)-ii+1 ; else s := [op(s), dr] ; end if ; end do: end proc:
PROG
(Scheme)
(define (A203640 n) (let loop ((visited (list n)) (i 1)) (let ((next (A203639 (car visited)))) (cond ((member next visited) => (lambda (prepath) (+ 1 (- i (length prepath))))) (else (loop (cons next visited) (+ 1 i)))))))
;; (Code for A203639 given under that entry.) - Antti Karttunen, Sep 13 2017
CROSSREFS
Sequence in context: A043290 A356153 A194333 * A043289 A063775 A053164
KEYWORD
nonn,less
AUTHOR
R. J. Mathar, Jan 04 2012
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 22:36 EDT 2024. Contains 371917 sequences. (Running on oeis4.)