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 A342261 #28 Jul 13 2022 21:58:41 %S A342261 0,1,8,2,4,5,16,13,14,22,34,38,52,74,77,20,25,40,50,88,130,146,173, %T A342261 185,203,209,223,229,230,238,241,130,146,173,185,203,209,223,229,230, %U A342261 238,241,41,61,76,104,106,121,128,157,254,266,292,311,403,412,430,445,454,493 %N A342261 Irregular triangular array T(n,k) = m read by rows. Row n lists all solutions m < 3^n, where A340407(3^n*j - m) = n is true for all j > 0, sorted in ascending order. %C A342261 Each row n has 2^(n-1) values. %C A342261 In all rows other than the first row of T(n,k), there are exactly 2^(n-2) numbers of the form 3*p + 1 and the same number of numbers of the form 3*q - 1. %C A342261 Each integer has a unique representation of the form 3^n*j - T(n,k). %e A342261 Triangle T(n,k) begins: %e A342261 0; %e A342261 1, 8; %e A342261 2, 4, 5, 16; %e A342261 13, 14, 22, 34, 38, 52, 74, 77; %o A342261 (MATLAB) %o A342261 function t = A342261 (max_row) %o A342261 maxtest = 10; %o A342261 d = A340407(maxtest*3^max_row); %o A342261 for row = 1:max_row %o A342261 m = 0; %o A342261 for k = 1:2^(row-1) %o A342261 test = d((1:maxtest)*(3^row)-m); %o A342261 while ~all(test == test(1))||(test(1) ~= row) %o A342261 m = m+1; %o A342261 test = d((1:maxtest)*(3^row)-m); %o A342261 end %o A342261 t(row,k) = m; %o A342261 t = t+1; %o A342261 end %o A342261 end %o A342261 end %o A342261 function d = A340407 (max_p) %o A342261 for p = 1:max_p %o A342261 s = 6*p -2; %o A342261 c = 0; %o A342261 while mod(s,3) ~= 0 %o A342261 s = A342369( s ); %o A342261 if mod(s,3) == 2 %o A342261 c = c+1; %o A342261 end %o A342261 end %o A342261 d(p) = c; %o A342261 end %o A342261 end %o A342261 function b = A342369( n ) %o A342261 if mod(n,3) == 2 %o A342261 b = (2*n - 1)/3; %o A342261 else %o A342261 b = 2*n; %o A342261 end %o A342261 end %Y A342261 Cf. A340407. %K A342261 nonn,tabf %O A342261 1,3 %A A342261 _Thomas Scheuerle_, Mar 26 2021