login
a(n) = T(n,n-4), array T as in A049783.
7

%I #12 Sep 08 2022 08:44:58

%S 0,0,0,0,0,0,1,0,5,5,7,4,7,10,6,9,14,10,17,10,14,16,24,12,19,20,24,18,

%T 32,16,25,23,30,31,33,19,31,34,43,28,45,26,41,37,37,41,61,27,44,39,49,

%U 41,63,47,58,35,48,54,76,37,61,68,65,46,65

%N a(n) = T(n,n-4), array T as in A049783.

%H G. C. Greubel, <a href="/A049789/b049789.txt">Table of n, a(n) for n = 5..1000</a>

%F a(n) = Sum_{j=1..n-8} mod(n-4, floor((n-8)/j)). - _G. C. Greubel_, Dec 12 2019

%p seq( add(`mod`(n-4, floor((n-8)/j)), j=1..n-8), n=5..70); # _G. C. Greubel_, Dec 12 2019

%t Table[Sum[Mod[n-4, Floor[(n-8)/j]], {j, n-8}], {n,5,70}] (* _G. C. Greubel_, Dec 12 2019 *)

%o (PARI) vector(70, n, sum(j=1,n-4, lift(Mod(n, (n-4)\j))) ) \\ _G. C. Greubel_, Dec 12 2019

%o (Magma) [ n lt 9 select 0 else &+[((n-4) mod Floor((n-8)/j)): j in [1..n-8]]: n in [5..70]]; // _G. C. Greubel_, Dec 12 2019

%o (Sage) [sum( (n-4)%floor((n-8)/j) for j in (1..n-8)) for n in (5..70)] # _G. C. Greubel_, Dec 12 2019

%o (GAP) List([5..70], n-> Sum([1..n-8], j-> (n-4) mod Int((n-8)/j)) ); # _G. C. Greubel_, Dec 12 2019

%Y Cf. A049783, A049784, A049785, A049786, A049787, A049788.

%K nonn

%O 5,9

%A _Clark Kimberling_