The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A326123 a(n) is the sum of all divisors of the first n odd numbers. 9

%I #40 Nov 01 2023 18:30:17

%S 1,5,11,19,32,44,58,82,100,120,152,176,207,247,277,309,357,405,443,

%T 499,541,585,663,711,768,840,894,966,1046,1106,1168,1272,1356,1424,

%U 1520,1592,1666,1790,1886,1966,2087,2171,2279,2399,2489,2601,2729,2849,2947,3103,3205,3309,3501,3609,3719

%N a(n) is the sum of all divisors of the first n odd numbers.

%C a(n)/A326124(n) converges to 3/5.

%C a(n) is also the total area of the terraces of the first n odd-indexed levels of the stepped pyramid described in A245092.

%H Robert Israel, <a href="/A326123/b326123.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A024916(2n) - A326124(n).

%F a(n) ~ Pi^2 * n^2 / 8. - _Vaclav Kotesovec_, Aug 18 2021

%e For n = 3 the first three odd numbers are [1, 3, 5] and their divisors are [1], [1, 3], [1, 5] respectively, and the sum of these divisors is 1 + 1 + 3 + 1 + 5 = 11, so a(3) = 11.

%p ListTools:-PartialSums(map(numtheory:-sigma, [seq(i,i=1..200,2)])); # _Robert Israel_, Jun 12 2019

%t Accumulate@ DivisorSigma[1, Range[1, 109, 2]] (* _Michael De Vlieger_, Jun 09 2019 *)

%o (PARI) terms(n) = my(s=0, i=0); for(k=0, n-1, if(i>=n, break); s+=sigma(2*k+1); print1(s, ", "); i++)

%o /* Print initial 50 terms as follows: */

%o terms(50) \\ _Felix Fröhlich_, Jun 08 2019

%o (PARI) a(n) = sum(k=1, 2*n-1, if (k%2, sigma(k))); \\ _Michel Marcus_, Jun 08 2019

%o (Python)

%o from math import isqrt

%o def A326123(n): return (-(s:=isqrt(r:=n<<1))**2*(s+1) + sum((q:=r//k)*((k<<1)+q+1) for k in range(1,s+1))>>1) -(t:=isqrt(m:=n>>1))**2*(t+1)+sum((q:=m//k)*((k<<1)+q+1) for k in range(1,t+1))+3*((u:=isqrt(n))**2*(u+1)-sum((q:=n//k)*((k<<1)+q+1) for k in range(1,u+1))>>1) # _Chai Wah Wu_, Nov 01 2023

%Y Partial sums of A008438.

%Y Cf. A000203, A005408, A024916, A237593, A245092, A326124.

%K nonn,easy

%O 1,2

%A _Omar E. Pol_, Jun 07 2019

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 May 23 17:39 EDT 2024. Contains 372765 sequences. (Running on oeis4.)