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.

A282938 Recursive 2-parameter sequence allowing calculation of the Möbius function (not the same as A266378).

Original entry on oeis.org

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

Views

Author

Gevorg Hmayakyan, Feb 25 2017

Keywords

Comments

The a(n,m) forms a table where each row has (n-1)*(n-2)/2+1 = A000124(n-2) elements.
The index of the first row is n=1 and the index of the first column is m=0.
The right diagonal a(n, A000217(n-2)) = A008683(n), Möbius numbers, for n>=1.

Examples

			The first few rows starting from 1 follow:
  1
  -1
  1, -1
  -1, 2, -1, 0
  1, -2, 1, 0, -1, 2, -1
  -1, 3, -2, -1, 1, -1, 1, 1, 0, -2, 1
  1, -2, 1, 0, -1, 1, -1, 3, -1, 0, -1, -2, 1, 1, 1, -1
  -1, 3, -2, -1, 1, -1, 2, -2, 1, 1, 0, 0, -1, -3, 2, 2, 0, 0, -2, 1, 0, 0
		

Crossrefs

Programs

  • Mathematica
    nu[n_]:=(n-1)*(n-2)/2
    U[n_, m_] := U[n, m] = If[n > 1, U[n - 1, m - n + 1] - U[n - 1, m], 0]
    U[1, m_] := U[1, m] = If[m == 0, 1, 0]
    a[n_, m_] := a[n, m] = If[(m < 0) || (nu[n] < m), 0, a[n - 1, m - n + 1] - a[n - 1, m] - a[n - 1, nu[n - 1]]*U[n - 1, m - 1]]
    a[1, m_] := a[1, m] = If[m == 0, 1, 0]
    Table[Table[a[n, m], {m, 0, nu[n]}], {n, 1, 30}]
    Table[a[n, nu[n]], {n, 1, 50}]

Formula

a(n,m) = a(n-1, m-n+1) - a(n-1, m) - a(n-1, nu(n-1))*U(n-1, m-1),
where U(n,m) are coefficients of A231599, nu(n)=(n-1)*(n-2)/2, a(1,0)=1, a(n,m)=0 if m<0 and m>nu(n).
Möbius(n) = a(n,nu(n)).

A280665 Recursive 1-parameter sequence a(n) allowing calculation of the Möbius function.

Original entry on oeis.org

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

Views

Author

Gevorg Hmayakyan, Jan 06 2017

Keywords

Comments

This sequence is generated from A266378 by excluding the second recursion parameter.

Examples

			Möbius(2) = a(c(1)+2) and because the c(1)=2 => a(c(1)+2)= a(4). l(4)=2, K(4)=1 so l(4)-2<K(4) and l(4)*(l(4)-1)/2>=K(4) and a(4)=u(4)-v(4)-x(4)
p(4)=c(l(4)-2)=c(0)=0
u(4)=a(p(4)+K(4)+1)=a(2)=0
v(4)=a(p(4)+K(4)-l(4)+2)=a(1)=1
x(4)=a(p(4)+l(4)-1)*T(l(4)-1,l(4)*(l(4)-1)/2-K(4))=a(1)*T(1,0)=0, as T(1,0)=0.
a(4)=u(4)-v(4)-x(4)=0-1-0=-1.
		

Crossrefs

Programs

  • Maple
    l := n->floor((1/3)*(81+81*n+3*sqrt(1104+1458*n+729*n^2))^(1/3)-5/(81+81*n+3*sqrt(1104+1458*n+729*n^2))^(1/3)):
    c := n->(1/6)*n*(n^2+3*n+8):
    K := n->n-1-c(l(n)-1):
    A := (n, z)->z*(product(z^i-1, i = 1 .. n-1)):
    T := (n, k)->coeff(eval(A(n, z)), z, k):
    p := n->c(l(n)-2):
    u := n->a(p(n)+K(n)+1):
    v := n->a(p(n)+K(n)-l(n)+2):
    x := n->a(p(n)+l(n)-1)*T(l(n)-1, (1/2)*l(n)*(l(n)-1)-K(n)):
    a := proc (n) option remember; if K(n) <= l(n)-2 or (1/2)*l(n)*(l(n)-1) < K(n) then 0 else u(n)-v(n)-x(n) end if end proc:
    a(2) := 0:
    a(1) := 1:

Formula

l(n) = floor((1/3)*(81+81*n+3*sqrt(729*n^2+1458*n+1104))^(1/3)-5/(81+81*n+3*sqrt(729*n^2+1458*n+1104))^(1/3))
c(n) = n*(n^2+3*n+8)/6 = A003600(n)
K(n) = n - 1 - c(l(n) - 1)
T(n,m) are coefficients of A008302
p(n) = c(l(n)-2)
u(n) = a(p(n)+K(n)+1)
v(n) = a(p(n)+K(n)-l(n)+2)
x(n) = a(p(n)+l(n)-1)*T(l(n)-1,l(n)*(l(n)-1)/2-K(n))
a(1) = 1
a(2) = 0
if (l(n)-2 >= K(n) or (1/2)*l(n)*(l(n)-1) < K(n)) then a(n) = 0 else a(n) = u(n)-v(n)-x(n)
Möbius(n) = a(c(n-1)+n)
A100198(n-2) = a(c(n-1)-n), for n>3.
Showing 1-2 of 2 results.