OFFSET
1,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
MATHEMATICA
t[1, n_]:= n^2; (* t = A100452 *)
t[m_, n_]/; 1<m<=n:= t[m, n]= (n-m+1)*Floor[(t[m-1, n] -1)/(n-m+1)];
t[_, _]=0;
Table[A100454[n], {n, 60}] (* G. C. Greubel, Apr 07 2023 *)
PROG
(Magma)
function t(n, k) // t = A100452
if k eq 1 then return n^2;
else return (n-k+1)*Floor((t(n, k-1) -1)/(n-k+1));
end if;
end function;
A100454:= func< n | (&+[t(n, n-k+1): k in [1..n]]) >;
[A100454(n): n in [1..60]]; // G. C. Greubel, Apr 07 2023
(SageMath)
def t(n, k): # t = A100452
if (k==1): return n^2
else: return (n-k+1)*((t(n, k-1) -1)//(n-k+1))
def A100454(n): return sum(t(n, n-k+1) for k in range(1, n+1))
[A100454(n) for n in range(1, 61)] # G. C. Greubel, Apr 07 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Nov 22 2004
EXTENSIONS
Terms a(26) onward added by G. C. Greubel, Apr 07 2023
STATUS
approved