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

A092149 Partial sums of A092673.

Original entry on oeis.org

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

Views

Author

Jon Perry, Mar 31 2004

Keywords

Crossrefs

Programs

  • Mathematica
    Accumulate@ Array[MoebiusMu[#] - If[OddQ@ #, 0, MoebiusMu[#/2]] &, 106] (* Michael De Vlieger, Mar 31 2021 *)
  • PARI
    a(n)=my(s);forstep(k=bitor(n\4+1,1),n\2,2,s-=moebius(k));forstep(k=bitor(n\2+1,1),n,2,s+=moebius(k)); s \\ Charles R Greathouse IV, Feb 07 2013
    
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A092149(n):
        if n == 1:
            return 1
        c, j = n+1, 2
        k1 = n//j
        while k1 > 1:
            j2 = n//k1 + 1
            c += (j2-j)*A092149(k1)
            j, k1 = j2, n//j2
        return j-c # Chai Wah Wu, Mar 31 2021

Formula

G.f. Sum_{n >= 1} a(n)*(x^n)/((1-x^n)*(x^(n+1)-1))*x = -(x^2) and -1/x. [Mats Granvik, Oct 11 2010]
On the Riemann hypothesis, |a(n)| = O(n^(1/2+e)) for any e > 0. - Charles R Greathouse IV, Feb 07 2013
a(1)=1, then for n>=2, Sum_{k=1..n} a(floor(n/k)) = 0. - Benoit Cloitre, Feb 21 2013
G.f. A(x) satisfies x * (1 - x) = Sum_{k>=1} (1 - x^k) * A(x^k). - Seiichi Manyama, Mar 31 2023

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

Original entry on oeis.org

1, 2, 1, 3, 2, 1, 0, 4, 4, 3, 2, 0, -1, -2, -1, 7, 6, 6, 5, 3, 4, 3, 2, -2, -2, -3, -3, -5, -6, -5, -6, 10, 11, 10, 11, 11, 10, 9, 10, 6, 5, 6, 5, 3, 3, 2, 1, -7, -7, -7, -6, -8, -9, -9, -8, -12, -11, -12, -13, -11, -12, -13, -13, 19, 20, 21, 20, 18, 19, 20, 19, 19, 18, 17, 17
Offset: 1

Views

Author

Ilya Gutkovskiy, Aug 11 2021

Keywords

Comments

Partial sums of A067856.

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 A347030(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)*A347030(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)).

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

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

Original entry on oeis.org

1, 2, -1, 5, 0, -3, -10, 14, 14, 9, -2, -20, -33, -40, -25, 71, 54, 54, 35, 5, 26, 15, -8, -80, -80, -93, -93, -135, -164, -149, -180, 204, 237, 220, 255, 255, 218, 199, 238, 118, 77, 98, 55, -11, -11, -34, -81, -369, -369, -369, -318, -396, -449, -449, -394, -562, -505, -534
Offset: 1

Views

Author

Seiichi Manyama, Mar 31 2023

Keywords

Crossrefs

Cf. A309288.

Programs

  • Mathematica
    f[p_, e_] := If[e == 1, -p, 0]; f[2, e_] := If[e == 1, 1, 6*4^(e-2)]; 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 A359479(n):
        if n <= 1:
            return 1
        c, j = 0, 2
        k1 = n//j
        while k1 > 1:
            j2 = n//k1 + 1
            c += ((j2>>1 if j2&1 else -(j2>>1))-(j>>1 if j&1 else -(j>>1)))*A359479(k1)
            j, k1 = j2, n//j2
        return c+(-(n+1>>1) if n&1 else n+1>>1)+(-(j>>1) if j&1 else j>>1) # Chai Wah Wu, Mar 31 2023

Formula

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

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

Original entry on oeis.org

1, 0, -1, 1, -1, 0, -1, 2, 0, 0, -1, -1, -1, 0, 1, 4, -1, 0, -1, -1, 1, 0, -1, -2, 0, 0, 0, -1, -1, 0, -1, 8, 1, 0, 1, 0, -1, 0, 1, -2, -1, 0, -1, -1, 0, 0, -1, -4, 0, 0, 1, -1, -1, 0, 1, -2, 1, 0, -1, 1, -1, 0, 0, 16, 1, 0, -1, -1, 1, 0, -1, 0, -1, 0, 0, -1, 1, 0, -1, -4, 0, 0, -1, 1, 1, 0, 1, -2, -1, 0, 1, -1, 1, 0, 1, -8, -1, 0, 0, 0
Offset: 1

Views

Author

Seiichi Manyama, Apr 02 2023

Keywords

Crossrefs

Partial sums give A309288.
Cf. A092673.

Programs

  • Mathematica
    f[p_, e_] := If[e == 1, -1, 0]; f[2, e_] := If[e == 1, 0, 2^(e-2)]; 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) = 0, a(2^e) = 2^(e-2) if e>1. a(p) = -1, a(p^e) = 0 if e>1, p>2.
G.f. A(x) satisfies -x * (1 - x) = Sum_{k>=1} (-1)^k * A(x^k).

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

Original entry on oeis.org

1, 4, -5, 23, -2, -29, -78, 146, 146, 71, -50, -302, -471, -618, -393, 1399, 1110, 1110, 749, 49, 490, 127, -402, -2418, -2418, -2925, -2925, -4297, -5138, -4463, -5424, 8912, 10001, 9134, 10359, 10359, 8990, 7907, 9428, 3828, 2147, 3470, 1621, -1767, -1767, -3354, -5563
Offset: 1

Views

Author

Seiichi Manyama, Apr 02 2023

Keywords

Crossrefs

Partial sums of A361986.

Programs

  • Mathematica
    f[p_, e_] := If[e == 1, -p^2, 0]; f[2, e_] := If[e == 1, 3, 7*2^(3*e-4)]; 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 A361981(n):
        if n <= 1:
            return 1
        c, j = 0, 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)*A361981(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)) = 0 for n > 1.
G.f. A(x) satisfies -x * (1 - x) = Sum_{k>=1} (-1)^k * k^2 * (1 - x^k) * A(x^k).

A347028 a(1) = 1; a(n+1) = -Sum_{k=1..n} a(floor(n/k)).

Original entry on oeis.org

1, -1, 0, -2, 1, -3, 1, -4, 4, -6, 2, -7, 8, -8, 5, -13, 13, -14, 9, -15, 19, -21, 12, -22, 32, -26, 18, -36, 33, -37, 31, -38, 57, -48, 32, -56, 66, -57, 44, -74, 83, -75, 65, -76, 100, -102, 68, -103, 140, -108, 94, -136, 140, -137, 119, -149, 193, -174, 125, -175, 228, -176, 161, -224, 256
Offset: 1

Views

Author

Ilya Gutkovskiy, Aug 11 2021

Keywords

Crossrefs

Programs

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

Formula

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