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.

A050449 a(n) = Sum_{d|n, d == 1 (mod 4)} d.

Original entry on oeis.org

1, 1, 1, 1, 6, 1, 1, 1, 10, 6, 1, 1, 14, 1, 6, 1, 18, 10, 1, 6, 22, 1, 1, 1, 31, 14, 10, 1, 30, 6, 1, 1, 34, 18, 6, 10, 38, 1, 14, 6, 42, 22, 1, 1, 60, 1, 1, 1, 50, 31, 18, 14, 54, 10, 6, 1, 58, 30, 1, 6, 62, 1, 31, 1, 84, 34, 1, 18, 70, 6, 1, 10, 74, 38, 31, 1
Offset: 1

Views

Author

N. J. A. Sloane, Dec 23 1999

Keywords

Comments

Not multiplicative: a(3)*a(7) != a(21), for example. - R. J. Mathar, Dec 20 2011

Crossrefs

Cf. Sum_{d|n, d==1 (mod k)} d: A000593 (k=2), A078181 (k=3), this sequence (k=4), A284097 (k=5), A284098 (k=6), A284099 (k=7), A284100 (k=8).

Programs

  • Maple
    A050449 := proc(n)
            a := 0 ;
            for d in numtheory[divisors](n) do
                    if d mod 4 = 1 then
                            a := a+d ;
                    end if;
            end do:
            a;
    end proc:
    seq(A050449(n),n=1..40) ; # R. J. Mathar, Dec 20 2011
  • Mathematica
    a[n_] := DivisorSum[n, Boole[Mod[#, 4] == 1]*#&]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Jan 30 2018 *)
  • PARI
    a(n) = sumdiv(n, d, d*((d % 4) == 1)); \\ Michel Marcus, Jan 30 2018

Formula

G.f.: Sum_{n>=0} (4*n+1)*x^(4*n+1)/(1-x^(4*n+1)). - Vladeta Jovovic, Nov 14 2002
a(n) = A000593(n) - A050452(n). - Reinhard Zumkeller, Apr 18 2006
G.f.: Sum_{n >= 1} x^n*(1 + 3*x^(4*n))/(1 - x^(4*n))^2. - Peter Bala, Dec 19 2021
Sum_{k=1..n} a(k) = c * n^2 + O(n*log(n)), where c = Pi^2/48 = 0.205616... (A245058). - Amiram Eldar, Nov 26 2023

Extensions

More terms from Vladeta Jovovic, Nov 14 2002
More terms from Reinhard Zumkeller, Apr 18 2006