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

A318734 a(n) = Sum_{k=1..n} (-1)^(k + 1) * d(2*k - 1), where d(k) is the number of divisors of k (A000005).

Original entry on oeis.org

1, -1, 1, -1, 2, 0, 2, -2, 0, -2, 2, 0, 3, -1, 1, -1, 3, -1, 1, -3, -1, -3, 3, 1, 4, 0, 2, -2, 2, 0, 2, -4, 0, -2, 2, 0, 2, -4, 0, -2, 3, 1, 5, 1, 3, -1, 3, -1, 1, -5, -3, -5, 3, 1, 3, -1, 1, -3, 3, -1, 2, -2, 2, 0, 4, 2, 6, -2, 0, -2, 2, -2
Offset: 1

Views

Author

Hugo Pfoertner, Sep 05 2018

Keywords

Crossrefs

Records and their positions: A318735, A318736, A318737, A318738.

Programs

  • Mathematica
    a[n_] := Sum[(-1)^(k + 1) DivisorSigma[0, 2 k - 1], {k, 1, n}];
    Array[a, 100] (* Jean-François Alcover, Sep 17 2018 *)
  • PARI
    s=0;j=-1;forstep(k=1,141,2,j=-j;s=s+j*numdiv(k);print1(s,", "))
    
  • PARI
    a(n) = sum(k=1, n, (-1)^(k+1)*numdiv(2*k-1)); \\ Michel Marcus, Sep 08 2018

A318735 Positive records in A318734.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 15, 16, 17, 21, 23, 25, 30, 31, 32, 34, 39, 45, 47, 48, 51, 52, 56, 60, 62, 71, 76, 78, 83, 84, 88, 91, 103, 108, 119, 127, 129, 132, 142, 143, 151, 166, 168, 171, 178, 181, 183, 189, 197, 215, 237, 241, 244, 266, 270, 274
Offset: 1

Views

Author

Hugo Pfoertner, Sep 05 2018

Keywords

Crossrefs

Programs

  • PARI
    s=0;smax=0;j=-1;forstep(k=1,20000000,2,j=-j;s=s+j*numdiv(k);if(s>smax,smax=s;print1(s,", ")))

A318737 Numbers n=2*k-1 where Sum_{j=1..k} (-1)^(j+1) * d(2*j-1) achieves a new record, with d(n) = number of divisors of n (A000005).

Original entry on oeis.org

1, 9, 25, 49, 85, 133, 169, 225, 445, 845, 973, 1125, 2205, 2209, 2469, 2829, 7929, 9429, 9945, 23569, 24073, 24645, 26145, 40425, 68153, 71289, 72413, 89517, 112233, 112245, 128973, 162405, 162409, 162429, 297073, 477489, 477493, 502713, 561253
Offset: 1

Views

Author

Hugo Pfoertner, Sep 05 2018

Keywords

Examples

			a(2) = 9, because s = d(1)-d(3)+d(5)-d(7)+d(9) = 1-2+2-2+3 = 2 exceeds d(1)=1, d(1)-d(3)=-1, d(1)-d(3)+d(5)=1, d(1)-d(3)+d(5)-d(7)=-1.
		

Crossrefs

Programs

  • PARI
    s=0;smax=0;j=-1;forstep(k=1,600000,2,j=-j;s=s+j*numdiv(k);if(s>smax,smax=s;print1(k,", ")))

A318738 Numbers n=2*k-1 where Sum_{j=1..k} (-1)^(j+1) * d(2*j-1) achieves a new negative record, with d(n) = number of divisors of n (A000005).

Original entry on oeis.org

3, 15, 39, 63, 99, 259, 319, 403, 675, 679, 943, 1615, 1779, 2919, 4899, 5775, 7399, 7407, 13475, 13479, 25635, 29835, 29839, 44955, 78463, 78475, 108927, 108931, 126819, 136959, 136975, 136983, 244875, 244879, 256355, 276675, 276687, 457275, 530139
Offset: 1

Views

Author

Hugo Pfoertner, Sep 08 2018

Keywords

Examples

			a(1) = 3, because s = d(1)-d(3) = 1-2 = -1 is the first negative record.
a(2) = 15, because s = d(1)-d(3)+d(5)-d(7)+d(9)-d(11)+d(13)-d(15) =
1-2+2-2+3-2+2-4 = -2 is the first sum less than -1.
		

Crossrefs

Programs

  • PARI
    s=0;j=-1;smin=0;forstep(k=1,600000,2,j=-j;s=s+j*numdiv(k);if(s
    				
Showing 1-4 of 4 results.