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