Svoboda | Graniru | BBC Russia | Golosameriki | Facebook
login
A179480
Let m>k>0 be odd numbers and denote by the symbol "m<->k" the value A000265(m-k). Then the sequence m<->k, m<->(m<->k), m<->(m<->(m<->k)), ... is periodic; a(n) is the smallest period in the case m=2*n-1, k=1.
17
1, 1, 2, 1, 3, 3, 2, 1, 5, 2, 6, 5, 5, 7, 2, 1, 6, 9, 6, 3, 3, 6, 12, 10, 4, 13, 10, 3, 15, 15, 2, 1, 17, 10, 18, 2, 10, 14, 20, 13, 21, 2, 14, 4, 6, 4, 18, 11, 9, 25, 26, 4, 27, 9, 18, 5, 22, 4, 12, 27, 10, 25, 2, 1, 33, 6, 18, 15, 35, 22, 30, 3, 22, 37, 6, 12, 10, 13, 26
OFFSET
2,3
COMMENTS
A dual sequence to A179382.
Let b = (2*n-1) and k = A003558(n-1). If a(n) is odd, b divides (2^k + 1); but if a(n) is even, b divides (2^k - 1). Examples: a(14) = 5, odd; with b = 27 and A003558(13) = 9. Then 27 divides (2^9 + 1) or 513 = 27 * 19. a(18) = 6, even. b = 35, with k= A003558(17) = 12. Then 35 divides (2^12 - 1). - Gary W. Adamson, Aug 20 2012.
Iff a(n) = n/2 or (n-1)/2, then 2*n - 1 is a prime with one coach and is in A216371. Examples: a(19) = 9, so 37 is in A216371. a(12) = 6, so 23 is in A216371. - _Gary W. Adamson, Sep 08 2012.
EXAMPLE
If n=14, then m=27 and we have 27<->1=13, 27<->13=7, 27<->7=5, 27<->5=11, 27<->11=1. Thus a(14)=5.
MAPLE
Contribution from R. J. Mathar, Nov 04 2010: (Start)
A179480aux := proc(x, y) local xtrack, xitr, xpos ; xtrack := [y] ; while true do xitr := A000265(x-op(-1, xtrack)) ; if not member(xitr, xtrack, 'xpos') then xtrack := [op(xtrack), xitr] ; else return 1+nops(xtrack)-xpos ; end if; end do: end proc:
A179480 := proc(n) A179480aux(2*n-1, 1) ; end proc: seq(A179480(n), n=2..80) ; (End)
MATHEMATICA
oddres[n_] := n/2^IntegerExponent[n, 2];
b[x_, y_] := Module[{xtrack = {y}, xitr}, While[True, xitr = oddres[x - Last@ xtrack]; If[FreeQ[xtrack, xitr], AppendTo[xtrack, xitr], Return[ Length[xtrack]]]]];
a[n_] := b[2n-1, 1];
a /@ Range[2, 80] (* Jean-François Alcover, Apr 13 2020, after R. J. Mathar *)
CROSSREFS
Cf. A003558.
Cf. A216371.
Sequence in context: A262209 A324338 A047679 * A245326 A241534 A337137
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, Jul 16 2010
EXTENSIONS
Edited by N. J. A. Sloane, Jul 18 2010
More terms from R. J. Mathar, Nov 04 2010
STATUS
approved