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!)
A049829 a(n) = Sum_{k=1..n} T(n,k), array T as in A049828. 3

%I #21 Sep 16 2022 07:34:45

%S 0,0,1,1,5,3,10,12,14,16,33,21,41,45,46,50,74,72,99,83,97,111,158,120,

%T 148,176,181,185,243,191,262,254,282,314,313,293,363,391,418,386,480,

%U 414,529,497,501,573,660,570,626,672,699,703

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

%H Robert Israel, <a href="/A049829/b049829.txt">Table of n, a(n) for n = 1..10000</a>

%p T:= proc(n,k) option remember;

%p if n*k = 0 then 0 else (n mod k) + procname(k,n mod k) fi

%p end proc:

%p seq(add(T(n,k),k=1..n), n=1..100); # _Robert Israel_, Aug 31 2015

%t T[n_, k_] := T[n, k] = If[n*k == 0, 0, Mod[n, k] + T[k, Mod[n, k]]];

%t a[n_] := Sum[T[n, k], {k, 1, n}];

%t Table[a[n], {n, 1, 100}] (* _Jean-François Alcover_, Sep 16 2022, after _Robert Israel_ *)

%o (PARI) t(n, k) = {x = n; y = k; r = 1; s = 0; while (r, q = x\y; r = x - y*q; s +=r; x = y; y = r;); s;}

%o a(n) = sum(k=1, n, t(n, k)); \\ _Michel Marcus_, Aug 31 2015

%Y Cf. A049828.

%K nonn

%O 1,5

%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 May 8 06:05 EDT 2024. Contains 372319 sequences. (Running on oeis4.)