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.

A322143 Square array A(n,k), n >= 1, k >= 0, read by antidiagonals: A(n,k) = Sum_{d|n, d==1 (mod 4)} d^k - Sum_{d|n, d==3 (mod 4)} d^k.

Original entry on oeis.org

1, 1, 1, 1, 1, 0, 1, 1, -2, 1, 1, 1, -8, 1, 2, 1, 1, -26, 1, 6, 0, 1, 1, -80, 1, 26, -2, 0, 1, 1, -242, 1, 126, -8, -6, 1, 1, 1, -728, 1, 626, -26, -48, 1, 1, 1, 1, -2186, 1, 3126, -80, -342, 1, 7, 2, 1, 1, -6560, 1, 15626, -242, -2400, 1, 73, 6, 0, 1, 1, -19682, 1, 78126, -728, -16806, 1, 703, 26, -10, 0
Offset: 1

Views

Author

Ilya Gutkovskiy, Nov 28 2018

Keywords

Examples

			Square array begins:
  1,  1,   1,    1,    1,     1,  ...
  1,  1,   1,    1,    1,     1,  ...
  0, -2,  -8,  -26,  -80,  -242,  ...
  1,  1,   1,    1,    1,     1,  ...
  2,  6,  26,  126,  626,  3126,  ...
  0, -2,  -8,  -26,  -80,  -242,  ...
		

Crossrefs

Programs

  • Mathematica
    Table[Function[k, SeriesCoefficient[Sum[(-1)^(j - 1) (2 j - 1)^k x^(2 j - 1)/(1 - x^(2 j - 1)), {j, 1, n}], {x, 0, n}]][i - n], {i, 0, 12}, {n, 1, i}] // Flatten

Formula

G.f. of column k: Sum_{j>=1} (-1)^(j-1)*(2*j - 1)^k*x^(2*j-1)/(1 - x^(2*j-1)).

A050459 a(n) = Sum_{d|n, d==1 mod 4} d^3 - Sum_{d|n, d==3 mod 4} d^3.

Original entry on oeis.org

1, 1, -26, 1, 126, -26, -342, 1, 703, 126, -1330, -26, 2198, -342, -3276, 1, 4914, 703, -6858, 126, 8892, -1330, -12166, -26, 15751, 2198, -18980, -342, 24390, -3276, -29790, 1, 34580, 4914, -43092, 703, 50654, -6858, -57148, 126, 68922, 8892, -79506, -1330
Offset: 1

Views

Author

N. J. A. Sloane, Dec 23 1999

Keywords

Comments

Multiplicative because it is the Inverse Möbius transform of [1 0 -3^3 0 5^3 0 -7^3 ...], which is multiplicative. - Christian G. Bower, May 18 2005

Crossrefs

Column k=3 of A322143.

Programs

  • Maple
    A050459 := proc(n) local a; a := 0 ; for d in numtheory[divisors](n) do if d mod 4 = 1 then a := a+d^3 ; elif d mod 4 = 3 then a := a-d^3 ; end if; end do;  a ; end proc:
    seq(A050459(n),n=1..100) ; # R. J. Mathar, Jan 07 2011
  • Mathematica
    s[n_, r_] := DivisorSum[n, #^3 &, Mod[#, 4]==r &]; a[n_] := s[n, 1] - s[n, 3]; Array[a, 30] (* Amiram Eldar, Dec 06 2018 *)
    f[p_, e_] := If[Mod[p, 4] == 1, ((p^3)^(e+1)-1)/(p^3-1), ((-p^3)^(e+1)-1)/(-p^3-1)]; f[2, e_] := 1; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 60] (* Amiram Eldar, Sep 27 2023 *)

Formula

a(n) = A050451(n) - A050454(n).
G.f.: Sum_{k>=1} (-1)^(k-1)*(2*k - 1)^3*x^(2*k-1)/(1 - x^(2*k-1)). - Ilya Gutkovskiy, Dec 22 2018
Multiplicative with a(2^e) = 1, and for an odd prime p, ((p^3)^(e+1)-1)/(p^3-1) if p == 1 (mod 4) and ((-p^3)^(e+1)-1)/(-p^3-1) if p == 3 (mod 4). - Amiram Eldar, Sep 27 2023
a(n) = Sum_{d|n} d^3*sin(d*Pi/2). - Ridouane Oudra, Jun 02 2024

A309124 a(n) = n - 3 * floor(n/3) + 5 * floor(n/5) - 7 * floor(n/7) + ...

Original entry on oeis.org

1, 2, 0, 1, 7, 5, -1, 0, 7, 13, 3, 1, 15, 9, -3, -2, 16, 23, 5, 11, 23, 13, -9, -11, 20, 34, 14, 8, 38, 26, -4, -3, 17, 35, -1, 6, 44, 26, -2, 4, 46, 58, 16, 6, 48, 26, -20, -22, 21, 52, 16, 30, 84, 64, 4, -2, 34, 64, 6, -6, 56, 26, -16, -15, 69, 89, 23, 41, 85, 49, -21, -14, 60, 98, 36
Offset: 1

Views

Author

Ilya Gutkovskiy, Jul 13 2019

Keywords

Comments

Partial sums of A050457.

Crossrefs

Programs

  • Maple
    f:= proc(n) local r,d;
      r:= n/2^padic:-ordp(n,2);
      add((-1)^((d-1)/2)*d, d = numtheory:-divisors(r))
    end proc:
    ListTools:-PartialSums(map(f,[$1..100])); # Robert Israel, Oct 28 2020
  • Mathematica
    Table[Sum[(-1)^(k + 1) (2 k - 1) Floor[n/(2 k - 1)], {k, 1, n}], {n, 1, 75}]
    nmax = 75; CoefficientList[Series[1/(1 - x) Sum[(-1)^(k + 1) (2 k - 1) x^(2 k - 1)/(1 - x^(2 k - 1)), {k, 1, nmax}], {x, 0, nmax}], x] // Rest

Formula

G.f.: (1/(1 - x)) * Sum_{k>=1} (-1)^(k+1) * (2*k - 1) * x^(2*k-1)/(1 - x^(2*k-1)).

A326503 Expansion of Sum_{k>=1} x^k * (1 - x^(2*k)) / (1 + x^k + x^(2*k))^2.

Original entry on oeis.org

1, -1, 1, 3, -4, -1, 8, -5, 1, 4, -10, 3, 14, -8, -4, 11, -16, -1, 20, -12, 8, 10, -22, -5, 21, -14, 1, 24, -28, 4, 32, -21, -10, 16, -32, 3, 38, -20, 14, 20, -40, -8, 44, -30, -4, 22, -46, 11, 57, -21, -16, 42, -52, -1, 40, -40, 20, 28, -58, -12, 62, -32, 8, 43, -56, 10
Offset: 1

Views

Author

Ilya Gutkovskiy, Sep 12 2019

Keywords

Crossrefs

Cf. A002129, A050457, A078181, A078182, A078708, A162397 (Moebius transform), A326401.

Programs

  • Mathematica
    nmax = 66; CoefficientList[Series[Sum[x^k (1 - x^(2 k))/(1 + x^k + x^(2 k))^2, {k, 1, nmax}], {x, 0, nmax}], x] // Rest
    Table[DivisorSum[n, # &, MemberQ[{1}, Mod[#, 3]] &] - DivisorSum[n, # &, MemberQ[{2}, Mod[#, 3]] &], {n, 1, 66}]
    f[p_, e_] := If[Mod[p, 3] == 1, (p^(e + 1) - 1)/(p - 1), ((-p)^(e + 1) - 1)/(-p - 1)]; f[3, e_] := 1; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Nov 28 2023 *)
  • PARI
    a(n)={sumdiv(n, d, d*((d+1)%3-1))} \\ Andrew Howroyd, Sep 12 2019

Formula

a(n) = Sum_{d|n, d==1 (mod 3)} d - Sum_{d|n, d==2 (mod 3)} d.
a(n) = A078181(n) - A078182(n).
Multiplicative with a(3^e) = 1, a(p^e) = (p^(e+1)-1)/(p-1) if p == 1 (mod 3) and a(p^e) = ((-p)^(e+1)-1)/(-p-1) if p == 2 (mod 3). - Amiram Eldar, Nov 28 2023
Showing 1-4 of 4 results.