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!)
A347532 a(n) is the sum of the nonpowers of 2 in the 3x+1 sequence that starts at n. 2

%I #41 Sep 11 2021 15:20:09

%S 0,0,18,0,5,24,257,0,308,15,228,36,88,271,663,0,183,326,488,35,21,250,

%T 602,60,627,114,101409,299,411,693,101073,0,810,217,509,362,504,526,

%U 2313,75,101300,63,1307,294,466,648,100948,108,775,677,1099,166,368,101463,102285,355

%N a(n) is the sum of the nonpowers of 2 in the 3x+1 sequence that starts at n.

%C a(n) is the sum of the nonpowers of 2 in the n-th row of A347270.

%C a(n) = 0 if and only if n is a power of 2.

%H <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a>

%F From _Alois P. Heinz_, Sep 05 2021: (Start)

%F a(n) = A033493(n) - 2 * A232503(n) + 1.

%F a(n) = A033493(n) - 2^(A135282(n)+1) + 1. (End)

%e For n = 6 the 3x+1 sequence starting at 6 is 6, 3, 10, 5, 16, 8, 4, 2, 1, 4, 2, 1, ... Only the first four terms are nonpowers of 2. The sum of them is 6 + 3 + 10 + 5 = 24, so a(6) = 24.

%p a:= proc(n) option remember; `if`(n=2^ilog2(n), 0,

%p n+a(`if`(n::odd, 3*n+1, n/2)))

%p end:

%p seq(a(n), n=1..100); # _Alois P. Heinz_, Sep 05 2021

%t a[n_] := Plus @@ Select[NestWhileList[If[OddQ[#], 3*# + 1, #/2] &, n, # > 1 &], # != 2^IntegerExponent[#, 2] &]; Array[a, 50] (* _Amiram Eldar_, Sep 06 2021 *)

%Y Cf. A208981 (number of nonpowers of 2).

%Y Cf. A000079, A006370, A033493, A033495, A057716, A135282, A232503, A347270, A347519.

%K nonn

%O 1,3

%A _Omar E. Pol_, Sep 05 2021

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 August 26 01:13 EDT 2024. Contains 375454 sequences. (Running on oeis4.)