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!)
A302338 a(n) = 3*n + 2^v(n) where v(n) denotes the 2-adic valuation of n. 1
4, 8, 10, 16, 16, 20, 22, 32, 28, 32, 34, 40, 40, 44, 46, 64, 52, 56, 58, 64, 64, 68, 70, 80, 76, 80, 82, 88, 88, 92, 94, 128, 100, 104, 106, 112, 112, 116, 118, 128, 124, 128, 130, 136, 136, 140, 142, 160, 148, 152, 154, 160, 160, 164, 166, 176, 172, 176, 178 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
The sequence can be seen as a variant of the Collatz map (A006370) where we perform only tripling steps.
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).
LINKS
FORMULA
a(n) = 3*n + 2^A007814(n).
a(2*n) = 2*a(n).
a(2*k + 1) = A006370(2*k + 1) for any k >= 0.
EXAMPLE
a(42) = 3*42 + 2^1 = 128.
MAPLE
seq(3*n+2^padic:-ordp(n, 2), n=1..100); # Robert Israel, Apr 29 2018
MATHEMATICA
Table[3 n + 2^IntegerExponent[n, 2], {n, 60}] (* Vincenzo Librandi, Apr 29 2018 *)
PROG
(PARI) a(n) = 3*n + 2^valuation(n, 2)
(Magma) [3*n+2^Valuation(n, 2): n in [1..60]]; // Vincenzo Librandi, Apr 29 2018
CROSSREFS
Sequence in context: A020169 A310999 A311000 * A311001 A311002 A082934
KEYWORD
nonn,easy
AUTHOR
Rémy Sigrist, Apr 28 2018
STATUS
approved

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 April 16 05:35 EDT 2024. Contains 371697 sequences. (Running on oeis4.)