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

David Applegate david at bcda.us
Mon Aug 24 02:02:59 CEST 2020


I think the confusion is that a(n) (or a(x)) usually refers to the 
sequence itself, that is, A102421(n), but in the comment "When a(x) is 
iterated...", it refers to the function f(x) given in the Maple code, 
where A102421(n) = f(2n+1).

That is, f(17) = 19, f(19) = 43, f(43) = 97, f(97) = 109, f(109) = 61, 
f(61) = 17
for which (letting a(n) = A102421(n)), we have the corresponding a(8) = 
19, a(9) = 43, a(21) = 97, a(48) = 109, etc.

-Dave

On 8/23/2020 2:03 PM, Neil Sloane wrote:
> Since I created that sequence, let me defend it.
>
> Here is Maple:
>
> f:=proc(n) local j; j:=3*n+1; while j mod 2 = 0 do j:=j/2; od: j:=3*j-1;
> while j mod 2 = 0 do j:=j/2; od: j; end;
>
> and that generates the sequence, look:
>
>   [seq(f(2*n+1),n=0..60)];
>
> [1, 7, 1, 1, 5, 25, 7, 17, 19, 43, 1, 13, 7, 61, 1, 35, 37, 79, 5, 11, 23,
> 97,
>
>      25, 53, 55, 115, 7, 31, 1, 133, 17, 71, 73, 151, 19, 5, 41, 169, 43, 89,
>
>      91, 187, 1, 49, 25, 205, 13, 107, 109, 223, 7, 29, 59, 241, 61, 125,
> 127,
>
>      259, 1, 67, 17]
>
> Looks OK to me.
>
>
>
> Best regards
> Neil
>
> Neil J. A. Sloane, President, OEIS Foundation.
> 11 South Adelaide Avenue, Highland Park, NJ 08904, USA.
> Also Visiting Scientist, Math. Dept., Rutgers University, Piscataway, NJ.
> Phone: 732 828 6098; home page: http://NeilSloane.com
> Email: njasloane at gmail.com
>
>
>
> On Sun, Aug 23, 2020 at 9:57 AM David Corneth <davidacorneth at gmail.com>
> wrote:
>
>> Hi,
>>
>> Can I get an extra pair of eyes over at A102421? It seems data was
>> inconsistent with a comment even before I got there.
>> It describes a function that, well, takes a number and then returns another
>> number.
>> Like after some magic, 17 becomes 19... according to a comment. But data
>> says 17 becomes 19.
>> Then 19 becomes 43.
>>
>> Upon inspection,
>> a(8) = a((17 - 1)/2) = 19.
>> a(9) = a((19 - 1)/2) = 43
>>
>> Could that be it?
>> There's no reference to (n-1)/2 so that'd be guessing. Or should that be
>> read from take 2n+1 in name?
>> One could say if x = 2n + 1 then n = (x-1)/2 but to me that doesn't follow
>> from the name.
>>
>> Best,
>> David
>>
>> --
>> Seqfan Mailing list - http://list.seqfan.eu/
>>
> --
> Seqfan Mailing list - http://list.seqfan.eu/



More information about the SeqFan mailing list