login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A049841 a(n) = Sum_{k=1..n} T(n,k), array T as in A049840. 2

%I #12 Mar 06 2020 09:26:14

%S 1,4,11,19,36,45,74,92,119,144,199,203,276,307,346,394,483,504,613,

%T 621,704,785,918,896,1033,1128,1207,1271,1462,1421,1658,1694,1827,

%U 1966,2051,2087,2362,2465,2594,2626,2941,2886,3239

%N a(n) = Sum_{k=1..n} T(n,k), array T as in A049840.

%H G. C. Greubel, <a href="/A049841/b049841.txt">Table of n, a(n) for n = 1..1000</a>

%t T[n_, k_]:= If[k<=0 || k >= n+1, 0, n + T[k, Mod[n, k]]]; Table[Sum[T[n, k], {k, n}], {n, 30}] (* _G. C. Greubel_, Aug 07 2019 *)

%o (PARI) {T(n, k) = if(k<=0 || k>= n+1, 0, n + T(k, n % k))}; vector(50, n, sum(k=1,n, T(n, k)) ) \\ _G. C. Greubel_, Aug 07 2019

%o (Sage)

%o def T(n, k):

%o if (k==0): return 0

%o else: return n + T(n, mod(n, k))

%o [sum(T(n, k) for k in (1..n)) for n in (1..50)] # _G. C. Greubel_, Aug 07 2019

%o (GAP)

%o T:= function(n,k) if k=0 then return 0;

%o else return n + T(k, (n mod k));

%o fi;

%o end;

%o List([1..50], n-> Sum([1..n], k-> T(n,k) )); # _G. C. Greubel_, Aug 07 2019

%Y Cf. A049840.

%K nonn

%O 1,2

%A _Clark Kimberling_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 00:26 EDT 2024. Contains 371264 sequences. (Running on oeis4.)