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.

Showing 1-3 of 3 results.

A349414 a(n) = A324245(n) - n.

Original entry on oeis.org

0, 1, -2, 2, -1, 3, -5, 4, -2, 5, -8, 6, -3, 7, -11, 8, -4, 9, -14, 10, -5, 11, -17, 12, -6, 13, -20, 14, -7, 15, -23, 16, -8, 17, -26, 18, -9, 19, -29, 20, -10, 21, -32, 22, -11, 23, -35, 24, -12, 25, -38, 26, -13, 27, -41, 28, -14, 29, -44, 30, -15, 31, -47, 32
Offset: 0

Views

Author

Ruud H.G. van Tol, Nov 16 2021

Keywords

Comments

This uses a modified Collatz-Terras map, called f in the Vaillant and Delarue link. Odd k = 2*n+1; a(0) = 0 represents 1 "is done".
From Ruud H.G. van Tol, Dec 09 2021: (Start)
a(n) is given by cases according as r = n mod 4 is 0,1,2,3 so that the sequence can be taken as an array with row m = floor(n/4) and column r,
| 8m + 1 3 5 7 |
| m |r:0 1 2 3 |
+---+--------------+
| 0 | 0 1 -2 2 |
| 1 | -1 3 -5 4 |
| 2 | -2 5 -8 6 |
| 3 | -3 7 -11 8 |
...
All positive integers eventually reach 1 in the Collatz problem iff all nonnegative integers eventually reach 0 with repeated application of this map, i.e., if for all n, the sequence n, n+a(n), n+a(n+a(n)), n+a(n+a(n+a(n))), ... eventually hits 0 (by hitting any a(n) == -n).
Example for m = 1, r = 0: (8m+1) = 9; a(floor(9/2)) = a(4) = -1, which leads to (9 + 2*-1) = 7.
Notice that the "(8m+5) -> (8m+5-1) / 4 = (2k+1)" operation of the values for r == 2, is "shedding bits", similar to what division-by-2 does. Any trailing '101' of the odd is transformed to '1', so it is not performing a Collatz step itself, but it is "escaping the column".
a(n) = A246425(n) if r is in (0,1,3) (A047472). The values for r == 2 are (n' - n + a(n')), with n' derived as (n' = n; n' = floor(n' / 4) while (n' mod 4 == 2)). Example for 8m+5 == 53: n = (53 - 1) / 2 = 26; n' = ((26 -2)/4 -2)/4 = 1; A246425(26) = 1 - 26 + a(1) = -25 + 1 = -24.
(End)

Examples

			a(1) = 1 -> a(1+1) = -2 -> a(1+1-2) = a(0) = 0, which represents 3 -> 5 -> 1.
		

Crossrefs

Programs

  • Mathematica
    Table[(1 - 3 (-1)^n - 4 n (-1)^n + 2 (1 + n) Cos[n*Pi/2])/8, {n, 0, 100}] (* Wesley Ivan Hurt, Nov 16 2021 *)
    LinearRecurrence[{-1,-1,-1,1,1,1,1},{0,1,-2,2,-1,3,-5},64] (* Stefano Spezia, Nov 17 2021 *)
  • PARI
    A324245(n) = if(n%2, (1+3*n)/2, if(!(n%4), 3*(n/4), (n-2)/4));
    A349414(n) = (A324245(n)-n); \\ Antti Karttunen, Dec 09 2021

Formula

a(n) = A324245(n) - n.
a(n) = (n+1)/2 if n is odd,
a(n) = -1*n/4 if n == 0 (mod 4),
a(n) = (n-2)/4 - n if n == 2 (mod 4).
Let r = n mod 4 and m = n div 4.
r=0: a(n) = -1*m = a(n-4)-1
r=1: a(n) = 2*m+1 = a(n-4)+2 = a(n-2)+1
r=2: a(n) = -3*m-2 = a(n-4)-3
r=3: a(n) = 2*m+2 = a(n-4)+2 = a(n-2)+1
The moving sum over 4 elements gives the sequence /1,0,-2,-1/.
From Wesley Ivan Hurt, Nov 16 2021: (Start)
a(n) = (1 - 3*(-1)^n - 4*n*(-1)^n + 2*(1+n)*cos(n*Pi/2))/8.
G.f.: x*(1 - x + x^2 + x^4)/((1-x)*(1 + x + x^2 + x^3)^2). (End)
From Stefano Spezia, Nov 17 2021: (Start)
a(n) = - a(n-1) - a(n-2) - a(n-3) + a(n-4) + a(n-5) + a(n-6) + a(n-7) for n > 6.
E.g.f.: (cos(x) + (2*x - 1)*cosh(x) - x*sin(x) - 2*(x - 1)*sinh(x))/4. (End)
a(n) >= - n. - Ruud H.G. van Tol, Dec 09 2021

A324246 Irregular triangle T read by rows: T(n, k) = (A324038(n, k) - 1)/2.

Original entry on oeis.org

0, 2, 1, 10, 6, 42, 8, 26, 56, 170, 5, 34, 17, 106, 37, 226, 113, 682, 3, 22, 138, 11, 70, 426, 150, 906, 75, 454, 2730, 4, 14, 90, 184, 554, 7, 46, 282, 568, 1706, 200, 602, 1208, 3626, 100, 302, 1818, 3640, 10922, 18, 9, 58, 120, 362, 738, 369, 2218, 30, 186, 376, 1130, 2274, 1137, 6826, 133, 802, 401, 2410, 805, 4834, 2417, 14506, 402, 201, 1210, 2424, 7274, 14562, 7281, 43690
Offset: 0

Views

Author

Nicolas Vaillant, Philippe Delarue, Wolfdieter Lang, May 09 2019

Keywords

Comments

The length of row n is A324039, for n >= 0.
This is the incomplete binary tree corresponding to the modified Collatz map f (from the Vaillant and Delarue link) given in A324245.
The branches of this tree, called CfTree, give the iterations under the Vaillant and Delarue map f of the vertex labels of level n until label 0 on level n = 0 is reached.
The out-degree of a vertex label T(n, k), for n >= 1, is 1 if T(n, k) == 1 (mod 3) and 2 for all other labels. For level n = 0 with vertex label 0 this rule does not hold, it has out-degree 1, not 2.
The number of vertex labels on level n which are 1 (mod 3) is given in A324040.
The corresponding tree CfsTree with only odd vertex labels t(n, k) = 2*T(n,k) + 1 is given in A324038.
The Collatz conjecture is that all nonnegative integers appear in this CfTree. Because the sets of labels on the levels are pairwise disjoint, these numbers will then appear just once.
For this tree see Figure 2 in the Vaillant-Delarue link. It is also shown in the W. Lang link given in A324038.

Examples

			The irregular triangle T begins (the brackets combine pairs coming from out-degree 2 vertices of the preceding level):
----------------------------------------------------------
n\k   1  2    3   4     5    6     7   8   9  10    11 ...
0:    0
1:    2
2:   (1 10)
3:    6 42
4:   (8 26) (56 170)
5:   (5 34) (17 106)  (37  226) (113 682)
6:   (3 22) 138 (11    70) 426   150 906 (75 454) 2730
...
Row n = 7: (4 14) 90 (184 554)  (7 46) 282 (568 1706) (200 602) (1208 3626) (100 302) 1818 (3640 10922);
Row n = 8: 18 (9 58) (120 362) 738 (369 2218) 30 186 (376 1130) 2274 (1137 6826) (133 802) (401 2410) (805 4834) (2417 14506) 402 (201 1210) (2424 7274) 14562 (7281 43690).
...
The successors of T(1,1) = 2 == 2 (mod 3) are (-1 + 2*2 )/3 = 1 and 2*(1 + 2*2) = 10. The successor of T(2, 1) = 1  == 1 (mod 3) is 2*(1 + 2*1) = 6. The successors of T(3, 1) = 6  == 0 (mod 3) are 4*6/3 = 8 and 2*(1 + 2*6) = 26.
		

Crossrefs

Cf. A248573 (Collatz-Terras tree), A324038 (CfsTree), A324039, A324040, A324245.

Formula

Recurrence for the set of vertex labels CfTree(n) = {T(n, k), k = 1..A324039(n)} on level (row) n:
This set is obtained, with the map f from A324245, from CfTree(0) = {0}, CfTree(1) = {2}, and for n >= 2 CfTree(n) = {m >= 0: f(m) = T(n-1, k), for k = 1.. A324039(n-1)}.
Explicit form for the successor of T(n, k) on row (level) n+1, for n >= 1:
a label with T(n, k) == 1 (mod 3) produces the label 2*(1 + 2*T(n, k)) on row n+1; label T(n, k) == 0 (mod 3) produces the two labels 4*T(n, k)/3 and 2*(1 + 2*T(n, k)); label T(n, k) == 2 (mod 3) produces the two labels (-1 + 2*T(n, k))/3 and 2*(1 + 2*T(n, k)).

A324037 The minimal number of iterations to reach 1 of the modified reduced Collatz function, defined for odd numbers 1 + 2*n in A324036 (assuming the Collatz conjecture).

Original entry on oeis.org

0, 2, 1, 6, 7, 5, 3, 7, 4, 8, 2, 6, 9, 48, 7, 46, 10, 5, 8, 14, 47, 11, 6, 45, 9, 10, 4, 49, 12, 13, 8, 47, 10, 11, 5, 44, 50, 5, 9, 15, 9, 48, 3, 12, 12, 40, 7, 46, 51, 10, 10, 38, 16, 43, 49, 30, 4, 13, 8, 14, 41, 19, 47, 20, 52, 11, 11, 16, 39, 17, 6
Offset: 0

Views

Author

Nicolas Vaillant, Philippe Delarue, Wolfdieter Lang, May 09 2019

Keywords

Comments

The Collatz conjecture is that a(n) is finite. If 1 should never be reached then a(n) = -1.
Compare this sequence with the analogous one A075680(n+1) for the reduced Collatz map of A075677.
a(n) gives also the minimal number of iterations of the Vaillant-Delarue map f, defined in A324245, acting on n to reach 0 (assuming the Collatz conjecture).
For the link to the Vaillant-Delarue paper (where fs is called f_s) see A324036.

Examples

			a(4) = 7 because 1 + 2*4 = 9 and the 7 fs iterations acting on 9 are 7, 11, 17, 13, 3, 5, 1.
Compare this to the reduced Collatz map given in A075677 which needs only 6 = A075680(5) iterations 7, 11, 17, 13, 5, 1. The additional step in the fs case follows 13 == 5 mod(8).
		

Crossrefs

Formula

fs^[a(n)](1 + 2*n) = 1 but fs^[a(n)-1](1 + 2*n) is not 1 (for all n with finite a(n)), where fs is the modified reduced Collatz map defined for 1 + 2*n in A324036(n), for n >= 1, and a(0) = 0.
Showing 1-3 of 3 results.