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 A118413 #20 Jun 21 2025 11:16:08 %S A118413 1,3,6,5,10,20,7,14,28,56,9,18,36,72,144,11,22,44,88,176,352,13,26,52, %T A118413 104,208,416,832,15,30,60,120,240,480,960,1920,17,34,68,136,272,544, %U A118413 1088,2176,4352,19,38,76,152,304,608,1216,2432,4864,9728,21,42,84,168 %N A118413 Triangle read by rows: T(n,k) = (2*n-1)*2^(k-1), 0<k<=n. %C A118413 Central terms give A118415; row sums give A118414; %C A118413 T(n,1) = A005408(n-1); %C A118413 T(n,2) = A016825(n-1) for n>1; %C A118413 T(n,3) = A017113(n-1) for n>2; %C A118413 T(n,4) = A051062(n-1) for n>3; %C A118413 T(n,n-2) = A052951(n-1) for n>2; %C A118413 T(n,n) = A014480(n-1) = A118416(n,n); %C A118413 A001511(T(n,k)) = A002260(n,k); %C A118413 A003602(T(n,k)) = A002024(n,k). %C A118413 G.f.: x*y*(1 + x + 2*x*y - 6*x^2*y)/((1 - x)^2*(1 - 2*x*y)^2). - _Stefano Spezia_, Dec 22 2024 %e A118413 1 %e A118413 3 6 %e A118413 5 10 20 %e A118413 7 14 28 56 %e A118413 9 18 36 72 144 %e A118413 11 22 44 88 176 352 %e A118413 13 26 52 104 208 416 832 %e A118413 15 30 60 120 240 480 960 1920 %e A118413 17 34 68 136 272 544 1088 2176 4352 %e A118413 19 38 76 152 304 608 1216 2432 4864 9728 %e A118413 ... %t A118413 Select[Flatten[Table[(2n-1)2^(k-1),{n,20},{k,0,n}]],IntegerQ] (* _Harvey P. Dale_, Jan 17 2024 *) %o A118413 (Python) %o A118413 from math import isqrt, comb %o A118413 def A118413(n): %o A118413 a = (m:=isqrt(k:=n<<1))+(k>m*(m+1)) %o A118413 return ((a<<1)-1)<<n-comb(a,2)-1 # _Chai Wah Wu_, Jun 20 2025 %Y A118413 Cf. A001511, A002024, A002260, A003602, A005408, A014480, A016825, A017113, A051062, A052951, A117303, A118414, A118415, A118416, A117303. %K A118413 nonn,tabl,easy %O A118413 1,2 %A A118413 _Reinhard Zumkeller_, Apr 27 2006