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.
%I A340615 #74 Oct 31 2022 05:55:01 %S A340615 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, %T A340615 47,16,50,53,18,56,19,59,62,21,65,22,68,71,24,74,25,77,80,27,83,28,86, %U A340615 89,30,92,31,95,98,33,101,34,104,107,36,110,37,113,116,39,119,40,122 %N A340615 a(n) = k/2 if k is even, otherwise (3k+1)/2, where k = n + floor((n+1)/5). %C A340615 A permutation of the nonnegative integers related to the Collatz function (A014682). %C A340615 As this sequence is a permutation, it can be decomposed into cycles. %C A340615 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). %C A340615 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). %C A340615 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. %C A340615 Like any permutation this sequence can be written as a product of two involutions. Example: %C A340615 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? %C A340615 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). %C A340615 A093545 is the inverse permutation: n = A093545(a(n)). %H A340615 Thomas Scheuerle, <a href="/A340615/a340615.svg">Finite cycle starting 24,44,... plotted log2 (vertical: 24,44,... horizontal: 1,2,...)</a>, black lines drawn into the graph show that cycles have an internal structure. %H A340615 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the nonnegative integers</a> %H A340615 <a href="/index/Rec#order_10">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,2,0,0,0,0,-1). %H A340615 <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a> %F A340615 a(n) = 2*a(n-5) - a(n-10). %t A340615 Array[If[EvenQ@ #, #/2, (3 # + 1)/2] &[# + Floor[(# + 1)/5]] &, 69, 0] (* _Michael De Vlieger_, Jan 13 2021 *) %o A340615 (MATLAB) %o A340615 function a = A340615(max_n) %o A340615 for n = 1:max_n %o A340615 k = (n-1)+floor(((n-1)+1)/5); %o A340615 if floor(k/2) == k/2 %o A340615 a(n) = k/2; %o A340615 else %o A340615 a(n) = (k*3+1)/2; %o A340615 end %o A340615 end %o A340615 end %Y A340615 Cf. A014682, A093545 (inverse). %K A340615 nonn,easy %O A340615 0,2 %A A340615 _Thomas Scheuerle_, Jan 13 2021