login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 


Define one of the generalized Syracuse sequences starting with a positive odd integer 2*k+1=x(1), then if x(i) is an odd prime set x(i+1)=2*x(i)+1, if x(i) is odd not prime set x(i+1)=3*x(i)+1, if x(i) is even then set x(i+1)=x(i)/2. This sequence gives the positive odd integers 2*k+1=x(1) for sequences reaching x(i)=1.
3

%I #24 Apr 16 2018 13:01:31

%S 1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,

%T 49,51,53,55,57,59,63,65,67,69,71,73,75,77,79,83,85,87,89,91,93,95,97,

%U 99,101,103,105,107,109,111,113,115,117,119,121,125,127,129,131,133,135,137,141,143,145

%N Define one of the generalized Syracuse sequences starting with a positive odd integer 2*k+1=x(1), then if x(i) is an odd prime set x(i+1)=2*x(i)+1, if x(i) is odd not prime set x(i+1)=3*x(i)+1, if x(i) is even then set x(i+1)=x(i)/2. This sequence gives the positive odd integers 2*k+1=x(1) for sequences reaching x(i)=1.

%C The sequence of positive odd integers not in this sequence begins {61, 81, 123, 139, ...}. When x(1) is any of these, the sequence x(i) enters a cycle of 931 values x(i) = x(i+931)=1163.

%H Pierre CAMI, <a href="/A294748/a294748.txt">PFGW Script</a>

%o (PARI) f(n) = if (n % 2, if (isprime(n), 2*n+1, 3*n+1), n/2);

%o isok(n) = {if (n%2, while (1, n = f(n); if (n==1, return (1)); if (n==1163, return (0));););} \\ _Michel Marcus_, Mar 28 2018

%Y Cf. A006577, A297307, A300286.

%K nonn

%O 1,2

%A _Pierre CAMI_, Feb 18 2018

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | 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 September 23 06:29 EDT 2024. Contains 376143 sequences. (Running on oeis4.)