# [seqfan] Re: A102421; Start with 2n+1, multiply by 3 and add 1 and divide out any power of 2;

William Orrick will.orrick at gmail.com
Mon Aug 24 15:06:39 CEST 2020

```Dear Richard,

This sequence seems to relate to a variant of the Collatz problem, in
which, as I'm sure you know, there's a move for odd numbers (multiply by 3
and add 1) and a move for even numbers (divide by 2). In this variant, the
move for odd numbers alternates between multiplying by 3 and adding 1 and
multiplying by 3 and subtracting 1.

In your proposed sequence, the move for odd numbers sometimes gets applied
to even numbers, but at most one time, in the initial step. After that the
regular rule takes over. To me, this seems contrived. Something more in
keeping with the spirit of the problem would be to start the process by
dividing out any power of 2. This follows the regular rule at every step
rather than having a special "one-off" rule for the initial step.

My own preference, however, is simply to acknowledge that this sequence
relates to a function that is naturally defined on the odd integers. For
the purposes of the OEIS we need to index the sequence by integers, not odd
integers, but that slight complication can be dealt with by making a minor
clarification in the defintion, without needing to revise the sequence.

Best,
Will Orrick

On Sun, Aug 23, 2020 at 10:33 AM Richard J. Mathar <mathar at mpia-hd.mpg.de>
wrote:

> I suspect the comment refers to the variant
> "Start with n, take 3*n+1 and divide out any power of 2; then multiply by
> 3, subtract 1 and divide any power of 2.'
>
> a(n) = A075677(A067745(n+1)).
> The current sequence takes on each second term.
> In a case like this I propose to change the values and comments
> (that is: insert the missing half of the terms...) to keep the comment
> correct:
>
> A102421 := proc(n)
>         local a;
>         a := 3*n+1;
>         while modp(a,2) = 0 do
>                 a := a/2 ;
>         end do:
>         a := 3*a-1 ;
>         while modp(a,2) = 0 do
>                 a := a/2 ;
>         end do:
>         a ;
> end proc:
>
>
> 1, 1, 5, 7, 19, 1, 7, 1, 37, 5, 23, 25, 55, 7, 1, 17, 73, 19, 41, 43, 91,
> 1, 25, 13, 109, 7, 59, 61, 127, 1, 17, 35
>
> --
> Seqfan Mailing list - http://list.seqfan.eu/
>

```