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.

Previous Showing 11-11 of 11 results.

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.

Original entry on oeis.org

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, 10, 19, 33, 61, 101, 181, 277, 469, 597, 853, 341, 12, 23, 41, 77, 133, 245, 405, 725, 1109, 1877, 2389, 3413, 1365, 14, 27, 49, 93, 165, 309, 533, 981, 1621, 2901
Offset: 1

Views

Author

Ruud H.G. van Tol, Jul 29 2023

Keywords

Comments

The sequence is a permutation of all integers >= 0.
Each row of T contains n*2-1 terms; the terms in column k increase by 2^k.
T(1,1) = 0; T(2,2) = 3.
T(2,1) = T(1,1)+2 = 2; T(2,3) = 4*T(1,1)+1 = 1 ("knight jump").
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.
Right diagonal is A002450.
The terms at the top of the columns are A096773(k), or (2^(k-1)*(3 + 2*(-1)^k) - 1)/3.
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.

Examples

			Triangle T(n,k) begins:
n/k 1| 2| 3| 4|  5|  6|  7|  8|  9| 10| 11|
1|  0
2|  2  3  1
3|  4  7  9 13   5
4|  6 11 17 29  37  53  21
5|  8 15 25 45  69 117 149 213  85
6| 10 19 33 61 101 181 277 469 597 853 341
7| 12 ...
		

Crossrefs

Programs

  • 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
    
  • PARI
    T(n, k) = 2^k*(n-(6*k+3-(-1)^k)/12)-1/3;
    
  • 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;
    
  • PARI
    k_of_x(x) = valuation(3*x+1,2) + 1;

Formula

For n>1, T(n,k) = T(n-1,k) + 2^k, so T(n,1) = 2*(n-1).
T(n,2) = 4*(n-1)-1 = 2*T(n,1)-1, so T(2,2) = 3.
For n>1 and k>2, T(n,k) = 4*T(n-1,k-2)+1, so T(2,3) = 1.
For i>=0, a(i^2+1) = T(i+1,1).
T(n, k) = 2^k * (n - (6*k + 3 - (-1)^k)/12) - 1/3.
T(n,1) == 0 (mod 2); T(n,2) == 3 (mod 4); T(n,k>=3) == 1 (mod 4).
k = v2(3*T(n,k)+1) + 1, where v2(x) = A007814(x) is the 2-adic valuation of x.
Previous Showing 11-11 of 11 results.