cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 16 results. Next

A000593 Sum of odd divisors of n.

Original entry on oeis.org

1, 1, 4, 1, 6, 4, 8, 1, 13, 6, 12, 4, 14, 8, 24, 1, 18, 13, 20, 6, 32, 12, 24, 4, 31, 14, 40, 8, 30, 24, 32, 1, 48, 18, 48, 13, 38, 20, 56, 6, 42, 32, 44, 12, 78, 24, 48, 4, 57, 31, 72, 14, 54, 40, 72, 8, 80, 30, 60, 24, 62, 32, 104, 1, 84, 48, 68, 18, 96, 48, 72, 13, 74, 38, 124
Offset: 1

Views

Author

Keywords

Comments

Denoted by Delta(n) or Delta_1(n) in Glaisher 1907. - Michael Somos, May 17 2013
A069289(n) <= a(n). - Reinhard Zumkeller, Apr 05 2015
A000203, A001227 and this sequence have the same parity: A053866. - Omar E. Pol, May 14 2016
For the g.f.s given below by Somos Oct 29 2005, Jovovic, Oct 11 2002 and Arndt, Nov 09 2010, see the Hardy-Wright reference, proof of Theorem 382, p. 312, with x^2 replaced by x. - Wolfdieter Lang, Dec 11 2016
a(n) is also the total number of parts in all partitions of n into an odd number of equal parts. - Omar E. Pol, Jun 04 2017
It seems that a(n) divides A000203(n) for every n. - Ivan N. Ianakiev, Nov 25 2017 [Yes, see the formula dated Dec 14 2017].
Also, alternating row sums of A126988. - Omar E. Pol, Feb 11 2018
Where a(n) shows the number of equivalence classes of Hurwitz quaternions with norm n (equivalence defined by right multiplication with one of the 24 Hurwitz units as in A055672), A046897(n) seems to give the number of equivalence classes of Lipschitz quaternions with norm n (equivalence defined by right multiplication with one of the 8 Lipschitz units). - R. J. Mathar, Aug 03 2025

Examples

			G.f. = x + x^2 + 4*x^3 + x^4 + 6*x^5 + 4*x^6 + 8*x^7 + x^8 + 13*x^9 + 6*x^10 + 12*x^11 + ...
		

References

  • Jean-Marie De Koninck and Armel Mercier, 1001 Problèmes en Théorie Classique des Nombres, Problème 496, pp. 69-246, Ellipses, Paris, 2004.
  • G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, Cambridge, University Press, 1940, p. 132.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, Fifth Edition, Clarendon Press, Oxford, 2003, p. 312.
  • Friedrich Hirzebruch, Thomas Berger, and Rainer Jung, Manifolds and Modular Forms, Vieweg, 1994, p. 133.
  • John Riordan, Combinatorial Identities, Wiley, 1968, p. 187.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A000005, A000203, A000265, A001227, A006128, A050999, A051000, A051001, A051002, A065442, A078471 (partial sums), A069289, A247837 (subset of the primes).

Programs

  • Haskell
    a000593 = sum . a182469_row  -- Reinhard Zumkeller, May 01 2012, Jul 25 2011
    
  • Magma
    m:=50; R:=PowerSeriesRing(Integers(), m); Coefficients(R!( (&+[j*x^j/(1+x^j): j in [1..2*m]])  )); // G. C. Greubel, Nov 07 2018
    
  • Magma
    [&+[d:d in Divisors(n)|IsOdd(d)]:n in [1..75]]; // Marius A. Burtea, Aug 12 2019
    
  • Maple
    A000593 := proc(n) local d,s; s := 0; for d from 1 by 2 to n do if n mod d = 0 then s := s+d; fi; od; RETURN(s); end;
  • Mathematica
    Table[a := Select[Divisors[n], OddQ[ # ]&]; Sum[a[[i]], {i, 1, Length[a]}], {n, 1, 60}] (* Stefan Steinerberger, Apr 01 2006 *)
    f[n_] := Plus @@ Select[ Divisors@ n, OddQ]; Array[f, 75] (* Robert G. Wilson v, Jun 19 2011 *)
    a[ n_] := If[ n < 1, 0, Sum[ -(-1)^d n / d, {d, Divisors[ n]}]]; (* Michael Somos, May 17 2013 *)
    a[ n_] := If[ n < 1, 0, DivisorSum[ n, -(-1)^# n / # &]]; (* Michael Somos, May 17 2013 *)
    a[ n_] := If[ n < 1, 0, Sum[ Mod[ d, 2] d, {d, Divisors[ n]}]]; (* Michael Somos, May 17 2013 *)
    a[ n_] := If[ n < 1, 0, Times @@ (If[ # < 3, 1, (#^(#2 + 1) - 1) / (# - 1)] & @@@ FactorInteger @ n)]; (* Michael Somos, Aug 15 2015 *)
    Array[Total[Divisors@ # /. d_ /; EvenQ@ d -> Nothing] &, {75}] (* Michael De Vlieger, Apr 07 2016 *)
    Table[SeriesCoefficient[n Log[QPochhammer[-1, x]], {x, 0, n}], {n, 1, 75}] (* Vladimir Reshetnikov, Nov 21 2016 *)
    Table[DivisorSum[n,#&,OddQ[#]&],{n,80}] (* Harvey P. Dale, Jun 19 2021 *)
  • PARI
    {a(n) = if( n<1, 0, sumdiv( n, d, (-1)^(d+1) * n/d))}; /* Michael Somos, May 29 2005 */
    
  • PARI
    N=66; x='x+O('x^N); Vec( serconvol( log(prod(j=1,N,1+x^j)), sum(j=1,N,j*x^j)))  /* Joerg Arndt, May 03 2008, edited by M. F. Hasler, Jun 19 2011 */
    
  • PARI
    s=vector(100);for(n=1,100,s[n]=sumdiv(n,d,d*(d%2)));s /* Zak Seidov, Sep 24 2011*/
    
  • PARI
    a(n)=sigma(n>>valuation(n,2)) \\ Charles R Greathouse IV, Sep 09 2014
    
  • Python
    from math import prod
    from sympy import factorint
    def A000593(n): return prod((p**(e+1)-1)//(p-1) for p, e in factorint(n).items() if p > 2) # Chai Wah Wu, Sep 09 2021
  • Sage
    [sum(k for k in divisors(n) if k % 2) for n in (1..75)] # Giuseppe Coppoletta, Nov 02 2016
    

Formula

Inverse Moebius Transform of [0, 1, 0, 3, 0, 5, ...].
Dirichlet g.f.: zeta(s)*zeta(s-1)*(1-2^(1-s)).
a(2*n) = A000203(2*n)-2*A000203(n), a(2*n+1) = A000203(2*n+1). - Henry Bottomley, May 16 2000
a(2*n) = A054785(2*n) - A000203(2*n). - Reinhard Zumkeller, Apr 23 2008
Multiplicative with a(p^e) = 1 if p = 2, (p^(e+1)-1)/(p-1) if p > 2. - David W. Wilson, Aug 01 2001
a(n) = Sum_{d divides n} (-1)^(d+1)*n/d, Dirichlet convolution of A062157 with A000027. - Vladeta Jovovic, Sep 06 2002
Sum_{k=1..n} a(k) is asymptotic to c*n^2 where c=Pi^2/24. - Benoit Cloitre, Dec 29 2002
G.f.: Sum_{n>0} n*x^n/(1+x^n). - Vladeta Jovovic, Oct 11 2002
G.f.: (theta_3(q)^4 + theta_2(q)^4 -1)/24.
G.f.: Sum_{k>0} -(-x)^k / (1 - x^k)^2. - Michael Somos, Oct 29 2005
a(n) = A050449(n)+A050452(n); a(A000079(n))=1; a(A005408(n))=A000203(A005408(n)). - Reinhard Zumkeller, Apr 18 2006
From Joerg Arndt, Nov 09 2010: (Start)
G.f.: Sum_{n>=1} (2*n-1) * q^(2*n-1) / (1-q^(2*n-1)).
G.f.: deriv(log(P)) = deriv(P)/P where P = Product_{n>=1} (1 + q^n). (End)
Dirichlet convolution of A000203 with [1,-2,0,0,0,...]. - R. J. Mathar, Jun 28 2011
a(n) = Sum_{k = 1..A001227(n)} A182469(n,k). - Reinhard Zumkeller, May 01 2012
G.f.: -1/Q(0), where Q(k) = (x-1)*(1-x^(2*k+1)) + x*(-1 +x^(k+1))^4/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Apr 30 2013
a(n) = Sum_{k=1..n} k*A000009(k)*A081362(n-k). - Mircea Merca, Feb 26 2014
a(n) = A000203(n) - A146076(n). - Omar E. Pol, Apr 05 2016
a(2*n) = a(n). - Giuseppe Coppoletta, Nov 02 2016
From Wolfdieter Lang, Dec 11 2016: (Start)
G.f.: Sum_{n>=1} x^n*(1+x^(2*n))/(1-x^(2*n))^2, from the second to last equation of the proof to Theorem 382 (with x^2 -> x) of the Hardy-Wright reference, p. 312.
a(n) = Sum_{d|n} (-d)*(-1)^(n/d), commutating factors of the D.g.f. given above by Jovovic, Oct 11 2002. See also the a(n) version given by Jovovic, Sep 06 2002. (End)
a(n) = A000203(n)/A038712(n). - Omar E. Pol, Dec 14 2017
a(n) = A000203(n)/(2^(1 + (A183063(n)/A001227(n))) - 1). - Omar E. Pol, Nov 06 2018
a(n) = A000203(2n) - 2*A000203(n). - Ridouane Oudra, Aug 28 2019
From Peter Bala, Jan 04 2021: (Start)
a(n) = (2/3)*A002131(n) + (1/3)*A002129(n) = (2/3)*A002131(n) + (-1)^(n+1)*(1/3)*A113184(n).
a(n) = A002131(n) - (1/2)*A146076; a(n) = 2*A002131(n) - A000203(n). (End)
a(n) = A000203(A000265(n)) - John Keith, Aug 30 2021
Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k)/A000203(k) = A065442 - 1 = 0.60669... . - Amiram Eldar, Dec 14 2024

A024916 a(n) = Sum_{k=1..n} k*floor(n/k); also Sum_{k=1..n} sigma(k) where sigma(n) = sum of divisors of n (A000203).

Original entry on oeis.org

1, 4, 8, 15, 21, 33, 41, 56, 69, 87, 99, 127, 141, 165, 189, 220, 238, 277, 297, 339, 371, 407, 431, 491, 522, 564, 604, 660, 690, 762, 794, 857, 905, 959, 1007, 1098, 1136, 1196, 1252, 1342, 1384, 1480, 1524, 1608, 1686, 1758, 1806, 1930, 1987, 2080, 2152
Offset: 1

Views

Author

Keywords

Comments

Row sums of triangle A128489. E.g., a(5) = 15 = (10 + 3 + 1 + 1), sum of row 4 terms of triangle A128489. - Gary W. Adamson, Jun 03 2007
Row sums of triangle A134867. - Gary W. Adamson, Nov 14 2007
a(10^4) = 82256014, a(10^5) = 8224740835, a(10^6) = 822468118437, a(10^7) = 82246711794796; see A072692. - M. F. Hasler, Nov 22 2007
Equals row sums of triangle A158905. - Gary W. Adamson, Mar 29 2009
n is prime if and only if a(n) - a(n-1) - 1 = n. - Omar E. Pol, Dec 31 2012
Also the alternating row sums of A236104. - Omar E. Pol, Jul 21 2014
a(n) is also the total number of parts in all partitions of the positive integers <= n into equal parts. - Omar E. Pol, Apr 30 2017
a(n) is also the total area of the terraces of the stepped pyramid with n levels described in A245092. - Omar E. Pol, Nov 04 2017
a(n) is also the area under the Dyck path described in the n-th row of A237593 (see example). - Omar E. Pol, Sep 17 2018
From Omar E. Pol, Feb 17 2020: (Start)
Convolution of A340793 and A000027.
Convolved with A340793 gives A000385. (End)
a(n) is also the number of cubic cells (or cubes) in the n-th level starting from the top of the stepped pyramid described in A245092. - Omar E. Pol, Jan 12 2022

Examples

			From _Omar E. Pol_, Aug 20 2021: (Start)
For n = 6 the sum of all divisors of the first six positive integers is [1] + [1 + 2] + [1 + 3] + [1 + 2 + 4] + [1 + 5] + [1 + 2 + 3 + 6] = 1 + 3 + 4 + 7 + 6 + 12 = 33, so a(6) = 33.
On the other hand the area under the Dyck path of the 6th diagram as shown below is equal to 33, so a(6) = 33.
Illustration of initial terms:                        _ _ _ _
                                        _ _ _        |       |_
                            _ _ _      |     |       |         |_
                  _ _      |     |_    |     |_ _    |           |
          _ _    |   |_    |       |   |         |   |           |
    _    |   |   |     |   |       |   |         |   |           |
   |_|   |_ _|   |_ _ _|   |_ _ _ _|   |_ _ _ _ _|   |_ _ _ _ _ _|
.
    1      4        8          15           21             33         (End)
		

References

  • Hardy and Wright, "An introduction to the theory of numbers", Oxford University Press, fifth edition, p. 266.

Crossrefs

Programs

  • Haskell
    a024916 n = sum $ map (\k -> k * div n k) [1..n]
    -- Reinhard Zumkeller, Apr 20 2015
    
  • Magma
    [(&+[DivisorSigma(1, k): k in [1..n]]): n in [1..60]]; // G. C. Greubel, Mar 15 2019
    
  • Maple
    A024916 := proc(n)
        add(numtheory[sigma](k),k=0..n) ;
    end proc: # Zerinvary Lajos, Jan 11 2009
    # second Maple program:
    a:= proc(n) option remember; `if`(n=0, 0,
          numtheory[sigma](n)+a(n-1))
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Sep 12 2019
  • Mathematica
    Table[Plus @@ Flatten[Divisors[Range[n]]], {n, 50}] (* Alonso del Arte, Mar 06 2006 *)
    Table[Sum[n - Mod[n, m], {m, n}], {n, 50}] (* Roger L. Bagula and Gary W. Adamson, Oct 06 2006 *)
    a[n_] := Sum[DivisorSigma[1, k], {k, n}]; Table[a[n], {n, 51}] (* Jean-François Alcover, Dec 16 2011 *)
    Accumulate[DivisorSigma[1,Range[60]]] (* Harvey P. Dale, Mar 13 2014 *)
  • PARI
    A024916(n)=sum(k=1,n,n\k*k) \\ M. F. Hasler, Nov 22 2007
    
  • PARI
    A024916(z) = { my(s,u,d,n,a,p); s = z*z; u = sqrtint(z); p = 2; for(d=1, u, n = z\d - z\(d+1); if(n<=1, p=d; break(), a = z%d; s -= (2*a+(n-1)*d)*n/2); ); u = z\p; for(d=2, u, s -= z%d); return(s); } \\ See the link for a nicely formatted version. - P. L. Patodia (pannalal(AT)usa.net), Jan 11 2008
    
  • PARI
    A024916(n)={my(s=0,d=1,q=n);while(dPeter Polm, Aug 18 2014
    
  • PARI
    A024916(n)={ my(s=n^2, r=sqrtint(n), nd=n, D); for(d=1, r, (1>=D=nd-nd=n\(d+1)) && (r=d-1) && break; s -= n%d*D+(D-1)*D\2*d); s - sum(d=2, n\(r+1), n%d)} \\ Slightly optimized version of Patodia's code. - M. F. Hasler, Apr 18 2015
    (C#) See Polm link.
    
  • Python
    def A024916(n): return sum(k*(n//k) for k in range(1,n+1)) # Chai Wah Wu, Dec 17 2021
    
  • Python
    from math import isqrt
    def A024916(n): return (-(s:=isqrt(n))**2*(s+1) + sum((q:=n//k)*((k<<1)+q+1) for k in range(1,s+1)))>>1 # Chai Wah Wu, Oct 21 2023
  • Sage
    [sum(sigma(k) for k in (1..n)) for n in (1..60)] # G. C. Greubel, Mar 15 2019
    

Formula

From Benoit Cloitre, Apr 28 2002: (Start)
a(n) = n^2 - A004125(n).
Asymptotically a(n) = n^2*Pi^2/12 + O(n*log(n)). (End)
G.f.: (1/(1-x))*Sum_{k>=1} x^k/(1-x^k)^2. - Benoit Cloitre, Apr 23 2003
a(n) = Sum_{m=1..n} (n - (n mod m)). - Roger L. Bagula and Gary W. Adamson, Oct 06 2006
a(n) = n^2*Pi^2/12 + O(n*log(n)^(2/3)) [Walfisz]. - Charles R Greathouse IV, Jun 19 2012
a(n) = A000217(n) + A153485(n). - Omar E. Pol, Jan 28 2014
a(n) = A000292(n) - A076664(n), n > 0. - Omar E. Pol, Feb 11 2014
a(n) = A078471(n) + A271342(n). - Omar E. Pol, Apr 08 2016
a(n) = (1/2)*(A222548(n) + A006218(n)). - Ridouane Oudra, Aug 03 2019
From Greg Dresden, Feb 23 2020: (Start)
a(n) = A092406(n) + 8, n>3.
a(n) = A160664(n) - 1, n>0. (End)
a(2*n) = A326123(n) + A326124(n). - Vaclav Kotesovec, Aug 18 2021
a(n) = Sum_{k=1..n} k * A010766(n,k). - Georg Fischer, Mar 04 2022

A222171 Decimal expansion of Pi^2/24.

Original entry on oeis.org

4, 1, 1, 2, 3, 3, 5, 1, 6, 7, 1, 2, 0, 5, 6, 6, 0, 9, 1, 1, 8, 1, 0, 3, 7, 9, 1, 6, 6, 1, 5, 0, 6, 2, 9, 7, 3, 0, 4, 7, 3, 7, 4, 7, 5, 3, 0, 1, 6, 9, 9, 6, 0, 9, 4, 3, 3, 8, 8, 9, 5, 5, 7, 3, 4, 2, 5, 0, 1, 8, 6, 7, 6, 0, 0, 8, 0, 0, 2, 1, 8, 4, 5, 8, 4, 0, 7, 2, 2, 5, 1, 5, 4, 9, 3, 9, 6, 7, 6, 3
Offset: 0

Views

Author

Jean-François Alcover, May 13 2013

Keywords

Examples

			0.411233516712056609118103791661506297304737475301699609433889557342501867600...
		

References

  • George Boros and Victor H. Moll, Irresistible integrals, Cambridge University Press, 2006, p. 242.
  • Ovidiu Furdui, Limits, Series, and Fractional Part Integrals: Problems in Mathematical Analysis, New York: Springer, 2013. See Problem 3.45, p. 158 and 199-200.

Crossrefs

Programs

  • Magma
    pi:=Pi(RealField(110)); Reverse(Intseq(Floor(10^100*(pi)^2/24))); // Vincenzo Librandi, Sep 25 2015
    
  • Mathematica
    RealDigits[Pi^2/24, 10, 100] // First
  • PARI
    Pi^2/24 \\ Michel Marcus, Dec 10 2020

Formula

Equals Integral_{x=0..Pi/2} log(sec(x))/tan(x) dx.
Equals Sum_{k >= 1} 1/(2k)^2. - Geoffrey Critzer, Nov 02 2013
Equals (1/10) * Sum_{k>=1} d(k^2)/k^2, where d(k) is the number of divisors of k (A000005). - Amiram Eldar, Jun 27 2020
Equals Sum_{n >= 0} 1/((2*n+1)*(6*n+3)). - Peter Bala, Feb 02 2022
Equals Sum_{n>=0} ((-1)^n * (Sum_{k>=n+1} (-1)^k/k)^2) (Furdui, 2013). - Amiram Eldar, Mar 26 2022
Equals Sum_{n>=1} A369180(n)/n^2. - Friedjof Tellkamp, Jan 23 2025

Extensions

Leading 0 term removed (to make offset correct) by Rick L. Shepherd, Jan 01 2014

A066967 Total sum of odd parts in all partitions of n.

Original entry on oeis.org

1, 2, 7, 10, 23, 36, 65, 94, 160, 230, 356, 502, 743, 1030, 1480, 2006, 2797, 3760, 5120, 6780, 9092, 11902, 15701, 20350, 26508, 34036, 43860, 55822, 71215, 89988, 113792, 142724, 179137, 223230, 278183, 344602, 426687, 525616, 647085, 792950
Offset: 1

Views

Author

Vladeta Jovovic, Jan 26 2002

Keywords

Comments

Partial sums of A206435. - Omar E. Pol, Mar 17 2012
From Omar E. Pol, Apr 01 2023: (Start)
Convolution of A000041 and A000593.
Convolution of A002865 and A078471.
a(n) is also the sum of all odd divisors of all positive integers in a sequence with n blocks where the m-th block consists of A000041(n-m) copies of m, with 1 <= m <= n. The mentioned odd divisors are also all odd parts of all partitions of n. (End)

Examples

			a(4) = 10 because in the partitions of 4, namely [4],[3,1],[2,2],[2,1,1],[1,1,1,1], the total sum of the odd parts is (3+1)+(1+1)+(1+1+1+1) = 10.
		

Crossrefs

Programs

  • Maple
    g:=sum((2*i-1)*x^(2*i-1)/(1-x^(2*i-1)),i=1..50)/product(1-x^j,j=1..50): gser:=series(g,x=0,50): seq(coeff(gser,x^n),n=1..47);
    # Emeric Deutsch, Feb 19 2006
    b:= proc(n, i) option remember; local f, g;
          if n=0 or i=1 then [1, n]
        else f:= b(n, i-1); g:= `if`(i>n, [0, 0], b(n-i, i));
             [f[1]+g[1], f[2]+g[2]+ (i mod 2)*g[1]*i]
          fi
        end:
    a:= n-> b(n, n)[2]:
    seq (a(n), n=1..50);
    # Alois P. Heinz, Mar 22 2012
  • Mathematica
    max = 50; g = Sum[(2*i-1)*x^(2*i-1)/(1-x^(2*i-1)), {i, 1, max}]/Product[1-x^j, {j, 1, max}]; gser = Series[g, {x, 0, max}]; a[n_] := SeriesCoefficient[gser, {x, 0, n}]; Table[a[n], {n, 1, max-1}] (* Jean-François Alcover, Jan 24 2014, after Emeric Deutsch *)
    Map[Total[Select[Flatten[IntegerPartitions[#]], OddQ]] &, Range[30]] (* Peter J. C. Moses, Mar 14 2014 *)

Formula

a(n) = Sum_{k=1..n} b(k)*numbpart(n-k), where b(k)=A000593(k)=sum of odd divisors of k.
a(n) = sum(k*A113685(n,k), k=0..n). - Emeric Deutsch, Feb 19 2006
G.f.: sum((2i-1)x^(2i-1)/(1-x^(2i-1)), i=1..infinity)/product(1-x^j, j=1..infinity). - Emeric Deutsch, Feb 19 2006
a(n) = A066186(n) - A066966(n). - Omar E. Pol, Mar 10 2012
a(n) ~ exp(Pi*sqrt(2*n/3)) / (8*sqrt(3)). - Vaclav Kotesovec, May 29 2018

Extensions

More terms from Naohiro Nomoto and Sascha Kurz, Feb 07 2002

A067435 a(n) is the sum of all the remainders when n-th odd number is divided by odd numbers < 2n-1.

Original entry on oeis.org

0, 0, 2, 3, 6, 9, 16, 13, 27, 31, 34, 43, 57, 56, 75, 80, 96, 99, 121, 122, 155, 164, 163, 184, 220, 218, 255, 252, 277, 304, 339, 328, 372, 389, 412, 433, 491, 478, 515, 536, 570, 609, 638, 647, 722, 713, 746, 767, 858, 842, 910, 939, 942, 993, 1060, 1057
Offset: 1

Views

Author

Amarnath Murthy, Jan 29 2002

Keywords

Examples

			a(7) = 16 = 1 +3 +6 +4 +2 = 13 % 3 + 13 % 5 + 13 % 7 + 13 % 9 + 13 % 11.
		

Crossrefs

Programs

  • Maple
    L:= [seq(4*n-3 - numtheory:-sigma(2*n-1)-numtheory:-sigma((n-1)/2^padic:-ordp(n-1,2)), n=1..100)]:
    ListTools:-PartialSums(L); # Robert Israel, Jan 16 2019
  • Python
    from math import isqrt
    def A327329(n): return -(s:=isqrt(n))**2*(s+1)+sum((q:=n//k)*((k<<1)+q+1) for k in range(1,s+1))
    def A067435(n): return n*((n<<1)-1)-(A327329(n<<1)>>1)-A327329(n>>1)+3*(A327329(n)>>1)+A327329(n-1>>1)-(A327329(n-1)>>1) # Chai Wah Wu, Nov 01 2023

Formula

a(n) = a(n-1) + 4*n-3 - A000203(2*n-1) - A000593(n-1). - Robert Israel, Jan 16 2019
a(n) = n*(2*n-1) - A326123(n) - A078471(n-1) = n*(2*n-1) - A024916(2*n) - 2*A024916(floor(n/2)) + 3*A024916(n) + 2*A024916(floor((n-1)/2)) - A024916(n-1). - Chai Wah Wu, Nov 01 2023

Extensions

Corrected and extended by several contributors.

A271342 Sum of all even divisors of all positive integers <= n.

Original entry on oeis.org

0, 2, 2, 8, 8, 16, 16, 30, 30, 42, 42, 66, 66, 82, 82, 112, 112, 138, 138, 174, 174, 198, 198, 254, 254, 282, 282, 330, 330, 378, 378, 440, 440, 476, 476, 554, 554, 594, 594, 678, 678, 742, 742, 814, 814, 862, 862, 982, 982, 1044, 1044, 1128, 1128, 1208, 1208, 1320, 1320, 1380, 1380, 1524, 1524, 1588, 1588, 1714, 1714
Offset: 1

Views

Author

Omar E. Pol, Apr 08 2016

Keywords

Comments

a(n) is also the sum of all even divisors of all even positive integers <= n.
a(n) is also the total number of parts in all partitions of all positive integers <= n into an even number of equal parts. - Omar E. Pol, Jun 04 2017
The bisection of this sequence equals twice A024916 (see formulas). - Michel Marcus, Dec 14 2017

Examples

			For n = 6 the divisors of all positive integers <= 6 are [1], [1, 2], [1, 3], [1, 2, 4], [1, 5], [1, 2, 3, 6] and the even divisors of all positive integers <= 6 are [2], [2, 4], [2, 6], so a(6) = 2 + 2 + 4 + 2 + 6 = 16. On the other hand the sum of all the divisors of all positive integers <= 6/2 are [1] + [1 + 2] + [1 + 3] = A024916(3) = 8, so a(6) = 2*8 = 16.
For n = 10, (floor(10/2) = 5) numbers have divisor 2, (floor(10/4) = 2) numbers have divisor 4, ..., (floor(10/10) = 1) numbers have divisor 10. Therefore, a(10) = 5 * 2 + 2 * 4 + 1 * 6 + 1 * 8 + 1 * 10 = 42. - _David A. Corneth_, Jun 06 2017
		

Crossrefs

Programs

  • Mathematica
    Accumulate@ Array[DivisorSum[#, # &, EvenQ] &, 65] (* Michael De Vlieger, Jun 06 2017 *)
  • PARI
    a(n) = sum(k=1, n, sumdiv(k, d, (1-d%2)*d)); \\ Michel Marcus, Jun 05 2017
    
  • PARI
    a(n) = 2 * sum(k=1, n\2, k*(n\(k<<1))) \\ David A. Corneth, Jun 06 2017
    
  • Python
    def A271342(n): return sum(k*((n>>1)//k) for k in range(1, (n>>1)+1))<<1 # Chai Wah Wu, Apr 26 2023
    
  • Python
    from math import isqrt
    def A271342(n): return -(s:=isqrt(m:=n>>1))**2*(s+1) + sum((q:=m//k)*((k<<1)+q+1) for k in range(1,s+1)) # Chai Wah Wu, Oct 21 2023

Formula

a(1) = 0.
a(n) = 2*A024916((n-1)/2), if n is odd and n > 1.
a(n) = 2*A024916(n/2), if n is even.
a(n) = A024916(n) - A078471(n).
For n > 1, a(2*n + 1) = a(2*n). - David A. Corneth, Jun 06 2017
a(n) = c * n^2 + O(n*log(n)), where c = Pi^2/24 = 0.411233... (A222171). - Amiram Eldar, Nov 27 2023

A366395 a(n) = Sum_{k=1..n} (-1)^(k-1) * binomial(floor(n/k)+2,3).

Original entry on oeis.org

1, 3, 10, 16, 32, 49, 78, 100, 152, 194, 261, 318, 410, 489, 631, 717, 871, 1014, 1205, 1351, 1617, 1806, 2083, 2300, 2641, 2903, 3333, 3612, 4048, 4450, 4947, 5289, 5923, 6367, 7041, 7548, 8252, 8805, 9683, 10245, 11107, 11873, 12820, 13497, 14719, 15526, 16655
Offset: 1

Views

Author

Seiichi Manyama, Oct 24 2023

Keywords

Crossrefs

Partial sums of A365007.
Cf. A364970.

Programs

  • Mathematica
    Array[Sum[(-1)^(k - 1)*Binomial[Floor[#/k] + 2, 3], {k, #}] &, 56] (* Michael De Vlieger, Oct 25 2023 *)
  • PARI
    a(n) = sum(k=1, n, (-1)^(k-1)*binomial(n\k+2, 3));

Formula

a(n) = Sum_{k=1..n} binomial(k+1,2) * (floor(n/k) mod 2).
G.f.: -1/(1-x) * Sum_{k>=1} (-x)^k/(1-x^k)^3 = 1/(1-x) * Sum_{k>=1} binomial(k+1,2) * x^k/(1+x^k).

A366659 a(n) = Sum_{k=1..n} (-1)^(k-1) * binomial(floor(n/k)+3,4).

Original entry on oeis.org

1, 4, 15, 30, 66, 115, 200, 295, 471, 659, 946, 1259, 1715, 2194, 2920, 3591, 4561, 5585, 6916, 8216, 10082, 11823, 14124, 16389, 19350, 22174, 26004, 29435, 33931, 38445, 43902, 48925, 55767, 61941, 69831, 77275, 86415, 94968, 106094, 115874, 128216, 140214, 154405
Offset: 1

Views

Author

Seiichi Manyama, Oct 24 2023

Keywords

Crossrefs

Partial sums of A366813.

Programs

  • Mathematica
    Array[Sum[(-1)^(k - 1)*Binomial[Floor[#/k] + 3, 4], {k, #}] &, 56] (* Michael De Vlieger, Oct 25 2023 *)
  • PARI
    a(n) = sum(k=1, n, (-1)^(k-1)*binomial(n\k+3, 4));

Formula

a(n) = Sum_{k=1..n} binomial(k+2,3) * (floor(n/k) mod 2).
G.f.: -1/(1-x) * Sum_{k>=1} (-x)^k/(1-x^k)^4 = 1/(1-x) * Sum_{k>=1} binomial(k+2,3) * x^k/(1+x^k).

A078473 Expansion of zeta function of icosian ring.

Original entry on oeis.org

1, 0, 0, 5, 6, 0, 0, 0, 10, 0, 24, 0, 0, 0, 0, 21, 0, 0, 40, 30, 0, 0, 0, 0, 31, 0, 0, 0, 60, 0, 64, 0, 0, 0, 0, 50, 0, 0, 0, 0, 84, 0, 0, 120, 60, 0, 0, 0, 50, 0, 0, 0, 0, 0, 144, 0, 0, 0, 120, 0, 124, 0, 0, 85, 0, 0, 0, 0, 0, 0, 144, 0, 0, 0, 0, 200, 0, 0, 160, 126, 91, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Benoit Cloitre, Dec 31 2002

Keywords

Comments

Let zetaI(s) be the zeta function of icosian ring: zetaI(s) = zetaQ(tau)(2s)*zetaQ(tau)(2s-1) where zetaQ(tau)(s) is defined in A035187. Then zetaI(s) = Sum_{n>=1} a(n)/n^(2s).

Crossrefs

Cf. A035187, A035282 (nonzero terms of the sequence), A031363 (n for which a(n) is not zero), A078471.

Programs

  • Mathematica
    f[p_, e_] := Which[p == 5, (5^(e + 1) - 1)/4, (m = Mod[p, 5]) == 2 || m == 3, If[EvenQ[e], (p^(e + 2) - 1)/(p^2 - 1), 0], m == 1 || m == 4, Sum[(k + 1)*(e - k + 1)*p^k, {k, 0, e}]]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, May 13 2022 *)
  • PARI
    {a(n)=local(A); if(n<1, 0, A=direuler(p=2,n,1/(1-X)/(1-kronecker(5,p)*X)); sumdiv(n,d,A[d]*d*A[n/d]))} /* Michael Somos, Jun 06 2005 */
    
  • PARI
    pf(p, r) = {if (p==5, (5^(r+1) -1)/4, if (((p % 5) == 2) || ((p % 5) == 3), if (!(r % 2), (p^(r+2) - 1)/(p^2-1), 0), if (((p % 5) == 1) || ((p % 5) == 4), sum(k=0, r, (k+1)*(r-k+1)*p^k))););}
    a(n) = {my(f = factor(n)); prod(i=1, #f~, pf(f[i, 1], f[i, 2]));} \\ Michel Marcus, Mar 03 2014

Formula

Multiplicative with a(p^e) = (5^(e + 1) - 1)/4 if p = 5, (p^(e + 2) - 1)/(p^2 - 1) or 0 if p == 2 or 3 (mod 5) and e is even or odd, respectively, and Sum_{k=0..e} (k + 1)*(e - k + 1)*p^k if p == 1 or 4 (mod 5). - Amiram Eldar, May 13 2022

A344720 a(n) = Sum_{k=1..n} (-1)^(k+1) * floor(n/k)^2.

Original entry on oeis.org

1, 3, 9, 12, 22, 30, 44, 48, 71, 83, 105, 115, 141, 157, 201, 206, 240, 266, 304, 318, 378, 402, 448, 460, 519, 547, 623, 641, 699, 747, 809, 815, 907, 943, 1035, 1064, 1138, 1178, 1286, 1302, 1384, 1448, 1534, 1560, 1710, 1758, 1852, 1866, 1977, 2039, 2179, 2209, 2315, 2395, 2535
Offset: 1

Views

Author

Seiichi Manyama, May 27 2021

Keywords

Crossrefs

Column k=2 of A344726.

Programs

  • Mathematica
    a[n_] := Sum[(-1)^(k + 1) * Quotient[n, k]^2, {k, 1, n}]; Array[a, 50] (* Amiram Eldar, May 27 2021 *)
    Accumulate[Table[-2*DivisorSigma[0, 2*n] + 3*DivisorSigma[0, n] + 2*DivisorSigma[1, 2*n] - 4*DivisorSigma[1, n], {n, 1, 50}]] (* Vaclav Kotesovec, May 28 2021 *)
  • PARI
    a(n) = sum(k=1, n, (-1)^(k+1)*(n\k)^2);
    
  • PARI
    a(n) = sum(k=1, n, sumdiv(k, d, (-1)^(k/d+1)*(2*d-1)));
    
  • PARI
    my(N=66, x='x+O('x^N)); Vec(sum(k=1, N, (2*k-1)*x^k/(1+x^k))/(1-x))

Formula

a(n) = Sum_{k=1,..n} Sum_{d|k} (-1)^(k/d + 1) * (2*d - 1).
G.f.: (1/(1 - x)) * Sum_{k>=1} (2*k - 1) * x^k/(1 + x^k).
a(n) ~ Pi^2 * n^2 / 12. - Vaclav Kotesovec, May 28 2021
Showing 1-10 of 16 results. Next