login
a(n) = sigma(n) - ceiling(n + sqrt n) as n runs through the composite numbers A002808.
2

%I #20 Apr 25 2024 05:18:41

%S 1,3,4,1,4,12,6,5,11,16,17,6,9,31,1,10,7,22,36,25,9,14,7,49,15,10,43,

%T 47,33,26,19,69,1,35,13,38,58,9,56,15,24,100,26,33,55,10,69,49,18,65,

%U 114,31,40,55,10,81,97,31,34,130,13,36,23,82,134,11,66,25,40,15,146,63,47,107

%N a(n) = sigma(n) - ceiling(n + sqrt n) as n runs through the composite numbers A002808.

%C It is known that a(n) >= 0.

%D József Sándor, Dragoslav S. Mitrinovic, and Borislav Crstici, Handbook of Number Theory I, Springer Science & Business Media, 2005, Chapter III, p. 77, section III.1.1.a.

%D Wacław Sierpiński, Elementary Theory of Numbers. Państ. Wydaw. Nauk., Warsaw, 1964.

%H Wacław Sierpiński, <a href="http://pldml.icm.edu.pl/pldml/element/bwmeta1.element.dl-catalog-556369c7-b6cc-4a5b-be36-bfc8e0ca7cfa">Elementary Theory of Numbers</a>, Warszawa, 1964.

%t s[n_] := If[CompositeQ[n], DivisorSigma[1, n] - Ceiling[n + Sqrt[n]], Nothing]; Array[s, 100] (* _Amiram Eldar_, Apr 25 2024 *)

%o (PARI) lista(nn) = forcomposite(n=1, nn, print1(sigma(n) - ceil(n + sqrt(n)), ", ")); \\ _Michel Marcus_, Dec 12 2014

%o (Python)

%o from math import isqrt

%o from sympy import divisor_sigma, composite

%o def A079529(n): return divisor_sigma(m:=composite(n))-1-m-isqrt(m-1) # _Chai Wah Wu_, Jul 29 2022

%Y Cf. A000203, A002808, A079528, A055682, A058208.

%K nonn

%O 1,2

%A _N. J. A. Sloane_, Jan 22 2003