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.

A123706 Matrix inverse of triangle A010766, where A010766(n,k) = [n/k], for n>=k>=1.

Original entry on oeis.org

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

Views

Author

Paul D. Hanna, Oct 09 2006

Keywords

Comments

Unsigned elements consist of only 0's, 1's and 2's.

Examples

			Triangle begins:
1;
-2, 1;
-1,-1, 1;
1,-1,-1, 1;
-1, 0, 0,-1, 1;
2, 0,-1, 0,-1, 1;
-1, 0, 0, 0, 0,-1, 1;
0, 0, 1,-1, 0, 0,-1, 1;
0, 1,-1, 0, 0, 0, 0,-1, 1;
2,-1, 0, 1,-1, 0, 0, 0,-1, 1;
-1, 0, 0, 0, 0, 0, 0, 0, 0,-1, 1;
-1, 1, 1,-1, 1,-1, 0, 0, 0, 0,-1, 1;
-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,-1, 1;
2,-1, 0, 0, 0, 1,-1, 0, 0, 0, 0, 0,-1, 1;
1, 1,-1, 1,-1, 0, 0, 0, 0, 0, 0, 0, 0,-1, 1; ...
		

Crossrefs

Programs

  • Mathematica
    t[n_, k_] := If[Divisible[n, k], MoebiusMu[n/k], 0] - If[Divisible[n, k+1], MoebiusMu[n/(k+1)], 0]; Table[t[n, k], {n, 1, 15}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jun 29 2013, after Enrique Pérez Herrero *)
  • PARI
    T(n,k)=(matrix(n,n,r,c,r\c)^-1)[n,k]  \\ simplified by M. F. Hasler, Feb 12 2012

Formula

T(n,1) = +2 when n = 2*p where p is an odd prime.
T(n,1) = -2 when n is an even squarefree number with an odd number of prime divisors.
A123709(n) = number of nonzero terms in row n = 2^(m+1) - 1 when n is an odd number with exactly m distinct prime factors.
Sum_{k=1..n} T(n,k) = moebius(n).
Sum_{k=1..n} T(n,k)*k = 0 for n>1.
Sum_{k=1..n} T(n,k)*k^2 = 2*phi(n) for n>1 where phi(n)=A000010(n).
Sum_{k=1..n} T(n,k)*k^3 = 6*A102309(n) for n>1 where A102309(n)=Sum[d|n, moebius(d)*C(n/d,2) ].
Sum_{k=1..n} T(n,k)*k*2^(k-1) = A085411(n) = Sum_{d|n} mu(n/d)*(d+1)*2^(d-2) = total number of parts in all compositions of n into relatively prime parts.
T(n,k) = mu(n/k)-mu(n/(k+1)), where mu(n/k) is A008683(n/k) if k|n and 0 otherwise. - Enrique Pérez Herrero, Feb 21 2012

A123709 a(n) is the number of nonzero elements in row n of triangle A123706.

Original entry on oeis.org

1, 2, 3, 4, 3, 4, 3, 4, 4, 6, 3, 8, 3, 6, 7, 4, 3, 8, 3, 8, 7, 6, 3, 8, 4, 6, 4, 8, 3, 11, 3, 4, 7, 6, 7, 8, 3, 6, 7, 8, 3, 11, 3, 8, 8, 6, 3, 8, 4, 8, 7, 8, 3, 8, 7, 8, 7, 6, 3, 16, 3, 6, 8, 4, 7, 12, 3, 8, 7, 14, 3, 8, 3, 6, 8, 8
Offset: 1

Views

Author

Paul D. Hanna, Oct 09 2006

Keywords

Comments

Triangle A123706 is the matrix inverse of triangle A010766, where A010766(n,k) = [n/k]. a(n) = 4 when n is in A123710. a(n) = 8 when n is in A123711. a(n) = 16 when n is in A123712.

Examples

			a(n) = 3 when n is an odd prime.
a(n) = 7 when n is the product of two different odd primes.  [Corrected by _M. F. Hasler_, Feb 13 2012]
a(n) = 15 when n is the product of three different odd primes.  [Corrected by _M. F. Hasler_, Feb 13 2012]
		

Crossrefs

Programs

  • Mathematica
    Moebius[i_,j_]:=If[Divisible[i,j], MoebiusMu[i/j],0];
    A123709[n_]:=Length[Select[Table[Moebius[n,j]-Moebius[n,j+1],{j,1,n}],#!=0&]];
    Array[A123709, 500] (* Enrique Pérez Herrero, Feb 13 2012 *)
  • PARI
    {a(n)=local(M=matrix(n,n,r,c,if(r>=c,floor(r/c)))^-1); sum(k=1,n,if(M[n,k]==0,0,1))}
    
  • PARI
    A123709(n)=#select((matrix(n, n, r, c, r\c)^-1)[n,],x->x)  \\ M. F. Hasler, Feb 12 2012
    
  • PARI
    A123709(n)={ my(t=moebius(n)); sum(k=2,n, t+0 != t=if(n%k,0,moebius(n\k)))+1}  /* the "t+0 != ..." is required because of a bug in PARI versions <= 2.4.2, maybe beyond, which seems to be fixed in v. 2.5.1 */ \\ M. F. Hasler, Feb 13 2012

Formula

a(n) = 2^(m+1) - 1 when n is the product of m distinct odd primes. [Corrected by M. F. Hasler, Feb 13 2012]
For any k>1, a(n)=2^k if, and only if, n is a nonsquarefree number with A001221(n) = k-1 (= omega(n), number of distinct prime factors), with the only exception of a(n=6)=2^2. - M. F. Hasler, Feb 12 2012
A123709(n) = 1 + #{ k in 1..n-1 | Moebius(n,k+1) <> Moebius(n,k) }, where Moebius(n,k)={moebius(n/k) if n=0 (mod k), 0 else}, cf. link to message by P. Luschny. - M. F. Hasler, Feb 13 2012

A123707 a(n) = Sum_{k=1..n} A123706(n,k)*2^(k-1).

Original entry on oeis.org

1, 0, 1, 3, 7, 14, 31, 60, 126, 248, 511, 1005, 2047, 4064, 8183, 16320, 32767, 65394, 131071, 261885, 524255, 1048064, 2097151, 4193220, 8388600, 16775168, 33554304, 67104765, 134217727, 268427002, 536870911, 1073725440, 2147483135
Offset: 1

Views

Author

Paul D. Hanna, Oct 09 2006

Keywords

Comments

Triangle A123706 is the matrix inverse of triangle A010766(n,k) = [n/k].

Crossrefs

Programs

  • Mathematica
    t[n_, k_] := If[Divisible[n, k], MoebiusMu[n/k], 0] - If[Divisible[n, k + 1], MoebiusMu[n/(k + 1)], 0]; Table[Sum[t[n, k]*2^(k - 1), {k, 1, n}], {n, 1, 50}] (* G. C. Greubel, Oct 26 2017 *)
  • PARI
    {a(n)=sum(k=1,n,(matrix(n,n,r,c,if(r>=c,floor(r/c)))^-1)[n,k]*2^(k-1))}

Formula

G.f.: Sum_{k>=1} mu(k) * x^k * (1 - x^k) / (1 - 2*x^k). - Ilya Gutkovskiy, Feb 06 2020
a(n) ~ 2^(n-2). - Vaclav Kotesovec, May 03 2025
Showing 1-3 of 3 results.