login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A179686 Let m > k > 0 be odd numbers and operations "m<+>k" and "m<->k" be defined as in A179382 and A179480. Then the sequence m<+>k, m<->(m<+>k), m<+>(m<->(m<+>k)), ... is periodic; a(n) is its smallest period starting from the seeds m=2*n-1 and k=1. 6
1, 2, 4, 2, 2, 2, 4, 2, 6, 4, 4, 6, 8, 6, 4, 2, 4, 10, 4, 6, 2, 4, 12, 12, 4, 14, 12, 2, 14, 14, 4, 2, 18, 12, 16, 4, 8, 16, 16, 14, 18, 4, 12, 4, 4, 4, 20, 10, 6, 22, 24, 4, 26, 6, 16, 6, 20, 4, 12, 26, 8, 22, 4, 2, 34, 8, 20, 14, 34, 24, 32, 6, 20, 42, 4, 12, 8, 10, 24 (list; graph; refs; listen; history; text; internal format)
OFFSET

2,2

LINKS

Table of n, a(n) for n=2..80.

EXAMPLE

If n=4, 2*n-1=7, then we have 7<+>1=1, 7<->1=3, 7<+>3=5, 7<->5=1. Thus a(4)=4.

MAPLE

pidx := proc(L, n, m)

    for i from 1 to nops(L)-1 do

        if [op(i..i+1, L)] = [n, m] then

            return i;

        end if;

    end do:

    return -1 ;

end proc:

A179686aux := proc(x, y) local xtrack, xitr, p;

    xtrack := [A000265(x+y)] ;

    while true do

        if type(nops(xtrack), 'odd') then

            xitr := A000265(x-op(-1, xtrack)) ;

        else

            xitr := A000265(x+op(-1, xtrack)) ;

        end if;

            xtrack := [op(xtrack), xitr] ;

        p := pidx(xtrack, op(-2, xtrack), op(-1, xtrack)) ;

        if p >=1 and p < nops(xtrack) -2 then

            return nops(xtrack)-p-1 ;

        end if;

    end do:

end proc:

A179686 := proc(n)

    if n = 2 then

        1;

    else

        A179686aux(2*n-1, 1) ;

    end if;

end proc:

seq(A179686(n), n=2..80) ; # R. J. Mathar, Dec 04 2011

CROSSREFS

Cf. A179382, A179480.

Sequence in context: A064132 A072865 A322728 * A286479 A013604 A218217

Adjacent sequences:  A179683 A179684 A179685 * A179687 A179688 A179689

KEYWORD

nonn

AUTHOR

Vladimir Shevelev, Jul 24 2010

EXTENSIONS

Extended beyond a(24) by R. J. Mathar, Dec 04 2011

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 16 09:13 EDT 2020. Contains 335784 sequences. (Running on oeis4.)