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).

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

Original entry on oeis.org

1, 5, -4, 28, 3, -33, -82, 174, 174, 74, -47, -335, -504, -700, -475, 1573, 1284, 1284, 923, 123, 564, 80, -449, -2753, -2753, -3429, -3429, -4997, -5838, -4938, -5899, 10485, 11574, 10418, 11643, 11643, 10274, 8830, 10351, 3951, 2270, 4034, 2185, -1687, -1687, -3803
Offset: 1

Views

Author

Seiichi Manyama, Apr 02 2023

Keywords

Crossrefs

Partial sums of A361987.
Cf. A336276.

Programs

  • Mathematica
    f[p_, e_] := If[e == 1, -p^2, 0]; f[2, e_] := 2^(3*e - 1); s[1] = 1; s[n_] := Times @@ f @@@ FactorInteger[n]; Accumulate[Array[s, 100]] (* Amiram Eldar, May 09 2023 *)
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A361983(n):
        if n <= 1:
            return 1
        c, j = 1, 2
        k1 = n//j
        while k1 > 1:
            j2 = n//k1 + 1
            c += ((j2*(j2-1) if j2&1 else -j2*(j2-1))+(-j*(j-1) if j&1 else j*(j-1))>>1)*A361983(k1)
            j, k1 = j2, n//j2
        return c+((-n*(n+1) if n&1 else n*(n+1))+(-j*(j-1) if j&1 else j*(j-1))>>1) # Chai Wah Wu, Apr 02 2023

Formula

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

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

Original entry on oeis.org

1, 0, 1, 1, 2, -1, 0, 0, 2, -1, 0, 2, 3, 0, 3, 3, 4, -4, -3, -1, 2, -1, 0, 0, 2, -1, 3, 5, 6, -7, -6, -6, -3, -6, -3, 7, 8, 5, 8, 8, 9, -4, -3, -1, 7, 4, 5, 5, 7, -1, 2, 4, 5, -15, -12, -12, -9, -12, -11, 7, 8, 5, 13, 13, 16, 3, 4, 6, 9, -4, -3, -7, -6, -9, -1
Offset: 1

Views

Author

Ilya Gutkovskiy, Aug 11 2021

Keywords

Comments

Partial sums of A308077.

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = 1 - Sum[(-1)^k a[Floor[n/k]], {k, 2, n}]; Table[a[n], {n, 1, 75}]
    nmax = 75; A[] = 0; Do[A[x] = (1/(1 - x)) (x - Sum[(-1)^k (1 - x^k) A[x^k], {k, 2, nmax}]) + O[x]^(nmax + 1) // Normal, nmax + 1]; CoefficientList[A[x], x] // Rest
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A347031(n):
        if n <= 1:
            return n
        c, j = 1, 2
        k1 = n//j
        while k1 > 1:
            j2 = n//k1 + 1
            c += (j2-j&1)*(1 if j&1 else -1)*A347031(k1)
            j, k1 = j2, n//j2
        return c+(n+1-j&1)*(1 if j&1 else -1) # Chai Wah Wu, Apr 04 2023

Formula

G.f. A(x) satisfies: A(x) = (1/(1 - x)) * (x - Sum_{k>=2} (-1)^k * (1 - x^k) * A(x^k)).
Showing 1-3 of 3 results.