cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A302338 a(n) = 3*n + 2^v(n) where v(n) denotes the 2-adic valuation of n.

This page as a plain text file.
%I A302338 #44 Sep 08 2022 08:46:21
%S A302338 4,8,10,16,16,20,22,32,28,32,34,40,40,44,46,64,52,56,58,64,64,68,70,
%T A302338 80,76,80,82,88,88,92,94,128,100,104,106,112,112,116,118,128,124,128,
%U A302338 130,136,136,140,142,160,148,152,154,160,160,164,166,176,172,176,178
%N A302338 a(n) = 3*n + 2^v(n) where v(n) denotes the 2-adic valuation of n.
%C A302338 The sequence can be seen as a variant of the Collatz map (A006370) where we perform only tripling steps.
%C A302338 If the 3x+1 (or Collatz) conjecture is true, then for any n > 0, A006667(n) is the least k such that a^k(n) is a power of two (where a^k denotes the k-th iterate of the sequence).
%H A302338 Robert Israel, <a href="/A302338/b302338.txt">Table of n, a(n) for n = 1..10000</a>
%H A302338 <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a>
%F A302338 a(n) = 3*n + 2^A007814(n).
%F A302338 a(2*n) = 2*a(n).
%F A302338 a(2*k + 1) = A006370(2*k + 1) for any k >= 0.
%e A302338 a(42) = 3*42 + 2^1 = 128.
%p A302338 seq(3*n+2^padic:-ordp(n,2), n=1..100); # _Robert Israel_, Apr 29 2018
%t A302338 Table[3 n + 2^IntegerExponent[n, 2], {n, 60}] (* _Vincenzo Librandi_, Apr 29 2018 *)
%o A302338 (PARI) a(n) = 3*n + 2^valuation(n, 2)
%o A302338 (Magma) [3*n+2^Valuation(n, 2): n in [1..60]]; // _Vincenzo Librandi_, Apr 29 2018
%Y A302338 Cf. A006370, A006667, A007814.
%K A302338 nonn,easy
%O A302338 1,1
%A A302338 _Rémy Sigrist_, Apr 28 2018