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

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

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

Original entry on oeis.org

1, 2, -3, 8, -5, -6, -7, 32, 0, -10, -11, -24, -13, -14, 15, 128, -17, 0, -19, -40, 21, -22, -23, -96, 0, -26, 0, -56, -29, 30, -31, 512, 33, -34, 35, 0, -37, -38, 39, -160, -41, 42, -43, -88, 0, -46, -47, -384, 0, 0, 51, -104, -53, 0, 55, -224, 57, -58, -59, 120
Offset: 1

Views

Author

Ilya Gutkovskiy, Feb 24 2020

Keywords

Crossrefs

Cf. A002129, A038838 (positions of 0's), A055615, A067856, A327268, A361987.
Partial sums give A361982.
Dirichlet inverse of A181983.

Programs

  • Mathematica
    a[1] = 1; a[n_] := n Sum[If[d < n, (-1)^(n/d) a[d]/d, 0], {d, Divisors[n]}]; Table[a[n], {n, 1, 60}]
    terms = 60; A[] = 0; Do[A[x] = x + Sum[(-1)^k k A[x^k], {k, 2, terms}] + O[x]^(terms + 1) // Normal, terms + 1]; CoefficientList[A[x], x] // Rest
    f[p_, e_] := If[p == 2, p^(2*e - 1), -p*Boole[e == 1]]; a[1] = 1; a[n_] := Times @@ (f @@@ FactorInteger[n]); Array[a, 100] (* Amiram Eldar, Dec 02 2020 *)

Formula

G.f. A(x) satisfies: A(x) = x + Sum_{k>=2} (-1)^k * k * A(x^k).
Dirichlet g.f.: 1 / (zeta(s-1) * (1 - 2^(2 - s))).
a(n) = Sum_{d|n} A327268(d).
Multiplicative with a(2^e) = 2^(2*e-1), and a(p^e) = -p if e=1 and 0 for e>1, for odd primes p. - Amiram Eldar, Dec 02 2020
Showing 1-2 of 2 results.