A048050 Chowla's function: sum of divisors of n except for 1 and n.
0, 0, 0, 2, 0, 5, 0, 6, 3, 7, 0, 15, 0, 9, 8, 14, 0, 20, 0, 21, 10, 13, 0, 35, 5, 15, 12, 27, 0, 41, 0, 30, 14, 19, 12, 54, 0, 21, 16, 49, 0, 53, 0, 39, 32, 25, 0, 75, 7, 42, 20, 45, 0, 65, 16, 63, 22, 31, 0, 107, 0, 33, 40, 62, 18, 77, 0, 57, 26, 73, 0, 122, 0, 39, 48, 63, 18, 89
Offset: 1
Examples
For n = 20 the divisors of 20 are 1,2,4,5,10,20, so a(20) = 2+4+5+10 = 21. On the other hand, the partitions of 20 into equal parts that contain neither 1 nor 20 as a part are [10,10], [5,5,5,5], [4,4,4,4,4], [2,2,2,2,2,2,2,2,2,2]. There are 21 parts, so a(20) = 21. - _Omar E. Pol_, Nov 24 2019
References
- James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 92.
Links
- T. D. Noe, Table of n, a(n) for n = 1..10000
- M. Lal and A. Forbes, A note on Chowla's function, Math. Comp., 25 (1971), 923-925.
- Abdur Rahman Nasir, On a certain arithmetic function, Bull. Calcutta Math. Soc., Vol. 38 (1946), p. 140.
- Omar E. Pol, Illustration of initial terms obtained geometrically.
Crossrefs
Programs
-
Haskell
a048050 1 = 0 a048050 n = (subtract 1) $ sum $ a027751_row n -- Reinhard Zumkeller, Feb 09 2013
-
Magma
A048050:=func< n | n eq 1 or IsPrime(n) select 0 else &+[ a: a in Divisors(n) | a ne 1 and a ne n ] >; [ A048050(n): n in [1..100] ]; // Klaus Brockhaus, Mar 04 2011
-
Maple
A048050 := proc(n) if n > 1 then numtheory[sigma](n)-1-n ; else 0; end if; end proc:
-
Mathematica
f[n_]:=Plus@@Divisors[n]-n-1; Table[f[n],{n,100}] (*Vladimir Joseph Stephan Orlovsky, Sep 13 2009*) Join[{0},DivisorSigma[1,#]-#-1&/@Range[2,80]] (* Harvey P. Dale, Feb 25 2015 *)
-
PARI
a(n)=if(n>1,sigma(n)-n-1,0) \\ Charles R Greathouse IV, Nov 20 2012
-
Python
from sympy import divisors def a(n): return sum(divisors(n)[1:-1]) # Indranil Ghosh, Apr 26 2017
-
Python
from sympy import divisor_sigma def A048050(n): return 0 if n == 1 else divisor_sigma(n)-n-1 # Chai Wah Wu, Apr 18 2021
Formula
a(n) = A001065(n) - 1, n > 1.
a(n) = A000203(n) - n - 1, n > 1. - Wesley Ivan Hurt, Aug 22 2013
G.f.: Sum_{k>=2} k*x^(2*k)/(1 - x^k). - Ilya Gutkovskiy, Jan 22 2017
Comments