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
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]
-
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 *)
-
{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))}
-
A123709(n)=#select((matrix(n, n, r, c, r\c)^-1)[n,],x->x) \\ M. F. Hasler, Feb 12 2012
-
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
A123711
Indices n such that A123709(n) = 8 = number of nonzero terms in row n of triangle A123706.
Original entry on oeis.org
12, 18, 20, 24, 28, 36, 40, 44, 45, 48, 50, 52, 54, 56, 63, 68, 72, 75, 76, 80, 88, 92, 96, 98, 99, 100, 104, 108, 112, 116, 117, 124, 135, 136, 144, 147, 148, 152, 153, 160, 162, 164, 171, 172, 175, 176, 184, 188, 189, 192, 196, 200, 207, 208, 212, 216, 224, 225
Offset: 1
-
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 &]]; Select[Range[500], A123709[#] == 8 &] (* G. C. Greubel, Apr 22 2017 *)
-
A123712
Indices n such that 16 = A123709(n) = number of nonzero terms in row n of triangle A123706.
Original entry on oeis.org
60, 84, 90, 120, 126, 132, 140, 150, 156, 168, 180, 198, 204, 220, 228, 234, 240, 252, 260, 264, 270, 276, 280, 294, 300, 306, 308, 312, 315, 336, 340, 342, 348, 350, 360, 364, 372, 378, 380, 396, 408, 414, 440, 444, 450, 456, 460, 468, 476, 480, 490, 492
Offset: 1
-
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 &]]; Select[Range[6500], A123709[#] == 16 &] (* G. C. Greubel, Apr 22 2017 *)
-
is(n)=my(M=matrix(n, n, r, c,r\c)^-1); sum(k=1, n, M[n, k]!=0)==16 \\ Charles R Greathouse IV, Feb 09 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
-
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 *)
-
{a(n)=sum(k=1,n,(matrix(n,n,r,c,if(r>=c,floor(r/c)))^-1)[n,k]*2^(k-1))}
A123708
a(n) = sum of unsigned elements in row n of triangle A123706.
Original entry on oeis.org
1, 3, 3, 4, 3, 5, 3, 4, 4, 7, 3, 8, 3, 7, 7, 4, 3, 8, 3, 8, 7, 7, 3, 8, 4, 7, 4, 8, 3, 13, 3, 4, 7, 7, 7, 8, 3, 7, 7, 8, 3, 13, 3, 8, 8, 7, 3, 8, 4, 8, 7, 8, 3, 8, 7, 8, 7, 7, 3, 16, 3, 7, 8, 4, 7, 13, 3, 8, 7, 15, 3, 8, 3, 7, 8, 8, 7, 13, 3, 8, 4, 7, 3, 16, 7, 7, 7, 8, 3, 16, 7, 8, 7, 7, 7, 8, 3, 8, 8, 8, 3, 13
Offset: 1
-
t[n_, k_] := If[Divisible[n, k], MoebiusMu[n/k], 0] - If[Divisible[n, k + 1], MoebiusMu[n/(k + 1)], 0]; Table[Sum[Abs[t[n, k]], {k, 1, n}], {n, 1, 50}] (* G. C. Greubel, Oct 26 2017 *)
-
{a(n)=local(M=matrix(n,n,r,c,if(r>=c,floor(r/c)))^-1);sum(k=1,n,abs(M[n,k]))}
A123710
Indices n such that 4 = A123709(n) = number of nonzero terms in row n of triangle A123706.
Original entry on oeis.org
4, 6, 8, 9, 16, 25, 27, 32, 49, 64, 81, 121, 125, 128, 169, 243, 256, 289, 343, 361, 512, 529, 625, 729, 841, 961, 1024
Offset: 1
A350103
Triangle read by rows. Number of self-measuring subsets of the initial segment of the natural numbers strictly below n and cardinality k. Number of subsets S of [n] with S = distset(S) and |S| = k.
Original entry on oeis.org
1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 1, 4, 2, 1, 1, 1, 1, 5, 2, 1, 1, 1, 1, 1, 6, 3, 2, 1, 1, 1, 1, 1, 7, 3, 2, 1, 1, 1, 1, 1, 1, 8, 4, 2, 2, 1, 1, 1, 1, 1, 1, 9, 4, 3, 2, 1, 1, 1, 1, 1, 1, 1, 10, 5, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 11, 5, 3, 2, 2, 1, 1, 1, 1, 1, 1
Offset: 0
Triangle starts:
[ 0] [1]
[ 1] [1, 1]
[ 2] [1, 1, 1]
[ 3] [1, 1, 2, 1]
[ 4] [1, 1, 3, 1, 1]
[ 5] [1, 1, 4, 2, 1, 1]
[ 6] [1, 1, 5, 2, 1, 1, 1]
[ 7] [1, 1, 6, 3, 2, 1, 1, 1]
[ 8] [1, 1, 7, 3, 2, 1, 1, 1, 1]
[ 9] [1, 1, 8, 4, 2, 2, 1, 1, 1, 1]
[10] [1, 1, 9, 4, 3, 2, 1, 1, 1, 1, 1]
[11] [1, 1, 10, 5, 3, 2, 2, 1, 1, 1, 1, 1]
[12] [1, 1, 11, 5, 3, 2, 2, 1, 1, 1, 1, 1, 1]
.
The first column is 1,1,... because {} = distset({}) and |{}| = 0.
The second column is 1,1,... because {0} = distset({0}) and |{0}| = 1.
The third column is n-1 because {0, j} = distset({0, j}) and |{0, j}| = 2 for j = 1..n - 1.
The main diagonal is 1,1,... because [n] = distset([n]) and |[n]| = n (these are the complete rulers A103295).
-
T := (n, k) -> ifelse(k < 2, 1, floor((n - 1) / (k - 1))):
seq(print(seq(T(n, k), k = 0..n)), n = 0..12);
-
distSet[s_] := Union[Map[Abs[Differences[#][[1]]] &, Union[Sort /@ Tuples[s, 2]]]]; T[n_, k_] := Count[Subsets[Range[0, n - 1]], ?((ds = distSet[#]) == # && Length[ds] == k &)]; Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* _Amiram Eldar, Dec 16 2021 *)
-
T(n, k) = if(k<=1, 1, (n - 1) \ (k - 1)) \\ Winston de Greef, Jan 31 2024
-
# generating and counting (slow)
def isSelfMeasuring(R):
S, L = Set([]), len(R)
R = Set([r - 1 for r in R])
for i in range(L):
for j in (0..i):
S = S.union(Set([abs(R[i] - R[i - j])]))
return R == S
def A349976row(n):
counter = [0] * (n + 1)
for S in Subsets(n):
if isSelfMeasuring(S): counter[len(S)] += 1
return counter
for n in range(10): print(A349976row(n))
A206706
Triangle read by rows, T(n,k) n>=0, 0<=k<=n; T(0,0) = -1 and for n > 0 T(n,k) = moebius(n,k+1) - moebius(n,k) where moebius(n,k) = mu(floor(n/k)) if k<>0 and k divides n, 0 otherwise; mu=A008683.
Original entry on oeis.org
-1, 1, -1, -1, 2, -1, -1, 1, 1, -1, 0, -1, 1, 1, -1, -1, 1, 0, 0, 1, -1, 1, -2, 0, 1, 0, 1, -1, -1, 1, 0, 0, 0, 0, 1, -1, 0, 0, 0, -1, 1, 0, 0, 1, -1, 0, 0, -1, 1, 0, 0, 0, 0, 1, -1, 1, -2, 1, 0, -1, 1, 0, 0, 0, 1, -1, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1, 0
Offset: 0
[ 0] -1,
[ 1] 1, -1,
[ 2] -1, 2, -1,
[ 3] -1, 1, 1, -1,
[ 4] 0, -1, 1, 1, -1,
[ 5] -1, 1, 0, 0, 1, -1,
[ 6] 1, -2, 0, 1, 0, 1, -1,
[ 7] -1, 1, 0, 0, 0, 0, 1, -1,
[ 8] 0, 0, 0, -1, 1, 0, 0, 1, -1,
[ 9] 0, 0, -1, 1, 0, 0, 0, 0, 1, -1,
The inverse of this triangle as a matrix begins
[-1, 0, 0, 0, 0, 0, 0]
[-1, -1, 0, 0, 0, 0, 0]
[-1, -2, -1, 0, 0, 0, 0]
[-1, -3, -1, -1, 0, 0, 0]
[-1, -4, -2, -1, -1, 0, 0]
[-1, -5, -2, -1, -1, -1, 0]
[-1, -6, -3, -2, -1, -1, -1]
-
with(numtheory): A206706 := proc(n,k) local moebius;
moebius := (n, k) -> `if`(k<>0 and irem(n,k) = 0, mobius(iquo(n,k)), 0);
moebius(n, k+1) - moebius(n, k) end:
-
mu[n_, k_] := If[k != 0 && Divisible[n, k], MoebiusMu[n/k], 0];
T[0, 0] = -1; T[n_, k_] /; 0 <= k <= n := mu[n, k+1] - mu[n, k];
Table[T[n, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jul 12 2019 *)
-
def mur(n,k): return moebius(n//k) if k != 0 and n%k == 0 else 0
def A206706(n,k) : return -1 if n==0 and k==0 else mur(n,k+1) - mur(n,k)
Showing 1-8 of 8 results.
Comments