login
A100462
Leading diagonal of array in A100461.
3
1, 1, 1, 3, 7, 25, 49, 109, 229, 481, 1003, 2019, 4051, 8143, 16309, 32683, 65439, 131007, 262081, 524187, 1048423, 2097027, 4194147, 8388481, 16777039, 33554269, 67108699, 134217529, 268435227, 536870713, 1073741607, 2147483371, 4294967043, 8589934267, 17179868869
OFFSET
1,4
LINKS
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)]]; (* t = A100461 *)
Table[t[n, n], {n, 40}] (* 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): n in [1..40]]; // 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))
[t(n, n) for n in range(1, 41)] # G. C. Greubel, Apr 07 2023
CROSSREFS
Sequence in context: A058781 A347614 A363535 * A161637 A329969 A287880
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Nov 22 2004
STATUS
approved