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 A364602 #82 Sep 06 2023 21:09:40 %S A364602 0,2,3,1,4,7,9,13,5,6,11,17,29,37,53,21,8,15,25,45,69,117,149,213,85, %T A364602 10,19,33,61,101,181,277,469,597,853,341,12,23,41,77,133,245,405,725, %U A364602 1109,1877,2389,3413,1365,14,27,49,93,165,309,533,981,1621,2901 %N A364602 Triangle T(n,k) with rows of length 2*n-1, generated by T(1,1)=0, T(n,1)=T(n-1,1)+2, T(n,2)=4*(n-1)-1, and for k>=3, T(n,k)=4*T(n-1,k-2)+1. %C A364602 The sequence is a permutation of all integers >= 0. %C A364602 Each row of T contains n*2-1 terms; the terms in column k increase by 2^k. %C A364602 T(1,1) = 0; T(2,2) = 3. %C A364602 T(2,1) = T(1,1)+2 = 2; T(2,3) = 4*T(1,1)+1 = 1 ("knight jump"). %C A364602 In the context of the 3x+1 problem, when a term x is used to represent the odd 4*x+1, its successor is 3*x+1, and k-1 is the 2-adic valuation of 3*x+1. %C A364602 Right diagonal is A002450. %C A364602 The terms at the top of the columns are A096773(k), or (2^(k-1)*(3 + 2*(-1)^k) - 1)/3. %C A364602 When the table is analytically continued upwards by subtracting 2^k, the first layer of values are -A255138(k), or -(2^k*(3 + 2*(-1)^k) + 1)/3. %F A364602 For n>1, T(n,k) = T(n-1,k) + 2^k, so T(n,1) = 2*(n-1). %F A364602 T(n,2) = 4*(n-1)-1 = 2*T(n,1)-1, so T(2,2) = 3. %F A364602 For n>1 and k>2, T(n,k) = 4*T(n-1,k-2)+1, so T(2,3) = 1. %F A364602 For i>=0, a(i^2+1) = T(i+1,1). %F A364602 T(n, k) = 2^k * (n - (6*k + 3 - (-1)^k)/12) - 1/3. %F A364602 T(n,1) == 0 (mod 2); T(n,2) == 3 (mod 4); T(n,k>=3) == 1 (mod 4). %F A364602 k = v2(3*T(n,k)+1) + 1, where v2(x) = A007814(x) is the 2-adic valuation of x. %e A364602 Triangle T(n,k) begins: %e A364602 n/k 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| %e A364602 1| 0 %e A364602 2| 2 3 1 %e A364602 3| 4 7 9 13 5 %e A364602 4| 6 11 17 29 37 53 21 %e A364602 5| 8 15 25 45 69 117 149 213 85 %e A364602 6| 10 19 33 61 101 181 277 469 597 853 341 %e A364602 7| 12 ... %o A364602 (PARI) my(N=8, v=Vec([0, 2, 3, 1], N^2), p=4); for(n=3, N, my(K=2*n-1); for(k=1, K, v[p+k]=if(k<=2, v[p-K+k+2]+2^k, 4*v[p-K+k]+1)); p+=K); v %o A364602 (PARI) T(n, k) = 2^k*(n-(6*k+3-(-1)^k)/12)-1/3; %o A364602 (PARI) n_of_x(x) = my(n=0); while(1==x%4, x>>=2; n++); n + if(x%2,(x+1)/4, x/2) + 1; %o A364602 (PARI) k_of_x(x) = valuation(3*x+1,2) + 1; %Y A364602 Cf. A002450, A007310, A071797, A087445, A096773, A255138, A257480. %K A364602 nonn,tabf %O A364602 1,2 %A A364602 _Ruud H.G. van Tol_, Jul 29 2023