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!)
A349680 a(n) = Sum_{k=1..n} (n-k)^c(n/k), where c(n) = 1 - ceiling(n) + floor(n). 1

%I #16 Nov 28 2021 10:35:48

%S 0,1,3,6,7,14,11,21,20,28,19,50,23,42,47,60,31,81,35,92,69,70,43,148,

%T 66,84,91,134,55,190,59,155,113,112,123,260,71,126,135,262,79,274,83,

%U 218,231,154,91,394,136,251,179,260,103,358,199,376,201,196,115,600,119,210,331

%N a(n) = Sum_{k=1..n} (n-k)^c(n/k), where c(n) = 1 - ceiling(n) + floor(n).

%C For all k from 1 to n, add (n-k) if k|n, otherwise add 1 (see example).

%H Antti Karttunen, <a href="/A349680/b349680.txt">Table of n, a(n) for n = 1..20000</a>

%F a(n) = n + (n-1)*A000005(n) - A000203(n). - _Chai Wah Wu_, Nov 25 2021

%F a(p) = 2p-3 for primes p. - _Wesley Ivan Hurt_, Nov 28 2021

%e a(8) = 21, since for k = 1..8, we have: (8-1) + (8-2) + 1 + (8-4) + 1 + 1 + 1 + (8-8) = 21.

%t Table[Sum[(n - k)^(1 - Ceiling[n/k] + Floor[n/k]), {k, n}], {n, 100}]

%o (PARI) a(n) = sum(k=1, n, if (n % k, 1, n-k)); \\ _Michel Marcus_, Nov 25 2021

%o (Python)

%o from sympy import divisor_sigma

%o def A349680(n): return n+(n-1)*divisor_sigma(n,0)-divisor_sigma(n,1) # _Chai Wah Wu_, Nov 25 2021

%Y Cf. A000005 (tau), A000203 (sigma).

%K nonn

%O 1,3

%A _Wesley Ivan Hurt_, Nov 24 2021

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 April 24 03:08 EDT 2024. Contains 371918 sequences. (Running on oeis4.)