[seqfan] Re: A135282: We can go ahead and change "seems" to "is known"

Alonso Del Arte alonso.delarte at gmail.com
Wed Aug 18 20:41:17 CEST 2010

```It was pointed out to me that in my message about A135282 in which I proved
a comment ("It seems all terms are even...") using only simple modular
arithmetic, I should have also quoted the sequence in question in the OEIS
internal format. I do so now. Also, I have amended <
http://oeis.org/wiki/3x%2B1_problem> accordingly.

Since 2^k = -1 mod 3 when k is odd and 1 mod 3 when k is even, odd-indexed
powers of 2 can NOT be reached by a "tripling step" and thus they appear in
A135282 only when n itself is such an odd-indexed power of 2.

Al

%I A135282

%S A135282 0,1,4,2,4,4,4,3,4,4,4,4,4,4,4,4,4,4,4,4,6,4,4,4,4,4,4,4,4,4,4,5,4,4,4,
%T A135282 4,4,4,4,4,4,6,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,6,4,4,4,4,4,4,
%U A135282 4,4,4,4,8,4,4,4,4,4,4,4,4,6,8,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4
%N A135282 Largest k such that 2^k appears in the trajectory of the
Collatz 3x+1
sequence started at n.
%C A135282 Most of the first eighty terms in the sequence are 4,
because the trajectories
finish with 16->8->4->2->1. - R. J. Mathar
(mathar(AT)strw.leidenuniv.nl),
Dec 12 2007
%C A135282 Contribution from Masahiko Shin
(nin-ts5406(AT)w9.dion.ne.jp), Mar 16
2010: (Start)
%C A135282 Most of the first ten thousand terms are 4, and there only
appear 4,6,
8,and 10 in the extent,unless n is power of 2.
%C A135282 In the other words, it seems that the trajectory of the Collatz 3x+1
sequence ends with either 16,64,256,or 1024.
%C A135282 There are few exceptional terms, for example a(10920)=12,
a(10922)=14.
%C A135282 It seems all terms are even,unless n is odd power of 2. (End)
%H A135282 <a href="Sindx_3.html#3x1">Index entries related to the
3x+1 (Collatz)
problem</a>.
%e A135282 a(6)=4 because the sequence is 6,3,10,5,16,8,4,2,1.
%p A135282 A135282 := proc(n) local k,threen1 ; k := 0 : threen1 := n
; while threen1
> 1 do if 2^ilog[2](threen1) = threen1 then k :=
max(k,ilog[2](threen1))
; fi ; if threen1 mod 2 = 0 then threen1 := threen1/2 ;
else threen1
:= 3*threen1+1 ; fi ; od: RETURN(k) ; end: for n from 1 to 80 do
printf("%d, ",A135282(n)) ; od: - R. J. Mathar
(mathar(AT)strw.leidenuniv.nl),
Dec 12 2007
%o A135282 (Other) #include <stdio.h> int main(){ int i,s,f;
for(i=2;i<10000;i++){
f=0; s=i; while(s!=1){ if(s%2==0){ s=s/2; f++;} else{
f=0; s=3*s+1;
} } printf("%d,",f); } return 0; } [From Masahiko Shin
(nin-ts5406(AT)w9.dion.ne.jp),
Mar 16 2010]
%Y A135282 Sequence in context: A053051 A075234 A095382 this_sequence
A103859 A007400
A019921
%Y A135282 Adjacent sequences: A135279 A135280 A135281 this_sequence
A135283 A135284
A135285
%K A135282 nonn
%O A135282 1,3
%A A135282 Masahiko Shin (qqbf2msd(AT)etude.ocn.ne.jp), Dec 02 2007
%E A135282 Edited and extended by R. J. Mathar
(mathar(AT)strw.leidenuniv.nl), Dec
12 2007
%E A135282 More terms from Masahiko Shin
(nin-ts5406(AT)w9.dion.ne.jp), Mar 16 2010

```