login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A100461
Triangle read by rows, based on array described below.
7
1, 1, 2, 1, 2, 4, 3, 4, 6, 8, 7, 8, 9, 12, 16, 25, 26, 27, 28, 30, 32, 49, 50, 51, 52, 55, 60, 64, 109, 110, 111, 112, 115, 120, 126, 128, 229, 230, 231, 232, 235, 240, 245, 248, 256, 481, 482, 483, 484, 485, 486, 490, 496, 504, 512, 1003, 1004, 1005, 1008, 1010, 1014, 1015, 1016, 1017, 1020, 1024
OFFSET
1,3
FORMULA
Form an array t(m,n) (n >= 1, 1 <= m <= n) by: t(1,n) = 2^(n-1) for all n; t(m+1,n) = (n-m)*floor( (t(m,n) - 1)/(n-m) ) for 1 <= m <= n-1.
EXAMPLE
Array begins:
1 2 4 8 16 32 ...
* 1 2 6 12 30 ...
* * 1 4 9 28 ...
* * * 3 8 27 ...
* * * * 7 26 ...
* * * * * 25 ...
and triangle begins:
1;
1, 2;
1, 2, 4;
3, 4, 6, 8;
7, 8, 9, 12, 16;
25, 26, 27, 28, 30, 32;
49, 50, 51, 52, 55, 60, 64;
109, 110, 111, 112, 115, 120, 126, 128;
MATHEMATICA
t[n_, k_]:= t[n, k]= If[k==1, 2^(n-1), (n-k+1)*Floor[(t[n, k-1] -1)/(n-k+1)]];
Table[t[n, n-k+1], {n, 15}, {k, n}]//Flatten (* G. C. Greubel, Apr 07 2023 *)
PROG
(Magma)
function t(n, k) // t = A100461
if k eq 1 then return 2^(n-1);
else return (n-k+1)*Floor((t(n, k-1) -1)/(n-k+1));
end if;
end function;
[t(n, n-k+1): k in [1..n], n in [1..12]]; // G. C. Greubel, Apr 07 2023
(SageMath)
def t(n, k): # t = A100461
if (k==1): return 2^(n-1)
else: return (n-k+1)*((t(n, k-1) -1)//(n-k+1))
flatten([[t(n, n-k+1) for k in range(1, n+1)] for n in range(1, 16)]) # G. C. Greubel, Apr 07 2023
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
N. J. A. Sloane, Nov 22 2004
STATUS
approved