login
Search: keyword:new
     Sort: relevance | references | number | modified | created      Format: long | short | data
Lower (1/2, 2) midsequence of triangular numbers (A000217) and tetrahedral numbers (A000330); see Comments.
+0
0
0, 2, 11, 31, 65, 117, 192, 294, 426, 592, 797, 1045, 1339, 1683, 2082, 2540, 3060, 3646, 4303, 5035, 5845, 6737, 7716, 8786, 9950, 11212, 12577, 14049, 15631, 17327, 19142, 21080, 23144, 25338, 27667, 30135, 32745, 35501, 38408, 41470, 44690, 48072, 51621
OFFSET
0,2
COMMENTS
Suppose that s = (s(n)) and t = (t(n)) are sequences of numbers and h > 0 and k > 0. The lower (h, k)-midsequence of s and t is floor(h*s + k*t); the upper (h, k)-midsequence of s and t is ceiling(h*s + k*t). See A398651 for a guide to related sequences.
FORMULA
a(n) = 4*a(n-1) - 7*a(n-2) + 8*a(n-3) - 7*a(n-4) + 4*a(n-5) - a(n-6), with (a(0), ..., a(4), a(5)) = (0, 2, 11, 31, 65, 117).
G.f.: x*(2 + 3*x + x^2 + 2*x^3)/((-1 + x)^4 *(1 + x^2)).
MATHEMATICA
z = 60;
f[n_] := (n^2 + n)/2; g[n_] := n (n + 1) (2 n + 1)/6;
r = 1/2; s = 2;
u[n_] := Floor[r*f[n] + s*g[n]]; v[n_] := Ceiling[r*f[n] + s*g[n]];
Table[u[n], {n, 0, z}]
CROSSREFS
KEYWORD
nonn,easy,new
AUTHOR
Clark Kimberling, Aug 25 2026
STATUS
approved
Upper (1/2, 2) midsequence of triangular numbers (A000217) and tetrahedral numbers (A000330); see Comments.
+0
0
0, 3, 12, 31, 65, 118, 193, 294, 426, 593, 798, 1045, 1339, 1684, 2083, 2540, 3060, 3647, 4304, 5035, 5845, 6738, 7717, 8786, 9950, 11213, 12578, 14049, 15631, 17328, 19143, 21080, 23144, 25339, 27668, 30135, 32745, 35502, 38409, 41470, 44690, 48073, 51622
OFFSET
0,2
COMMENTS
Suppose that s = (s(n)) and t = (t(n)) are sequences of numbers and h > 0 and k > 0. The lower (h, k)-midsequence of s and t is floor(h*s + k*t); the upper (h, k)-midsequence of s and t is ceiling(h*s + k*t). See A398651 for a guide to related sequences.
FORMULA
a(n) = 4*a(n-1) - 7*a(n-2) + 8*a(n-3) - 7*a(n-4) + 4*a(n-5) - a(n-6), with (a(0), ..., a(4), a(5)) = (0, 3, 12, 31, 65, 118).
G.f.: x*(3 + 4*x^2 + x^3)/((-1 + x)^4 *(1 + x^2))).
MATHEMATICA
z = 60;
f[n_] := (n^2 + n)/2; g[n_] := n (n + 1) (2 n + 1)/6;
r = 1/2; s = 2;
u[n_] := Floor[r*f[n] + s*g[n]]; v[n_] := Ceiling[r*f[n] + s*g[n]];
Table[v[n], {n, 0, z}]
CROSSREFS
KEYWORD
nonn,easy,new
AUTHOR
Clark Kimberling, Aug 25 2026
STATUS
approved
Lower (1/2, 3) midsequence of triangular numbers (A000217) and tetrahedral numbers (A000330); see Comments.
+0
1
0, 3, 16, 45, 95, 172, 283, 434, 630, 877, 1182, 1551, 1989, 2502, 3097, 3780, 4556, 5431, 6412, 7505, 8715, 10048, 11511, 13110, 14850, 16737, 18778, 20979, 23345, 25882, 28597, 31496, 34584, 37867, 41352, 45045, 48951, 53076, 57427, 62010, 66830, 71893
OFFSET
0,2
COMMENTS
Suppose that s = (s(n)) and t = (t(n)) are sequences of numbers and h > 0 and k > 0. The lower (h, k)-midsequence of s and t is floor(h*s + k*t); the upper (h, k)-midsequence of s and t is ceiling(h*s + k*t). See A398651 for a guide to related sequences.
FORMULA
a(n) = 4*a(n-1) - 7*a(n-2) + 8*a(n-3) - 7*a(n-4) + 4*a(n-5) - a(n-6), with (a(0), ..., a(4), a(5)) = (0, 3, 16, 45, 95, 172).
G.f.: x*(3 + 4*x + 2*x^2 + 3*x^3)/((-1 + x)^4 *(1 + x^2)).
MATHEMATICA
z = 60;
f[n_] := (n^2 + n)/2; g[n_] := n (n + 1) (2 n + 1)/6;
r = 1/2; s = 3;
u[n_] := Floor[r*f[n] + s*g[n]]; v[n_] := Ceiling[r*f[n] + s*g[n]];
Table[u[n], {n, 0, z}]
CROSSREFS
KEYWORD
nonn,easy,new
AUTHOR
Clark Kimberling, Aug 25 2026
STATUS
approved
Upper (1/2, 3) midsequence of triangular numbers (A000217) and tetrahedral numbers (A000330); see Comments.
+0
0
0, 4, 17, 45, 95, 173, 284, 434, 630, 878, 1183, 1551, 1989, 2503, 3098, 3780, 4556, 5432, 6413, 7505, 8715, 10049, 11512, 13110, 14850, 16738, 18779, 20979, 23345, 25883, 28598, 31496, 34584, 37868, 41353, 45045, 48951, 53077, 57428, 62010, 66830, 71894
OFFSET
0,2
COMMENTS
Suppose that s = (s(n)) and t = (t(n)) are sequences of numbers and h > 0 and k > 0. The lower (h, k)-midsequence of s and t is floor(h*s + k*t); the upper (h, k)-midsequence of s and t is ceiling(h*s + k*t).
FORMULA
a(n) = 4*a(n-1) - 7*a(n-2) + 8*a(n-3) - 7*a(n-4) + 4*a(n-5) - a(n-6), with (a(0), ..., a(4), a(5)) = (0, 4, 17, 45, 95, 173).
G.f.: x*(4 + x + 5*x^2 + 2*x^3)/((-1 + x)^4 *(1 + x^2)). See A398651 for a guide to related sequences.
MATHEMATICA
z = 60;
f[n_] := (n^2 + n)/2; g[n_] := n (n + 1) (2 n + 1)/6;
r = 1/2; s = 3;
u[n_] := Floor[r*f[n] + s*g[n]]; v[n_] := Ceiling[r*f[n] + s*g[n]];
Table[v[n], {n, 0, z}]
CROSSREFS
KEYWORD
nonn,easy,new
AUTHOR
Clark Kimberling, Aug 25 2026
STATUS
approved
Squares visited by a "Squirrel" (Knight + Dabbaba + Alfil) moving on a spirally numbered board always to the lowest available unvisited square.
+0
0
1, 10, 3, 5, 2, 6, 9, 4, 7, 18, 8, 11, 13, 15, 12, 27, 24, 22, 19, 16, 14, 28, 25, 23, 20, 39, 35, 33, 29, 31, 54, 32, 34, 17, 40, 21, 46, 44, 41, 43, 45, 42, 69, 38, 62, 37, 68, 36, 61, 59, 30, 53, 26, 47, 49, 52, 48, 50, 79, 51, 80, 78, 76, 74, 71, 73, 75, 72, 70, 105, 66, 63, 65, 67, 64, 97, 60
OFFSET
1,2
COMMENTS
Board is numbered with the square spiral, with initial square labeled 1:
.
17--16--15--14--13
| |
18 5---4---3 12
| | | |
19 6 1---2 11
| | |
20 7---8---9--10
|
21--22--23--24--25--
.
LINKS
Stephen Emmerson and Geoff Foster, A glossary of fairy chess definitions, British Chess Problem Society, 2018.
EXAMPLE
At step 4 square 5 is visited after which square 2 is the lowest available unvisited square, so a(5) = 2.
PROG
(Python)
def to_n(x, y):
if x == 0 and y == 0:
return 1
m = max(abs(x), abs(y))
inner = (2 * m - 1) ** 2
if x == m and y != -m:
return inner + (m + y)
elif y == m:
return inner + 2 * m + (m - x)
elif x == -m:
return inner + 4 * m + (m - y)
elif y == -m:
return inner + 6 * m + (x + m)
return 1
A = [(2, 2), (-2, 2), (2, -2), (-2, -2)]
D = [(2, 0), (-2, 0), (0, 2), (0, -2)]
N = [(1, 2), (2, 1), (-1, 2), (-2, 1), (1, -2), (2, -1), (-1, -2), (-2, -1)]
moves = N + D + A
visited = set([1])
seq = [1]
current_x, current_y = 0, 0
for _ in range(76):
best_n = float('inf')
next_x, next_y = None, None
for dx, dy in moves:
tx, ty = current_x + dx, current_y + dy
tn = to_n(tx, ty)
if tn not in visited and tn < best_n:
best_n, next_x, next_y = tn, tx, ty
if next_x is None: break
visited.add(best_n)
seq.append(best_n)
current_x, current_y = next_x, next_y
print(seq)
CROSSREFS
Cf. A316667 (Knight), A316884 (Fers), A317467 (Alfil), A399158 (Dabbaba), A000027 (Wazir), A396103 (Spider), A398779 (Alfil + Knight), A398717 (Priest), A398965 (Carpenter), A399160 (Fers + Alfil), A399167 (Leopard), A398194 (Civet), A005408 (Kirin).
KEYWORD
nonn,new
AUTHOR
Jens Ahlström, Aug 26 2026
STATUS
approved
Number of idempotent Latin squares of order n up to simultaneous permutation of rows, columns and symbols.
+0
1
1, 0, 1, 1, 4, 18, 10213, 101310302
OFFSET
1,5
COMMENTS
A Latin square of order n on the symbols 0..n-1 is idempotent if the cell in row i, column i contains i for every i.
Applying a single permutation simultaneously to rows, columns and symbols carries idempotent squares to idempotent squares. This is quasigroup isomorphism, and a(n) counts the resulting equivalence classes.
Isotopy, which applies three independent permutations, does not preserve the main diagonal, so isomorphism rather than isotopy is the appropriate equivalence for idempotent squares.
a(7) was computed by exhaustive classification using canonical forms, then checked by the orbit-stabilizer identity: summing n!/|Aut| over the 10213 classes returns exactly A395689(7) = 49390080.
a(8) was computed from A395689(8) by Burnside's lemma, the number of classes being the average over all permutations of the number of squares each one fixes. Only highly symmetric squares are fixed by a non-identity permutation, so those fixed-point counts are small exhaustive searches.
FORMULA
a(n) = A058175(n, n).
PROG
(Python)
from itertools import permutations
def A395690(n):
def squares():
L = [[i if i == j else -1 for j in range(n)] for i in range(n)]
out = []
def rec(k):
if k == n * n:
out.append(tuple(tuple(r) for r in L))
return
i, j = divmod(k, n)
if L[i][j] != -1:
rec(k + 1)
return
for s in range(n):
if s not in L[i] and all(L[r][j] != s for r in range(n)):
L[i][j] = s
rec(k + 1)
L[i][j] = -1
rec(0)
return out
def canon(sq):
best = None
for p in permutations(range(n)):
q = [0] * n
for i in range(n):
q[p[i]] = i
m = tuple(tuple(p[sq[q[i]][q[j]]] for j in range(n)) for i in range(n))
if best is None or m < best:
best = m
return best
return len({canon(s) for s in squares()})
print([A395690(n) for n in range(1, 6)])
CROSSREFS
Main diagonal of A058175.
KEYWORD
nonn,new
AUTHOR
Chris Segroves, Jul 29 2026
STATUS
approved
Number of idempotent Latin squares of order n up to simultaneous row, column and symbol permutation combined with the six conjugate (parastrophe) operations.
+0
1
1, 0, 1, 1, 2, 8, 1860, 16892994
OFFSET
1,5
COMMENTS
A Latin square of order n on the symbols 0..n-1 is idempotent if the cell in row i, column i contains i for every i.
Regard such a square as its set of n^2 triples (r, c, L(r,c)). The six permutations of the three coordinates give the six conjugates, or parastrophes, of L.
Every conjugate of an idempotent Latin square is again idempotent, because the diagonal triples (i,i,i) are unchanged by any permutation of the coordinates.
Conjugation commutes with relabeling rows, columns and symbols by a single permutation, so the two together give an action of S_n X S_3, and a(n) is the number of orbits.
FORMULA
a(n) = (1/(6*n!)) * Sum_{g in S_n X S_3} F(g), where F(g) is the number of idempotent Latin squares of order n fixed by g; F(identity) = A395689(n).
EXAMPLE
a(5) = 2: the four isomorphism classes of order 5 merge under conjugation into two orbits, one containing three of the classes and one containing the fourth.
PROG
(Python)
from itertools import permutations
def A398445(n):
def squares():
L = [[i if i == j else -1 for j in range(n)] for i in range(n)]
out = []
def rec(k):
if k == n * n:
out.append(tuple(tuple(r) for r in L))
return
i, j = divmod(k, n)
if L[i][j] != -1:
rec(k + 1)
return
for s in range(n):
if s not in L[i] and all(L[r][j] != s for r in range(n)):
L[i][j] = s
rec(k + 1)
L[i][j] = -1
rec(0)
return out
def canon(sq):
best = None
for p in permutations(range(n)):
q = [0] * n
for i in range(n):
q[p[i]] = i
m = tuple(tuple(p[sq[q[i]][q[j]]] for j in range(n)) for i in range(n))
if best is None or m < best:
best = m
return best
def conjugates(sq):
out = []
for rp in permutations(range(3)):
C = [[0] * n for _ in range(n)]
for r in range(n):
for c in range(n):
t = (r, c, sq[r][c])
C[t[rp[0]]][t[rp[1]]] = t[rp[2]]
out.append(tuple(tuple(row) for row in C))
return out
return len({min(canon(c) for c in conjugates(s)) for s in squares()})
print([A398445(n) for n in range(1, 6)])
CROSSREFS
KEYWORD
nonn,new
AUTHOR
Chris Segroves, Jul 29 2026
STATUS
approved
Number of permutations that give the minimum number of comparisons for sorting n elements by binary insertion.
+0
0
1, 1, 2, 2, 8, 24, 48, 48, 384, 2688, 16128, 80640, 322560, 967680, 1935360, 1935360, 30965760, 464486400, 6502809600, 84536524800, 1014438297600, 11158821273600, 111588212736000, 1004293914624000, 8034351316992000, 56240459218944000, 337442755313664000
OFFSET
0,3
COMMENTS
The minimum number of comparisons for sorting n elements by binary insertion is A061168(n).
LINKS
Ekaterina Gavrichenko, Table of n, a(n) for n = 0..100
A. V. Krivilev and E. O. Gavrichenko, Analysis of the Binary Insertion Sort Algorithm and Its Modification Based on Comparison Forests, Programming / Programming and computer software. 2026;1:40-59. (In Russian)
FORMULA
a(n) = a(n-1)*([A035327(n-1)==0]*A152423(n) + [A035327(n-1)!=0]*A035327(n-1)) for n >= 1, a(0) = 1.
a(n) = A395685(n,n-ceiling(log_2(n+1))).
EXAMPLE
For n = 3, there are 6 permutations in total. Among them, a(3) = 2 permutations require the minimum number of comparisons, namely 2, when sorted using binary search: <2,3,1> and <3,2,1>. The remaining permutations, <1,2,3>, <1,3,2>, <2,1,3>, and <3,1,2>, require 3 comparisons. This is the row n = 3 of the triangle in A395685.
MAPLE
T:= proc(n, k) option remember; `if`(n=0, `if`(k=0, 1, 0),
(b-> T(n-1, k-1)*b+T(n-1, k)*(n-b))(2^ceil(log[2](n))-n))
end:
a:= n-> T(n, n-ceil(log[2](n+1))):
seq(a(n), n=0..26); # Alois P. Heinz, Aug 22 2026
MATHEMATICA
A035327[0] := 1; A035327[n_] := 2^Ceiling@Log2@(n + 1) - (n + 1);
A152423[n_] := 2n - 2^Ceiling@Log2@n;
a[0] = 1; a[n_] := a[n] = a[n - 1]*(If[# == 0, A152423[n], #] &)[A035327[n - 1]];
Table[a[n], {n, 0, 26}]
CROSSREFS
Right elements of the triangle in A395685.
KEYWORD
nonn,new
AUTHOR
STATUS
approved
a(n) = number of integers k <= n with g(k)^4 < k, where g(k) is the largest divisor d of k satisfying d <= sqrt(k) (A033676).
+0
0
0, 1, 2, 2, 3, 3, 4, 4, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 8, 8, 8, 9, 10, 10, 10, 11, 11, 11, 12, 12, 13, 13, 13, 14, 14, 14, 15, 16, 16, 16, 17, 17, 18, 18, 18, 19, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 22, 23, 23, 24, 25, 25, 25, 25, 25, 26, 26, 26, 26, 27
OFFSET
1,3
COMMENTS
g(k)^4 < k holds if and only if k has no divisor d with k^(1/4) <= d <= k^(3/4), if and only if A006530(k)^4 > k^3, i.e., the largest prime factor of k exceeds k^(3/4). Proof: if p = A006530(k) > k^(3/4), every divisor of k is either a multiple of p (hence > k^(3/4)) or a divisor of k/p < k^(1/4). Conversely, if p <= k^(3/4) and p >= k^(1/4), then p itself lies in the excluded range; if all prime factors of k are < k^(1/4), multiplying them one at a time yields a divisor in [k^(1/4), k^(1/2)).
a(n) = A000720(n) for 1 <= n <= 15, since every composite k has a divisor in [2, sqrt(k)], so g(k) >= 2 and g(k)^4 >= 16 > k.
This is the m = 4 member of a family: for each integer m >= 3, the condition g(k)^m < k is equivalent to A006530(k)^m > k^(m-1), giving Sum_{c=2..floor(n^(1/m))} (A000720(floor(n/c)) - A000720(c^(m-1))) = a_m(n) - A000720(n). The case m = 3 is A396205. The equivalence fails for m = 2 (e.g., k = 12).
Limiting density: a(n)/n tends to log(4/3) = 0.28768... (follows from the formula together with the Prime Number Theorem).
FORMULA
a(n) = Sum_{k=1..n} [ g(k)^4 < k ], where g(k) = A033676(k) and [] denotes the Iverson bracket.
a(n) = Sum_{k=1..n} [ A006530(k) > k^(3/4) ].
For n >= 1, A000720(n) = a(n) - Sum_{c=2..floor(n^(1/4))} ( A000720(floor(n/c)) - A000720(c^3) ).
a(n) ~ n * log(4/3).
EXAMPLE
g(10) = 2 and 2^4 = 16 is not less than 10, so the indicator at k = 10 is 0; hence a(10) = a(9) = 4. (Note A006530(10) = 5 < 10^(3/4), so 10 is counted in A396205 but not here.)
g(22) = 2 and 2^4 = 16 < 22, so the indicator at k = 22 is 1; hence a(22) = 9.
MATHEMATICA
g[n_] := Max[Select[Divisors[n], #^2 <= n &]];
Accumulate[Table[If[g[k]^4 < k, 1, 0], {k, 1, 71}]]
CROSSREFS
KEYWORD
nonn,easy,new
AUTHOR
Eric Fodge, Aug 21 2026
STATUS
approved
Triangle read by rows: T(n,k) is the number of rooted binary leaf-labeled general galled trees with n leaves and exactly k galls, 0 <= k <= n-1.
+0
0
1, 1, 2, 3, 21, 12, 15, 228, 360, 120, 105, 2805, 8550, 7140, 1680, 945, 39330, 196560, 297360, 166320, 30240, 10395, 623385, 4639320, 11007360, 10735200, 4490640, 665280, 135135, 11055240, 114896880, 392893200, 583783200, 415134720, 138378240, 17297280
OFFSET
1,3
COMMENTS
For fixed k, the asymptotic growth of T(n,k) with increasing n follows T(n,k) ~ (2^(2*k-1) / ((2*k)!*sqrt(Pi))) * n^(2*k - 3/2) * (1/2)^(-n) * n! (eq. 29 of Agranat-Tamir et al., Adv. Appl. Math. 180 (2026), 103131).
LINKS
Lily Agranat-Tamir, Michael Fuchs, Bernhard Gittenberger, Noah A. Rosenberg, and Karthik V. Seetharaman, Combinatorial comparison of general galled trees, time-consistent galled trees, and simplex time-consistent galled trees, Adv. Appl. Math. 180, 103131 (2026).
FORMULA
E.g.f. satisfies A(x,y) = x + (1/2)*A(x,y)^2 + (1/2)*y*A(x,y)*(A(x,y)/(1-A(x,y)))^2 + y*A(x,y)^2/(1-A(x,y)), where T(n,k) = n! * [x^n*y^k] A(x,y) (eq. 26 of Agranat-Tamir et al. (2026)).
EXAMPLE
Triangle begins:
1;
1, 2;
3, 21, 12;
15, 228, 360, 120;
105, 2805, 8550, 7140, 1680;
945, 39330, 196560, 297360, 166320, 30240;
10395, 623385, 4639320, 11007360, 10735200, 4490640, 665280;
135135, 11055240, 114896880, 392893200, 583783200, 415134720, 138378240, 17297280;
CROSSREFS
Columns k=0..1 give A001147, A397580.
Row sums give A328122.
KEYWORD
nonn,tabl,new
AUTHOR
Noah A Rosenberg, Aug 21 2026
STATUS
approved

Search completed in 0.074 seconds