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-3 of 3 results.

A215947 Difference between the sum of the even divisors and the sum of the odd divisors of 2n.

Original entry on oeis.org

1, 5, 4, 13, 6, 20, 8, 29, 13, 30, 12, 52, 14, 40, 24, 61, 18, 65, 20, 78, 32, 60, 24, 116, 31, 70, 40, 104, 30, 120, 32, 125, 48, 90, 48, 169, 38, 100, 56, 174, 42, 160, 44, 156, 78, 120, 48, 244, 57, 155, 72, 182, 54, 200, 72, 232, 80, 150, 60, 312, 62, 160
Offset: 1

Views

Author

Michel Lagneau, Aug 28 2012

Keywords

Comments

Multiplicative because a(n) = -A002129(2*n), A002129 is multiplicative and a(1) = -A002129(2) = 1. - Andrew Howroyd, Jul 31 2018

Examples

			a(6) = 20 because the divisors of 2*6 = 12 are {1, 2, 3, 4, 6, 12} and (12 + 6 + 4 +2) - (3 + 1) = 20.
		

Crossrefs

Cf. A000593, A002129, A022998 (Moebius transform), A074400, A195382, A195690.

Programs

  • Maple
    with(numtheory):for n from 1 to 100 do:x:=divisors(2*n):n1:=nops(x):s0:=0:s1:=0:for m from 1 to n1 do: if irem(x[m],2)=0 then s0:=s0+x[m]:else s1:=s1+x[m]:fi:od:if s0>s1  then printf(`%d, `,s0-s1):else fi:od:
  • Mathematica
    a[n_] := DivisorSum[2n, (1 - 2 Mod[#, 2]) #&];
    Array[a, 62] (* Jean-François Alcover, Sep 13 2018 *)
    edod[n_]:=Module[{d=Divisors[2n]},Total[Select[d,EvenQ]]-Total[ Select[ d,OddQ]]]; Array[edod,70] (* Harvey P. Dale, Jul 30 2021 *)
  • PARI
    a(n) = 4*sigma(n) - sigma(2*n); \\ Andrew Howroyd, Jul 28 2018

Formula

From Andrew Howroyd, Jul 28 2018: (Start)
a(n) = 4*sigma(n) - sigma(2*n).
a(n) = -A002129(2*n). (End)
G.f.: Sum_{k>=1} x^k*(1 + 4*x^k + x^(2*k))/(1 - x^(2*k))^2. - Ilya Gutkovskiy, Sep 14 2019
a(p) = p + 1 for p prime >= 3. - Bernard Schott, Sep 14 2019
a(n) = A239050(n) - A062731(n) - Omar E. Pol, Mar 06 2021 (after Andrew Howroyd)
From Amiram Eldar, Nov 18 2022: (Start)
Multiplicative with a(2^e) = 2^(e+2) - 3, and a(p^e) = sigma(p^e) = (p^(e+1) - 1)/(p-1) for p > 2.
Sum_{k=1..n} a(k) ~ c * n^2, where c = Pi^2/8 = 1.2337005... (A111003). (End)
Dirichlet g.f.: zeta(s)*zeta(s-1)*(1+2^(1-s)). - Amiram Eldar, Jan 05 2023
From Peter Bala, Sep 25 2023: (Start)
a(2*n) = sigma(2*n) + 2*sigma(n); a(2*n+1) = sigma(2*n+1) = A008438(n)
G.f.: A(q) = Sum_{n >= 1} n*q^n*(1 + 3*q^n)/(1 - q^(2*n)).
Logarithmic g.f.: Sum_{n >= 1} a(n)*q^n/n = Sum_{n >= 1} log(1/(1 - q^n)) + Sum_{n >= 1} log(1/(1 - q^(2*n))) = log (G(q)), where G(q) is the g.f. of A002513. (End)

A193070 Odd numbers N for which sigma(N^2) is prime.

Original entry on oeis.org

3, 5, 17, 27, 41, 49, 59, 71, 89, 101, 125, 131, 167, 169, 173, 289, 293, 383, 529, 677, 701, 729, 743, 761, 773, 827, 839, 841, 857, 911, 1091, 1097, 1163, 1181, 1193, 1217, 1373, 1427, 1487, 1559, 1583, 1709, 1811, 1847, 1849, 1931, 1973, 2129, 2197, 2273, 2309
Offset: 1

Views

Author

M. F. Hasler, Jul 15 2011

Keywords

Comments

The function sigma(n) (=A000203(n)) takes odd values when n is a square or twice a square. Thus, odd numbers n for which sigma(n) is prime (i.e. which are in A023194) must be odd squares. This sequence consists exactly of the square roots of these terms.

Crossrefs

Programs

  • Mathematica
    Select[Range[1,2401,2],PrimeQ[DivisorSigma[1,#^2]]&] (* Harvey P. Dale, Mar 07 2015 *)
  • PARI
    forstep(N=1, 1e7, 2, isprime(sigma(N^2)) && print1(N", "))

Formula

a(n) = A278911(n)^(1/2). - Robert Israel, Jan 22 2019

A195690 Numbers such that the difference between the sum of the even divisors and the sum of the odd divisors is a perfect square.

Original entry on oeis.org

2, 6, 72, 76, 162, 228, 230, 238, 316, 434, 530, 580, 686, 690, 714, 716, 756, 770, 948, 994, 1034, 1054, 1216, 1302, 1358, 1490, 1590, 1740, 1778, 1836, 1870, 1996, 2058, 2148, 2310, 2354, 2414, 2438, 2492, 2596, 2668, 2786, 2876, 2930, 2982, 3002, 3102
Offset: 1

Views

Author

Michel Lagneau, Sep 22 2011

Keywords

Comments

Numbers k such that A002129(k) is a square.

Examples

			The divisors of 76 are  {  1, 2, 4, 19, 38, 76}, and  (2 + 4 + 38 + 76 ) - (1 + 19 ) = 10^2. Hence 76 is in the sequence.
		

Crossrefs

Programs

  • Maple
    with(numtheory):for n from 2 by 2 to 200 do:x:=divisors(n):n1:=nops(x):s1:=0:s2:=0:for m from 1 to n1 do:if irem(x[m],2)=1 then s1:=s1+x[m]:else s2:=s2+x[m]:fi:od: z:=sqrt(s2-s1):if z=floor(z) then printf(`%d, `,n): else fi:od:
  • Mathematica
    f[p_, e_] := If[p == 2, 3 - 2^(e + 1) , (p^(e + 1) - 1)/(p - 1)]; aQ[n_] := IntegerQ[Sqrt[-Times @@ (f @@@ FactorInteger[n])]]; Select[Range[2, 3200], aQ] (* Amiram Eldar, Jul 20 2019 *)
Showing 1-3 of 3 results.