%I #16 Oct 29 2022 16:06:54
%S 1,3,5,8,9,14,13,19,19,24,21,34,25,34,35,42,33,51,37,56,49,54,45,76,
%T 53,64,63,78,57,94,61,89,77,84,79,118,73,94,91,122,81,130,85,122,117,
%U 114,93,162,103,137,119,144,105,166,123,168,133,144,117,216,121,154,161,184
%N Start with the set of natural numbers. Add 1 to every 2nd term, 2 to every 3rd term, 3 to every 4th term, etc.
%C The generating function is the sum of the generating functions in A000027 and A065608. - _R. J. Mathar_, Apr 09 2008
%F a(n) = n + A065608(n). - _R. J. Mathar_, Apr 09 2008
%F a(n) = Sum_{k=1..n} k^(1-ceiling(n/k)+floor(n/k)). - _Wesley Ivan Hurt_, May 24 2021
%e Start with the natural numbers:
%e 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ...
%e add 1 to every 2nd term:
%e 1, 3, 3, 5, 5, 7, 7, 9, 9, 11, ...
%e add 2 to every 3rd term:
%e 1, 3, 5, 5, 5, 9, 7, 9, 11, 11, ...
%e add 3 to every 4th term:
%e 1, 3, 5, 8, 5, 9, 7, 12, 11, 11, ...
%e add 4 to every 5th term:
%e 1, 3, 5, 8, 9, 9, 7, 12, 11, 15, ...
%e etc.
%p 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
%t Table[DivisorSigma[1, n] - DivisorSigma[0, n] + n, {n, 100}] (* _Vincenzo Librandi_, Sep 21 2015 *)
%o (PARI) a(n) = sigma(n) - numdiv(n) + n; \\ _Michel Marcus_, Oct 29 2022
%Y Cf. A000027, A065608.
%K easy,nonn
%O 1,2
%A _Ctibor O. Zizka_, Apr 06 2008
%E Corrected and extended by _R. J. Mathar_, Apr 09 2008
%E Edited by _Jon E. Schoenfield_, Sep 21 2015
|