login
Search: keyword:new
     Sort: relevance | references | number | modified | created      Format: long | short | data
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
Triangle read by rows: T(n,k) is the number of rooted binary unlabeled general galled trees with n leaves and exactly k galls, 0 <= k <= n-1.
+0
0
1, 1, 1, 1, 5, 2, 2, 16, 20, 5, 3, 49, 113, 76, 14, 6, 140, 526, 634, 289, 42, 11, 392, 2143, 4030, 3198, 1098, 132, 23, 1072, 8076, 21604, 26024, 15217, 4189, 429, 46, 2898, 28667, 103267, 173886, 151509, 69808, 16028, 1430, 98, 7744, 97498, 453712
OFFSET
1,5
COMMENTS
For fixed k, the asymptotic growth of T(n,k) with increasing n follows T(n,k) ~ (2^(2*k-1) / ((2*k)!*g^(4*k-1)*sqrt(Pi))) * n^(2*k - 3/2) * r^(-n), where g=1.13003... and r=0.40270... (eq. 16 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). See Table 1.
FORMULA
G.f. satisfies A(x,y) = x + (1/2)*A(x,y)^2 + (1/2)*A(x^2,y^2) + (1/2)*y*A(x,y)*( (A(x,y)/(1-A(x,y)))^2 + A(x^2,y^2)/(1-A(x^2,y^2)) ) + y*A(x,y)^2/(1-A(x,y)) (eq. 11 of Agranat-Tamir et al. (2026)).
EXAMPLE
Triangle begins:
1;
1, 1;
1, 5, 2;
2, 16, 20, 5;
3, 49, 113, 76, 14;
6, 140, 526, 634, 289, 42;
11, 392, 2143, 4030, 3198, 1098, 132;
23, 1072, 8076, 21604, 26024, 15217, 4189, 429;
46, 2898, 28667, 103267, 173886, 151509, 69808, 16028, 1430;
CROSSREFS
Columns k=0..1 give A001190, A395661.
Row sums give A396352.
KEYWORD
nonn,tabl,new
AUTHOR
Noah A Rosenberg, Aug 21 2026
STATUS
approved
a(n) is the least x + y + z such that (x*y*z) / (x + y + z) = n, for positive integers x,y,z.
+0
0
6, 8, 9, 12, 12, 14, 15, 15, 16, 18, 20, 18, 24, 20, 21, 21, 28, 24, 30, 24, 24, 30, 35, 27, 30, 28, 27, 30, 42, 32, 45, 30, 30, 42, 32, 32, 60, 36, 33, 33, 56, 38, 60, 35, 36, 42, 63, 36, 42, 40, 39, 42, 70, 40, 39, 39, 42, 66, 77, 42, 96, 52, 44, 42, 42, 46, 90, 44, 48, 48
OFFSET
1,1
COMMENTS
The two variable case of this is less interesting, and seems to be the sequence a(n) = 4 * n (A008586) based on empirical observation.
LINKS
FORMULA
a(n) >= 3 * sqrt(3 * n). If x + y + z = q for some constant q < 3 * sqrt(3 * n), then (x * y * z) / (x + y + z) = n if and only if x * y * z = qn. Given the fact that x + y + z = q for some constant q, x * y * z is maximized when x = y = z. So since q < 3 * sqrt(3 * n), x, y, z < sqrt(3 * n), but then (x * y * z) / (x + y + z) < (3n * sqrt(3 * n)) / (3 * sqrt(3 * n)) = n, so x, y, and z are not a viable solution. Thus, there exists no viable solutions when x + y + z < 3 * sqrt(3 * n).
A corollary of this is that when sqrt(3 * n) is an integer, then a(n) = 3 * sqrt(3 * n). In this case, when x = y = z = sqrt(3 * n), (x * y * z) / (x + y + z) = (3n * sqrt(3 * n)) / (3 * sqrt(3 * n)) = n.
a(n) <= 2n + 4, since for all n, if x = 2, y = n, and z = n + 2, (x * y * z) / (x + y + z) = (2 * n * (n + 2)) / (2 + n + (n + 2)) = n, and x + y + z = 2 + n + (n + 2) = 2n + 4. So there always exists a valid solution where x + y + z = 2n + 4. This bound is exactly achieved when n = 1, 2, and 4.
EXAMPLE
If x = 3, y = 4, and z = 7, then (x * y * z) / (x + y + z) = 84 / 14 = 6. We can check that x + y + z = 14 is less than (or at least as good as) any other valid solution. So, a(6) = 14.
MATHEMATICA
a[n_] := Minimize[x + y + z, x*y*z/(x + y + z) == n && x > 0 && y >= x && z >= y, {x, y, z}, Integers][[1]] (* Hugo Pfoertner, Aug 20 2026 *)
PROG
(Python)
import math
def a(i):
q = math.isqrt(27 * i)
while True:
for a in range(1, q + 1):
for b in range(a, q + 1 - a):
c = q - a - b
if c >= b:
if (a * b * c) / (a + b + c) == i:
return q
q = q + 1
print([a(n) for n in range(1, 71)])
(PARI) a(n) = for(m=1, oo, for(x=1, m\3, for(y=x, (m-x)\2, my(z=m-x-y); if(x*y*z == m*n, return(m)) ))) \\ Andrew Howroyd, Aug 11 2026
KEYWORD
nonn,easy,new
AUTHOR
Max Z. Scialabba, Aug 11 2026
STATUS
approved
Decimal expansion of (Pi/32) * (1 + log(2)).
+0
0
1, 6, 6, 2, 2, 4, 3, 3, 5, 7, 4, 6, 6, 6, 8, 6, 0, 5, 2, 8, 0, 1, 0, 4, 1, 3, 3, 7, 9, 7, 4, 0, 9, 9, 0, 0, 9, 8, 5, 4, 9, 2, 2, 8, 4, 3, 6, 7, 0, 1, 2, 2, 5, 3, 6, 0, 3, 1, 4, 8, 1, 2, 0, 1, 7, 1, 9, 4, 1, 4, 0, 4, 8, 5, 8, 2, 1, 7, 2, 1, 8, 2, 8, 3, 0, 7, 3, 8, 6, 8, 3, 4, 2, 2, 7, 4, 3, 7, 7, 9, 0, 7, 4, 9, 2
OFFSET
0,2
COMMENTS
The term (1/k^(s-1))/(s-1), here evaluated at k = 2, is found in zeta(s) = lim_{k->oo} (Sum_{n=1..k} 1/n^s+1/(s-1)/k^(s-1)) which is valid for Re(s) > 0. This entry is the Volchkov integral of that term. For the Volchkov integral of 1/n^s evaluated at n = 2 see A336308.
FORMULA
Equals Integral_{t>=0} (1 - 12*t^2)/((1 + 4*t^2)^3) * Integral_{sigma>=1/2} Re(IndefiniteIntegral) dsigma dt where IndefiniteIntegral = Integral_{s} (1/2^(s-1))/(s-1) ds and s has been substituted with s = sigma + i*t.
EXAMPLE
0.1662243357466686052801041337974099...
MATHEMATICA
RealDigits[N[1/32 \[Pi] (1 + Log[2]), 105]][[1]]
CROSSREFS
KEYWORD
nonn,cons,new
AUTHOR
Mats Granvik, Aug 20 2026
STATUS
approved
Numbers m such that lambda(2^m - 1) + 1 is prime, where the Carmichael lambda function is A002322.
+0
0
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 31, 32, 34, 37, 38, 39, 40, 45, 48, 49, 50, 51, 52, 54, 56, 57, 61, 62, 65, 66, 68, 72, 77, 81, 83, 85, 87, 89, 107, 122, 127, 131, 133, 138, 179, 182, 219, 234, 235, 254, 310, 350, 376, 429, 456, 521, 534
OFFSET
1,2
COMMENTS
Numbers m such that A387107(m) + 1 is prime. Are there infinitely many such m?
It contains, among others, all Mersenne primes (A000668) and all Fermat primes (A019434).
In the above sequence, some prime repeat in pairs. Are there only finitely many such doubles?
LINKS
MATHEMATICA
q[m_] := PrimeQ[CarmichaelLambda[2^m-1] + 1]; Select[Range[100], q] (* Amiram Eldar, Aug 21 2026 *)
CROSSREFS
Cf. A000043 (subsequence), A000225, A000668, A002322 (lambda), A019434, A092506, A387107 (lambda(2^n-1)).
KEYWORD
nonn,new
AUTHOR
Thomas Ordowski, Aug 21 2026
EXTENSIONS
More terms from Daniel Suteu via SeqFan, Aug 12 2026
STATUS
approved
Nonnegative integers k satisfying cos(k) < cos(k+1) < cos(k+2) < cos(k+3) < cos(k+4) > cos(k+5).
+0
0
9, 53, 97, 141, 210, 254, 298, 342, 386, 430, 474, 518, 543, 587, 631, 675, 719, 763, 807, 851, 920, 964, 1008, 1052, 1096, 1140, 1184, 1228, 1253, 1297, 1341, 1385, 1429, 1473, 1517, 1561, 1630, 1674, 1718, 1762, 1806, 1850, 1894, 1938, 1963, 2007, 2051
OFFSET
1,1
COMMENTS
The sequences A026311, A246300, A246301, A246302, A390937 partition the nonnegative integers.
EXAMPLE
cos(9) ~ -0.91113 < cos(10) ~ -0.839072 < cos(11) ~ 0.0044257 < cos(12) ~ 0.843854 < cos(13) ~ 0.907447 > cos(14) ~ 0.136737, so 9 is in this sequence.
MATHEMATICA
z = 2500; f[x_] := f[x] = Cos[x]; t = Range[0, z];
Select[t, f[#] < f[# + 1] < f[# + 2] < f[# + 3] < f[# + 4] > f[# + 5] &]
CROSSREFS
KEYWORD
nonn,new
AUTHOR
Clark Kimberling, Aug 16 2026
EXTENSIONS
easy
STATUS
approved
Numbers divisible by the square of their second smallest distinct prime factor.
+0
0
18, 36, 50, 54, 72, 75, 90, 98, 100, 108, 126, 144, 147, 162, 180, 196, 198, 200, 216, 225, 234, 242, 245, 250, 252, 270, 288, 306, 324, 338, 342, 350, 360, 363, 375, 378, 392, 396, 400, 414, 432, 441, 450, 468, 484, 486, 500, 504, 507, 522, 525, 540, 550, 558, 576, 578, 594
OFFSET
1,1
LINKS
FORMULA
{a(n)} = {k : A351563(k) >= 2} = {k in A024619 : A124010(k,2) >= 2}.
MATHEMATICA
s = Select[Range[2, 600], Not@*PrimePowerQ]; Select[s, Divisible[#, FactorInteger[#][[2, 1]]^2] &] (* Michael De Vlieger, Aug 26 2026 *)
CROSSREFS
Subsequence of A375397.
KEYWORD
nonn,easy,new
AUTHOR
Peter Munn, Aug 26 2026
STATUS
approved
Number of transitive relations on n unlabeled points with no isolated point.
+0
0
1, 1, 6, 31, 203, 1653, 17156, 227844, 3898213, 86180547, 2465304381, 91255018866, 4367275471700, 269878126138244, 21501475676971734, 2205100489687717969
OFFSET
0,3
COMMENTS
Equivalently, the number of arrow-type semigroupoids with n objects and no isolated object, up to isomorphism, in the sense of Egri-Nagy and Nehaniv (2025).
LINKS
Gunnar Brinkmann and Brendan D. McKay, Counting unlabelled topologies and transitive relations, J. Int. Seq. 8 (2005), Art. 05.2.1.
Attila Egri-Nagy and Chrystopher L. Nehaniv, Computational Exploration of Finite Semigroupoids, arXiv:2509.00837 [cs.FL], 2025.
EXAMPLE
a(2) = 6: on two unlabeled points the transitive relations with no isolated point are a->b; a->b with a loop on a; a->b with a loop on b; the two loops a->a and b->b with no arrow between them; a->b with loops on both points; and the complete relation a->b, b->a with loops on both.
CROSSREFS
Row sums of A399030.
First differences of A091073.
Cf. A296105 (connected), A000112, A001930, A079265, A006905.
KEYWORD
nonn,more,new
AUTHOR
Alikhan Sultanbek, Aug 26 2026
STATUS
approved

Search completed in 0.071 seconds

Morty Proxy This is a proxified and sanitized view of the page, visit original site.