A329480 a(n) = (1 - A075677(n))/6 if 6|(A075677(n)-1) or a(n) = (A075677(n) + 1)/6 if 6|(A075677(n)+1).
0, 1, 0, 2, -1, 3, 1, 4, -2, 5, 0, 6, -3, 7, 2, 8, -4, 9, -1, 10, -5, 11, 3, 12, -6, 13, 1, 14, -7, 15, 4, 16, -8, 17, -2, 18, -9, 19, 5, 20, -10, 21, 0, 22, -11, 23, 6, 24, -12, 25, -3, 26, -13, 27, 7, 28, -14, 29, 2, 30, -15, 31, 8, 32, -16, 33, -4, 34, -17
Offset: 1
Keywords
Examples
For n = 2, A075677(2) = 5, so a(2) = 1. For n = 9, A075677(9) = 13, so a(9) = -2. From _Ruud H.G. van Tol_, Oct 16 2023: (Start) Array T begins: n|k_1|__2|__3|__4| 1| 0 1 0 2 2| -1 3 1 4 3| -2 5 0 6 4| -3 7 2 8 5| -4 9 -1 10 6| -5 11 3 12 ... (End)
Links
- Ruud H.G. van Tol, Table of n, a(n) for n = 1..10000
- Commons.Wikimedia Integer Spiral
- Fabian S. Reid, The Visual Pattern in the Collatz Conjecture and Proof of No Non-Trivial Cycles, arXiv:2105.07955 [math.GM], 2021.
Programs
-
Mathematica
nterms=100;Table[r=(c=3(2n-1)+1)/2^IntegerExponent[c,2];If[Mod[r,6]==1,(1-r)/6,(1+r)/6],{n, nterms}] (* Paolo Xausa, Nov 28 2021 *)
-
PARI
a(n) = my(x=3*n-1); x>>=valuation(x, 2); if(1==x%6, 1-x, 1+x)/6; \\ Ruud H.G. van Tol, Oct 16 2023
Formula
From Ruud H.G. van Tol, Oct 16 2023: (Start)
a(4*n-1) = a(n).
T(n,1) = 1-n; T(n,2) = 2*n-1 = n - T(n,1); T(n,3) = T(floor((n-1)/4) + 1, (n-1) mod 4 + 1) = a(n); T(n,4) = 2*n = T(n,2) + 1. (End)
Comments