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
0, 0, 1, 1, 5, 3, 10, 12, 14, 16, 33, 21, 41, 45, 46, 50, 74, 72, 99, 83, 97, 111, 158, 120, 148, 176, 181, 185, 243, 191, 262, 254, 282, 314, 313, 293, 363, 391, 418, 386, 480, 414, 529, 497, 501, 573, 660, 570, 626, 672, 699, 703 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,5
LINKS
MAPLE
T:= proc(n, k) option remember;
if n*k = 0 then 0 else (n mod k) + procname(k, n mod k) fi
end proc:
seq(add(T(n, k), k=1..n), n=1..100); # Robert Israel, Aug 31 2015
MATHEMATICA
T[n_, k_] := T[n, k] = If[n*k == 0, 0, Mod[n, k] + T[k, Mod[n, k]]];
a[n_] := Sum[T[n, k], {k, 1, n}];
Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Sep 16 2022, after Robert Israel *)
PROG
(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; }
a(n) = sum(k=1, n, t(n, k)); \\ Michel Marcus, Aug 31 2015
CROSSREFS
Cf. A049828.
Sequence in context: A248660 A141620 A195140 * A258333 A137613 A335302
KEYWORD
nonn
AUTHOR
STATUS
approved

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 June 30 11:21 EDT 2024. Contains 373870 sequences. (Running on oeis4.)