OFFSET
5,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 5..1000
MAPLE
seq( `if`(n<9, n-4, add(floor((n-4)/floor((n-8)/j)), j=1..n-8)), n=5..60); # G. C. Greubel, Dec 10 2019
MATHEMATICA
Table[If[n<9, n-4, Sum[Floor[(n-4)/Floor[(n-8)/j]], {j, n-8}]], {n, 5, 60}] (* G. C. Greubel, Dec 10 2019 *)
PROG
(PARI) a(n) = if(n<9, n-4, sum(j=1, n-8, (n-4)\((n-8)\j)) );
vector(60, n, a(n+4) ) \\ G. C. Greubel, Dec 10 2019
(Magma) [n lt 9 select n-4 else (&+[Floor((n-4)/Floor((n-8)/j)): j in [1..n-8]]): n in [5..60]]; // G. C. Greubel, Dec 10 2019
(Sage)
def a(n):
if (n<9): return n-4
else: return sum(floor((n-4)/floor((n-8)/j)) for j in (1..n-8))
[a(n) for n in (5..60)] # G. C. Greubel, Dec 10 2019
(GAP)
a:= function(n)
if n<9 then return n-4;
else return Sum([1..n-8], j-> Int((n-4)/Int((n-8)/j)) );
fi; end;
List([5..60], n-> a(n) ); # G. C. Greubel, Dec 10 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved