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.

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.

This page as a plain text file.
%I A057534 #22 Jul 02 2025 16:02:00
%S A057534 61,1038,519,173,2942,1471,25008,12504,6252,3126,1563,521,8858,4429,
%T A057534 75294,37647,12549,4183,71112,35556,17778,8889,2963,50372,25186,12593,
%U A057534 1799,257,4370,2185,437,7430,3715,743,12632,6316,3158,1579,26844,13422
%N 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.
%C A057534 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 A057534 Sequence has period 84. - _Alois P. Heinz_, Jan 19 2021
%H A057534 Ray Chandler, <a href="/A057534/b057534.txt">Table of n, a(n) for n = 0..1000</a>
%H A057534 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/CollatzProblem.html">Collatz problem</a>
%H A057534 <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 A057534 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 A057534 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 A057534 Table[a[n], {n, 0, 100}] (* _Jean-François Alcover_, Aug 22 2023, after Maple code *)
%o A057534 (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 A057534 Cf. A057446, A057216 (short version), A057522, A057614.
%K A057534 nonn,easy
%O A057534 0,1
%A A057534 Murad A. AlDamen (Divisibility(AT)yahoo.com), Oct 17 2000
%E A057534 More terms from _James Sellers_ and Larry Reeves (larryr(AT)acm.org), Oct 18 2000