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.

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

Original entry on oeis.org

1, 3, 0, 8, 3, -3, -10, 22, 22, 12, 1, -23, -36, -50, -35, 93, 76, 76, 57, 17, 38, 16, -7, -103, -103, -129, -129, -185, -214, -184, -215, 297, 330, 296, 331, 331, 294, 256, 295, 135, 94, 136, 93, 5, 5, -41, -88, -472, -472, -472, -421, -525, -578, -578, -523, -747, -690, -748
Offset: 1

Views

Author

Seiichi Manyama, Apr 02 2023

Keywords

Crossrefs

Partial sums of A332793.
Cf. A068340.

Programs

  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A361982(n):
        if n <= 1:
            return 1
        c, j = 1, 2
        k1 = n//j
        while k1 > 1:
            j2 = n//k1 + 1
            c += (((j2<<1)-1 if j2&1 else -(j2<<1)+1)+(-(j<<1)+1 if j&1 else (j<<1)-1)>>2)*A361982(k1)
            j, k1 = j2, n//j2
        return c+((-(n<<1)-1 if n&1 else (n<<1)+1)+(-(j<<1)+1 if j&1 else (j<<1)-1)>>2) # Chai Wah Wu, Apr 02 2023

Formula

Sum_{k=1..n} (-1)^k * k * a(floor(n/k)) = -1.
G.f. A(x) satisfies -x = Sum_{k>=1} (-1)^k * k * (1 - x^k) * A(x^k).

A361987 a(1) = 1; a(n) = n^2 * Sum_{d|n, d < n} (-1)^(n/d) a(d) / d^2.

Original entry on oeis.org

1, 4, -9, 32, -25, -36, -49, 256, 0, -100, -121, -288, -169, -196, 225, 2048, -289, 0, -361, -800, 441, -484, -529, -2304, 0, -676, 0, -1568, -841, 900, -961, 16384, 1089, -1156, 1225, 0, -1369, -1444, 1521, -6400, -1681, 1764, -1849, -3872, 0, -2116, -2209, -18432, 0, 0, 2601, -5408, -2809, 0
Offset: 1

Views

Author

Seiichi Manyama, Apr 02 2023

Keywords

Crossrefs

Partial sums give A361983.

Programs

  • Mathematica
    f[p_, e_] := If[e == 1, -p^2, 0]; f[2, e_] := 2^(3*e - 1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, May 09 2023 *)

Formula

a(n) is multiplicative with a(2^e) = 2^(3*e-1). a(p) = -p^2, a(p^e) = 0 if e>1, p>2.
G.f. A(x) satisfies -x = Sum_{k>=1} (-1)^k * k^2 * A(x^k).

A358276 a(1) = 1; a(n) = n * Sum_{d|n, d < n} (-1)^(n/d - 1) * a(d) / d.

Original entry on oeis.org

1, -2, 3, 0, 5, -18, 7, 0, 18, -30, 11, 24, 13, -42, 45, 0, 17, -144, 19, 40, 63, -66, 23, 0, 50, -78, 108, 56, 29, -390, 31, 0, 99, -102, 105, 360, 37, -114, 117, 0, 41, -546, 43, 88, 360, -138, 47, 0, 98, -400, 153, 104, 53, -1080, 165, 0, 171, -174, 59, 1080, 61, -186, 504, 0, 195, -858, 67, 136
Offset: 1

Views

Author

Seiichi Manyama, Mar 30 2023

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n<2, n, add(b(n/d)*
         (-1)^(d-1), d=numtheory[divisors](n) minus {1}))
        end:
    a:= n-> n*b(n):
    seq(a(n), n=1..68);  # Alois P. Heinz, Mar 30 2023
  • Mathematica
    a[1] = 1; a[n_] := a[n] = n * DivisorSum[n, (-1)^(n/# - 1) * a[#]/# &, # < n &]; Array[a, 100] (* Amiram Eldar, Jul 31 2023 *)
  • PARI
    a(n) = if (n==1, 1, n*sumdiv(n, d, if (dMichel Marcus, Mar 30 2023

Formula

a(n) = n * A308077(n).
If p is prime, a(p) = (-1)^(p-1) * p.
G.f. A(x) satisfies A(x) = x - Sum_{k>=2} (-1)^k * k * A(x^k).
Showing 1-3 of 3 results.