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

A092673 a(n) = moebius(n) - moebius(n/2) where moebius(n) is zero if n is not an integer.

Original entry on oeis.org

1, -2, -1, 1, -1, 2, -1, 0, 0, 2, -1, -1, -1, 2, 1, 0, -1, 0, -1, -1, 1, 2, -1, 0, 0, 2, 0, -1, -1, -2, -1, 0, 1, 2, 1, 0, -1, 2, 1, 0, -1, -2, -1, -1, 0, 2, -1, 0, 0, 0, 1, -1, -1, 0, 1, 0, 1, 2, -1, 1, -1, 2, 0, 0, 1, -2, -1, -1, 1, -2, -1, 0, -1, 2, 0, -1, 1, -2, -1, 0, 0, 2, -1, 1, 1, 2, 1, 0, -1, 0, 1, -1, 1, 2, 1, 0, -1, 0, 0, 0, -1, -2, -1, 0, -1, 2
Offset: 1

Views

Author

Jon Perry, Mar 02 2004

Keywords

Comments

Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
Setting x=1 gives us phi(n) (A000010). Setting x=0 gives A092674.
Apparently the Dirichlet inverse of A001511. - R. J. Mathar, Dec 22 2010
Given A = A115359 as an infinite lower triangular matrix and B = the Mobius sequence as a vector, A092673 = A*B. - Gary W. Adamson, Mar 14 2011
Empirical: Letting M(n) denote the n X n matrix whereby the (i,j)-entry of M(n) is Sum_{k=1..j} floor(i/k), we have that a(n) is the (n,1)-entry of the inverse of M(n). - John M. Campbell, Aug 30 2017
John Campbell's statement is proved at the Mathematics Stack Exchange link. - Sungjin Kim, Jul 17 2019

Examples

			The first few s[n] are:
x, -2*x + 3, -x + 3, x + 1, -x + 5, 2*x, -x + 7, 4, 6, 2*x + 2, -x + 11, -x + 5, -x + 13, 2*x + 4, x + 7, 8, -x + 17, 6, -x + 19, -x + 9, x + 11, 2*x + 8, -x + 23, 8, 20, 2*x + 10, 18, -x + 13, -x + 29, -2*x + 10, -x + 31, 16, x + 19.
x - 2*x^2 - x^3 + x^4 - x^5 + 2*x^6 - x^7 + 2*x^10 - x^11 +...
		

Crossrefs

Cf. A008683 (moebius(n)), A092149 (partial sums), A092674, A115359.

Programs

  • Maple
    A092673:= proc(n) if n::odd then numtheory:-mobius(n) else numtheory:-mobius(n) - numtheory:-mobius(n/2) fi end proc:
    map(A092673, [$1..100]); # Robert Israel, Dec 31 2015
  • Mathematica
    f[n_] := MoebiusMu[n] - If[OddQ@n, 0, MoebiusMu[n/2]]; Array[f, 105] (* Robert G. Wilson v *)
  • PARI
    s=vector(2000); t(n)=binomial(n+1,2); s[1]=x; for(i=2,2000, s[i]=t(i)-sum(j=1,i-1, s[j]*floor(i/j))); for(i=1,2000,print1(","polcoeff(s[i],1)))
    
  • PARI
    {a(n) = if( n<1, 0, moebius(n) - if( n%2, 0, moebius(n/2)))} /* Michael Somos, Mar 26 2007 */
    
  • PARI
    {a(n) = local(A, B, m); if( n<1, 0, A = x * O(x^n); B = 1 + x + A; for( k=1, n, B *= eta(x^k + A)^( m = polcoeff(B, k))); m)} /* Michael Somos, Mar 26 2007 */
    
  • PARI
    a(n)=my(o=valuation(n%8,2)); if(o==0, moebius(n), if(o==1, 2*moebius(n), if(o==2, moebius(n/4), 0))) \\ Charles R Greathouse IV, Feb 07 2013
    
  • Python
    from sympy import mobius
    def A092673(n): return mobius(n)-(0 if n&1 else mobius(n>>1)) # Chai Wah Wu, Jul 13 2022

Formula

Let t(n) = binomial(n+1,2); s[1]=x; for i >= 2, s[i] = t(i)-Sum_{j=1..i-1} s[j]*floor(i/j); a(n) = coefficient of x in s[n]. - Jon Perry
a(n) is multiplicative with a(2)= -2, a(4)= 1, a(2^e)= 0 if e>2. a(p)= -1, a(p^e)= 0 if e>1, p>2. - Michael Somos, Mar 26 2007
a(8*n)= 0. a(2*n + 1) = moebius(2*n + 1). a(2*n) = moebius(2*n) - moebius(n). - Michael Somos, Mar 26 2007
|a(n)| <= 2.
1 / (1 + x) = Product_{k>0} f(-x^k)^a(k) where f() is a Ramanujan theta function. - Michael Somos, Mar 26 2007
Dirichlet g.f.: (1-2^(-s))/zeta(s). - Ralf Stephan, Mar 24 2015
G.f. A(x) satisfies x * (1 - x) = Sum_{k>=1} A(x^k). - Seiichi Manyama, Mar 31 2023
Sum_{k=1..n} abs(a(k)) ~ c * n, where c = 9/Pi^2 = 0.9118906... . - Amiram Eldar, Jan 19 2024

A177976 Square array T(n,k) read by antidiagonals up. Cumulative column sums of A177975.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 4, 3, 1, 1, 6, 8, 4, 1, 1, 10, 15, 13, 5, 1, 1, 12, 29, 29, 19, 6, 1, 1, 18, 42, 63, 49, 26, 7, 1, 1, 22, 69, 106, 118, 76, 34, 8, 1, 1, 28, 95, 189, 225, 201, 111, 43, 9, 1, 1, 32, 134, 289, 434, 427, 320, 155, 53, 10, 1, 1, 42, 172, 444, 729, 888, 748, 484, 209, 64, 11, 1
Offset: 1

Views

Author

Mats Granvik, May 16 2010

Keywords

Comments

Each row is described by both a binomial expression and a closed form polynomial. The closed form polynomials given in A177977 extends this table to the left. For example the 0th column is A002321 and the -1st column is A092149.
Also number of ordered k-tuples of integers from [ 1..n ] with no global factor. - Seiichi Manyama, Jun 12 2021

Examples

			Table begins:
  1..1...1....1.....1.....1......1......1.......1.......1.......1
  1..2...3....4.....5.....6......7......8.......9......10......11
  1..4...8...13....19....26.....34.....43......53......64......76
  1..6..15...29....49....76....111....155.....209.....274.....351
  1.10..29...63...118...201....320....484.....703.....988....1351
  1.12..42..106...225...427....748...1233....1937....2926....4278
  1.18..69..189...434...888...1671...2948....4939....7930...12285
  1.22..95..289...729..1624...3303...6260...11209...19150...31447
  1.28.134..444..1209..2890...6278..12659...24034...43405...75139
  1.32.172..626..1850..4761..11067..23762...47841...91301..166506
  1.42.237..911..2850..7763..19074..43209...91598..183678..351261
  1.46.287.1203..4059.11829..30911..74129..165737..349426..700699
  1.58.377.1657..5878.18016..49474.124516..291706..643355.1347344
  1.64.452.2130..8044.26117..75676.200313..492185.1135761.2483392
  1.72.552.2766.11020.37599.114199.316228..811416.1952182.4443582
  1.80.652.3462.14566.52311.166747.483340.1295295.3248246.7692894
		

Crossrefs

Programs

  • PARI
    T(n, k) = sum(j=1, n, sumdiv(j, d, moebius(j/d)*binomial(d+k-2, d-1))); \\ Seiichi Manyama, Jun 12 2021
    
  • PARI
    T(n, k) = binomial(n+k-1, k)-sum(j=2, n, T(n\j, k)); \\ Seiichi Manyama, Jun 12 2021

Formula

From Seiichi Manyama, Jun 12 2021: (Start)
G.f. of column k: (1/(1 - x)) * Sum_{j>=1} mu(j) * x^j/(1 - x^j)^k.
T(n,k) = Sum_{j=1..n} Sum_{d|j} mu(j/d) * binomial(d+k-2,d-1).
T(n,k) = binomial(n+k-1,k) - Sum_{j=2..n} T(floor(n/j),k). (End)

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

Original entry on oeis.org

1, -4, -13, -9, -34, 11, -38, -38, -38, 87, -34, -70, -239, 6, 231, 231, -58, -58, -419, -519, -78, 527, -2, -2, -2, 843, 843, 647, -194, -1319, -2280, -2280, -1191, 254, 1479, 1479, 110, 1915, 3436, 3436, 1755, -450, -2299, -2783, -2783, -138, -2347, -2347, -2347, -2347, 254, -422
Offset: 1

Views

Author

Seiichi Manyama, Apr 01 2023

Keywords

Crossrefs

Partial sums of A359485.
Cf. A336276.

Programs

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

Formula

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

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

Original entry on oeis.org

1, -2, -5, -3, -8, 1, -6, -6, -6, 9, -2, -8, -21, 0, 15, 15, -2, -2, -21, -31, -10, 23, 0, 0, 0, 39, 39, 25, -4, -49, -80, -80, -47, 4, 39, 39, 2, 59, 98, 98, 57, -6, -49, -71, -71, -2, -49, -49, -49, -49, 2, -24, -77, -77, -22, -22, 35, 122, 63, 93, 32, 125, 125, 125, 190, 91
Offset: 1

Views

Author

Seiichi Manyama, Mar 31 2023

Keywords

Crossrefs

Partial sums of A359484.
Cf. A359479.

Programs

  • Mathematica
    s[n_] := n * MoebiusMu[n] - If[OddQ[n], 0, MoebiusMu[n/2]*n/2]; Accumulate[Array[s, 100]] (* Amiram Eldar, May 09 2023 *)
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A359478(n):
        if n <= 1:
            return 1
        c, j = 0, 2
        k1 = n//j
        while k1 > 1:
            j2 = n//k1 + 1
            c -= (j2*(j2-1)-j*(j-1)>>1)*A359478(k1)
            j, k1 = j2, n//j2
        return c-(n*(n+1)-(j-1)*j>>1) # Chai Wah Wu, Mar 31 2023

Formula

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

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

Original entry on oeis.org

1, -8, -35, -27, -152, 91, -252, -252, -252, 873, -458, -674, -2871, 216, 3591, 3591, -1322, -1322, -8181, -9181, 80, 12059, -108, -108, -108, 19665, 19665, 16921, -7468, -37843, -67634, -67634, -31697, 12520, 55395, 55395, 4742, 66473, 125792, 125792, 56871, -26478
Offset: 1

Views

Author

Seiichi Manyama, Apr 01 2023

Keywords

Crossrefs

Partial sums of A359531.
Cf. A336277.

Programs

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

Formula

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

A177977 Triangle read by rows. Polynomials based on sums of Moebius transforms.

Original entry on oeis.org

1, 1, 0, 1, 3, -2, 1, 6, 5, -6, 1, 10, 35, 26, -48, 1, 15, 85, 165, -26, -120, 1, 21, 175, 735, 1264, -36, -1440, 1, 28, 322, 1960, 5929, 8092, -1212, -10080, 1, 36, 546, 4536, 22449, 60564, 57644, -24816, -80640, 1, 45, 870, 9450, 63273, 254205, 572480
Offset: 1

Views

Author

Mats Granvik, May 16 2010

Keywords

Comments

These polynomials were found by entering the rows of A177976 in Wolfram Alpha. The lower left half equals part of the Stirling numbers of the first kind given in table A094638. To evaluate, enter a value for n and divide row sums with factorial numbers as shown in the example section. n=-1 gives A092149, n=0 gives the Mertens function A002321, n=1 gives A000012, n=2 gives A002088, n=3 gives A015631, and n=4 gives A015634.

Examples

			Triangle begins and the polynomials are:
(1*n^0)/1
(1*n^1 +0*n^0)/1
(1*n^2 +3*n^1 -2*n^0)/2
(1*n^3 +6*n^2 +5*n^1 -6*n^0)/6
(1*n^4 +10*n^3 +35*n^2 +26*n^1 -48*n^0)/24
(1*n^5 +15*n^4 +85*n^3 +165*n^2 -26*n^1 -120*n^0)/120
(1*n^6 +21*n^5 +175*n^4 +735*n^3 +1264*n^2 -36*n^1 -1440*n^0)/720
		

Extensions

Typo in sequence (erroneous comma) corrected by N. J. A. Sloane, May 22 2010
Showing 1-6 of 6 results.