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.

A309180 Unsuspected numbers to check in the Collatz conjecture.

Original entry on oeis.org

61, 91, 205, 253, 325, 415, 433, 577, 637, 739, 901, 919, 991, 1063, 1171, 1225, 1333, 1387, 1549, 1663, 1711, 1837, 1873, 1891, 2035, 2125, 2197, 2287, 2359, 2449, 2521, 2683, 2791, 2845, 3007, 3169, 3187, 3277, 3331, 3349, 3439, 3493
Offset: 1

Views

Author

Peter Stikker, Jul 15 2019

Keywords

Comments

The sequence is constructed using the following steps:
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.
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.
For any number k the expected colors are:
red if k (mod 18) is equal to 2, 4, 5, 8, 10, 11, 13, 14, 16, or 17.
blue if k (mod 18) is equal to 0, 1, 3, 6, 7, 9, 12, or 15
The list here are the numbers that do not fit this pattern.
Observation:
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.

Crossrefs

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

Programs

  • PARI
    isokb(k) = (k==0) || (k==1) || (k==3) || (k==6) || (k==7) || (k==9) || (k==12) || (k==15);
    isokr(k) = (k==2) || (k==4) || (k==5) || (k==8) || (k==10) || (k==11) || (k==13) || (k==14) || (k==16) || (k==17);
    f(n) = if(n%2, 3*n+1, n/2);
    nocolor(n, vred, vblue) = !vecsearch(vred, n) && !vecsearch(vblue, n);
    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(!isokb(x%18)), vblue); vr = select(x->(!isokr(x%18)), vred); select(x->x<=nn, vecsort(concat(vr, vb)));} \\ Michel Marcus, Jul 17 2019