cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A049766 a(n) = Sum_{k=1..n} T(n,k), array T as in A049765.

This page as a plain text file.
%I A049766 #23 Sep 08 2022 08:44:58
%S A049766 0,1,4,7,14,18,29,36,48,58,77,83,106,122,141,156,187,200,235,251,280,
%T A049766 308,351,361,403,437,476,502,557,573,632,663,712,758,813,828,899,951,
%U A049766 1010,1038,1117,1145,1228,1274,1329,1393,1484
%N A049766 a(n) = Sum_{k=1..n} T(n,k), array T as in A049765.
%H A049766 G. C. Greubel, <a href="/A049766/b049766.txt">Table of n, a(n) for n = 1..1000</a>
%p A049766 seq( add( `mod`(k, n) + `mod`(n, k), k = 1..n), n = 1..50); # _G. C. Greubel_, Dec 13 2019
%t A049766 T[n_, k_] := Mod[n, k] + Mod[k, n]; Map[Total[T[#, Range[#]]] &, Range[80]] (* _Carl Najafi_, Aug 24 2011 *)
%o A049766 (PARI) a(n) = sum(k=1, n, k%n + n%k); \\ _Michel Marcus_, Aug 22 2015
%o A049766 (Magma) [&+[ (k mod n) + (n mod k): k in [1..n]]: n in [1..50]]; // _G. C. Greubel_, Dec 13 2019
%o A049766 (Sage) [sum((k%n) + (n%k) for k in (1..n)) for n in (1..50)] # _G. C. Greubel_, Dec 13 2019
%o A049766 (GAP) List([1..50], n-> Sum([1..n], k-> (k mod n) + (n mod k)) ); # _G. C. Greubel_, Dec 13 2019
%Y A049766 Row sums of A049765.
%Y A049766 Cf. A049767, A049768.
%K A049766 nonn
%O A049766 1,3
%A A049766 _Clark Kimberling_