A258913 a(n) is the sum of all numbers k for which sigma(k) = n.
1, 0, 2, 3, 0, 5, 4, 7, 0, 0, 0, 17, 9, 13, 8, 0, 0, 27, 0, 19, 0, 0, 0, 52, 0, 0, 0, 12, 0, 29, 41, 52, 0, 0, 0, 22, 0, 37, 18, 27, 0, 87, 0, 43, 0, 0, 0, 115, 0, 0, 0, 0, 0, 87, 0, 67, 49, 0, 0, 121, 0, 61, 32, 0, 0, 0, 0, 67, 0, 0, 0, 253, 0, 73, 0, 0, 0
Offset: 1
Keywords
Examples
To find a(24), note that the only values of k with sigma(k)=24 are k=14,15,23; therefore a(24)=14+15+23=52.
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
- Max Alekseyev, PARI/GP Scripts for Miscellaneous Math Problems (invphi.gp).
- Mathematics Stack Exchange, A number n which is the sum of all numbers k with sigma(k)=n?
Programs
-
Mathematica
a[n_] := Sum[k*Boole[DivisorSigma[1, k] == n], {k, 1, n}]; Array[a, 80] (* Jean-François Alcover, Jun 15 2015 *)
-
PARI
a(n)=sum(k=1,n,if(sigma(k)==n,k))
-
PARI
first(n)=my(v=vector(n),s); for(k=1,n,s=sigma(k);if(s<=n,v[s]+=k));v \\ Charles R Greathouse IV, Jun 15 2015
-
PARI
a(n) = vecsum(invsigma(n)); \\ Amiram Eldar, Dec 16 2024, using Max Alekseyev's invphi.gp
Comments