login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Unsuspected numbers to check in the Collatz conjecture.
1

%I #37 Jul 19 2019 14:45:11

%S 61,91,205,253,325,415,433,577,637,739,901,919,991,1063,1171,1225,

%T 1333,1387,1549,1663,1711,1837,1873,1891,2035,2125,2197,2287,2359,

%U 2449,2521,2683,2791,2845,3007,3169,3187,3277,3331,3349,3439,3493

%N Unsuspected numbers to check in the Collatz conjecture.

%C The sequence is constructed using the following steps:

%C Start at 1, and color it blue. Go through the Collatz algorithm, highlight each number that is not in 'blue' in 'red' until you reach an already 'red' number or lower number that is 'blue'. Color the next uncolored number 'blue' and repeat.

%C So starting at 1, 1 becomes blue, then 4 becomes red, 2 becomes red and move to next number. Next uncolored number is 3, so 3 becomes blue. Then 10 becomes red, 5 becomes red, 16 red, 8 red, and 4 is already red so done. Next uncolored number is 6, so 6 becomes blue, etc.

%C For any number k the expected colors are:

%C red if k (mod 18) is equal to 2, 4, 5, 8, 10, 11, 13, 14, 16, or 17.

%C blue if k (mod 18) is equal to 0, 1, 3, 6, 7, 9, 12, or 15

%C The list here are the numbers that do not fit this pattern.

%C Observation:

%C For up to at least 180000 only numbers of the format k (mod 18) = 1 and k (mod 18) = 7 were not fitting the pattern, they were all red instead of blue.

%H P. Stikker, <a href="https://drive.google.com/open?id=1th5iu3VVbLiFYEth3GWV9Vcit_tRu9Z5">C# code to visualize grid</a>.

%H P. Stikker, <a href="https://drive.google.com/open?id=1gTrBZ1O-B1KQiJKnocSMBWbYqAgQjZRi">Excel VBA code to visualize grid</a>.

%o (C#) // Unsuspected numbers to check in Collatz conjecture

%o using System;

%o namespace Collatz {

%o class Program {

%o static void Main() {

%o Console.Write("Enter until which number to check:");

%o int nMax = int.Parse(Console.ReadLine());

%o int[] values = new int[nMax + 1], colors = new int[nMax + 1];

%o for (int i = 1; i < nMax + 1; i++) {

%o values[i] = i; colors[i] = 0;

%o }

%o for (int i = 1; i < nMax + 1; i++) {

%o if (colors[i] == 0) {

%o var myNum = i;

%o do {

%o myNum = (myNum % 2 == 0 ? myNum / 2 : myNum * 3 + 1);

%o if (myNum > i) {

%o if (myNum <= nMax) colors[myNum] = 1;

%o }

%o else myNum = 0;

%o } while (myNum != 0);

%o }

%o }

%o for (int i = 1; i < nMax+1; i++) {

%o if (i % 18 == 0 || i % 18 == 1 || i % 18 == 3 || i % 18 == 6 ||

%o i % 18 == 7 || i % 18 == 9 || i % 18 == 12 || i % 18 == 15) {

%o if (colors[i]==1) Console.WriteLine(i);

%o }

%o else {

%o if (colors[i] == 0) Console.WriteLine(i);

%o }

%o }

%o Console.ReadKey();

%o }

%o }

%o }

%o (PARI) isokb(k) = (k==0) || (k==1) || (k==3) || (k==6) || (k==7) || (k==9) || (k==12) || (k==15);

%o isokr(k) = (k==2) || (k==4) || (k==5) || (k==8) || (k==10) || (k==11) || (k==13) || (k==14) || (k==16) || (k==17);

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

%o nocolor(n, vred, vblue) = !vecsearch(vred, n) && !vecsearch(vblue, n);

%o chk(nn) = {vblue = []; vred = []; for (n=1, nn, if (nocolor(n, vred, vblue), ok = 1; vblue = vecsort(concat(vblue, n),,8); ntodo = n; while (1, m = f(ntodo); if (vecsearch(vred, m), break); if ((m<n) && vecsearch(vblue,m), break); if (!vecsearch(vblue, m), vred = vecsort(concat(vred, m),,8)); ntodo = m;););); vb = select(x->(!isokb(x%18)), vblue); vr = select(x->(!isokr(x%18)), vred); select(x->x<=nn, vecsort(concat(vr, vb)));} \\ _Michel Marcus_, Jul 17 2019

%Y Cf. A014682 (the Collatz function). So far the numbers are all of the form 6n + 1, so this would be a subset of A016921.

%K nonn

%O 1,1

%A _Peter Stikker_, Jul 15 2019