login
A049794
a(n) = T(n,n-2), array T as in A049790.
7
1, 2, 3, 6, 11, 16, 25, 31, 44, 53, 66, 79, 97, 108, 130, 148, 168, 187, 214, 233, 265, 286, 315, 344, 381, 402, 442, 474, 511, 545, 590, 619, 670, 705, 751, 797, 848, 880, 940, 988, 1041, 1087, 1150, 1192, 1263, 1311, 1370, 1431
OFFSET
3,2
LINKS
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
STATUS
approved