OFFSET
1,2
COMMENTS
The generating function is the sum of the generating functions in A000027 and A065608. - R. J. Mathar, Apr 09 2008
FORMULA
a(n) = n + A065608(n). - R. J. Mathar, Apr 09 2008
a(n) = Sum_{k=1..n} k^(1-ceiling(n/k)+floor(n/k)). - Wesley Ivan Hurt, May 24 2021
EXAMPLE
Start with the natural numbers:
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ...
add 1 to every 2nd term:
1, 3, 3, 5, 5, 7, 7, 9, 9, 11, ...
add 2 to every 3rd term:
1, 3, 5, 5, 5, 9, 7, 9, 11, 11, ...
add 3 to every 4th term:
1, 3, 5, 8, 5, 9, 7, 12, 11, 11, ...
add 4 to every 5th term:
1, 3, 5, 8, 9, 9, 7, 12, 11, 15, ...
etc.
MAPLE
A137319 := proc(n) local a, k ; a := n ; for k from 2 to n do if n mod k = 0 then a := a+k-1 ; fi ; od: a; end: seq(A137319(n), n=1..100) ; # R. J. Mathar, Apr 09 2008
MATHEMATICA
Table[DivisorSigma[1, n] - DivisorSigma[0, n] + n, {n, 100}] (* Vincenzo Librandi, Sep 21 2015 *)
PROG
(PARI) a(n) = sigma(n) - numdiv(n) + n; \\ Michel Marcus, Oct 29 2022
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Ctibor O. Zizka, Apr 06 2008
EXTENSIONS
Corrected and extended by R. J. Mathar, Apr 09 2008
Edited by Jon E. Schoenfield, Sep 21 2015
STATUS
approved