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!)
A057534 a(n+1) = a(n)/2 if 2|a(n), a(n)/3 if 3|a(n), a(n)/5 if 5|a(n), a(n)/7 if 7|a(n), a(n)/11 if 11|a(n), a(n)/13 if 13|a(n), otherwise 17*a(n)+1. 15

%I #20 Aug 22 2023 07:58:02

%S 61,1038,519,173,2942,1471,25008,12504,6252,3126,1563,521,8858,4429,

%T 75294,37647,12549,4183,71112,35556,17778,8889,2963,50372,25186,12593,

%U 1799,257,4370,2185,437,7430,3715,743,12632,6316,3158,1579,26844,13422

%N a(n+1) = a(n)/2 if 2|a(n), a(n)/3 if 3|a(n), a(n)/5 if 5|a(n), a(n)/7 if 7|a(n), a(n)/11 if 11|a(n), a(n)/13 if 13|a(n), otherwise 17*a(n)+1.

%C This is the '17x+1' map. The 'Px+1 map': if x is divisible by any prime < P then divide out these primes one at a time starting with the smallest; otherwise multiply x by P and add 1.

%C Sequence has period 84. - _Alois P. Heinz_, Jan 19 2021

%H Ray Chandler, <a href="/A057534/b057534.txt">Table of n, a(n) for n = 0..1000</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/CollatzProblem.html">Collatz problem</a>

%H <a href="/index/Rec#order_84">Index entries for linear recurrences with constant coefficients</a>, signature (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1).

%p with(numtheory): a := proc(n) option remember: local k; if n=0 then RETURN(61); fi: for k from 1 to 6 do if a(n-1) mod ithprime(k) = 0 then RETURN(a(n-1)/ithprime(k)); fi: od: RETURN(17*a(n-1)+1) end:

%t a[n_] := a[n] = Which[n == 0, 61, n <= 84, Module[{k}, For[k = 1, k < PrimePi[17], k++, If[Mod[a[n - 1], Prime[k]] == 0, Return[a[n - 1]/Prime[k]]]]; Return[17*a[n - 1] + 1]], True, a[n - 84]];

%t Table[a[n], {n, 0, 100}] (* _Jean-François Alcover_, Aug 22 2023, after Maple code *)

%o (PARI) a(n)=if(n, n=a(n-1); if(n%2, if(n%3, if(n%5, if(n%7, if(n%11, if(n%13, 17*n+1, n/13), n/11), n/7), n/5), n/3), n/2), 61) \\ _Charles R Greathouse IV_, Oct 13 2022

%Y Cf. A057446, A057216 (short version), A057522, A057614.

%K nonn,easy

%O 0,1

%A Murad A. AlDamen (Divisibility(AT)yahoo.com), Oct 17 2000

%E More terms from _James A. Sellers_ and Larry Reeves (larryr(AT)acm.org), Oct 18 2000

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 24 13:58 EDT 2024. Contains 371960 sequences. (Running on oeis4.)