login
A340615
a(n) = k/2 if k is even, otherwise (3k+1)/2, where k = n + floor((n+1)/5).
3
0, 2, 1, 5, 8, 3, 11, 4, 14, 17, 6, 20, 7, 23, 26, 9, 29, 10, 32, 35, 12, 38, 13, 41, 44, 15, 47, 16, 50, 53, 18, 56, 19, 59, 62, 21, 65, 22, 68, 71, 24, 74, 25, 77, 80, 27, 83, 28, 86, 89, 30, 92, 31, 95, 98, 33, 101, 34, 104, 107, 36, 110, 37, 113, 116, 39, 119, 40, 122
OFFSET
0,2
COMMENTS
A permutation of the nonnegative integers related to the Collatz function (A014682).
As this sequence is a permutation, it can be decomposed into cycles.
Known finite cycles so far: (0), (1 2), (3 5), (24 44 80 48 86 155 93 167 100 60 36 65 39 71 128 230 138 248 446 803 1445 867 520 312 187 112 67 40).
Except for the 0-cycle, it is a necessary (but not sufficient) condition for the smallest number in a cycle that it is in the intersection of A032766 and A047206 (as suggested by Sebastian Karlsson, Jan 15 2021).
If we generate new sequences by including a variable m into the definition of the original sequence, k = n+floor((n+1)/m*5), a(n) = k/2 if k is even, otherwise (3k+1)/2, then the sequences with m > 1 are not permutations and are in some sense intermediates between A014682 and the original sequence. This may aid in research related to Collatz conjecture as it may help to understand how cycles are modified or disappearing by increasing values of m.
Like any permutation this sequence can be written as a product of two involutions. Example:
a(n) = p(q(n)) with p = (0)(3 1)(5 2)(6 4)(11 7)(10 8)(26 9)(20 12)... and q = (0)(5 1)(3 2)(11 4)(8 6)(20 7)(47 9)(14 10)... does there exist a nice example with known sequences?
The difference between "Collatz function" A014682 and this sequence is that A014682 contains all numbers of the type 3*m + 2 twice (A016789). The modification "+floor((n+1)/5)" removes these duplicates from the sequence. The distances between the removed numbers and the predecessors that stay inside the sequence are of the form 4*m + 3 and found in A004767. Example: A014682(3) = 5 and A014682(10) = 5. 5 = A016789(1) and 10-3 = 7 = A004767(1).
A093545 is the inverse permutation: n = A093545(a(n)).
FORMULA
a(n) = 2*a(n-5) - a(n-10).
MATHEMATICA
Array[If[EvenQ@ #, #/2, (3 # + 1)/2] &[# + Floor[(# + 1)/5]] &, 69, 0] (* Michael De Vlieger, Jan 13 2021 *)
PROG
(MATLAB)
function a = A340615(max_n)
for n = 1:max_n
k = (n-1)+floor(((n-1)+1)/5);
if floor(k/2) == k/2
a(n) = k/2;
else
a(n) = (k*3+1)/2;
end
end
end
CROSSREFS
Cf. A014682, A093545 (inverse).
Sequence in context: A094510 A023677 A108599 * A108590 A109233 A257574
KEYWORD
nonn,easy
AUTHOR
Thomas Scheuerle, Jan 13 2021
STATUS
approved