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.

Previous Showing 11-14 of 14 results.

A085891 Maximal product of three numbers with sum n: a(n) = max(r*s*t), n = r+s+t.

Original entry on oeis.org

1, 2, 4, 8, 12, 18, 27, 36, 48, 64, 80, 100, 125, 150, 180, 216, 252, 294, 343, 392, 448, 512, 576, 648, 729, 810, 900, 1000, 1100, 1210, 1331, 1452, 1584, 1728, 1872, 2028, 2197, 2366
Offset: 3

Views

Author

Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jul 10 2003

Keywords

Comments

Apart from offset identical to A006501.

Examples

			a(13) = 80 = 4*4*5, another partition is 5,5,3 giving the product 75.
		

Crossrefs

Cf. A002620.

Formula

Same iteration as in A002620 (in two dimensions) but here in three dimensions: Index 0 (mod 3) terms are cubes and sequence pass from one cube to the next one extending successively each side by one unity: n^3, n^2(n+1), n(n+1)^2, (n+1)^3. - Alexandre Wajnberg, Dec 29 2005
From Chai Wah Wu, Oct 22 2018: (Start)
a(n) = 2*a(n-1) - a(n-2) + 2*a(n-3) - 4*a(n-4) + 2*a(n-5) - a(n-6) + 2*a(n-7) - a(n-8) for n > 10.
G.f.: x^3*(x^2 + 1)/((x - 1)^4*(x^2 + x + 1)^2). (End)

A210433 Natural numbers k such that floor(v) * ceiling(v)^2 = k, where v = k^(1/3).

Original entry on oeis.org

0, 1, 4, 8, 18, 27, 48, 64, 100, 125, 180, 216, 294, 343, 448, 512, 648, 729, 900, 1000, 1210, 1331, 1584, 1728, 2028, 2197, 2548, 2744, 3150, 3375, 3840, 4096, 4624, 4913, 5508, 5832, 6498, 6859, 7600, 8000, 8820, 9261, 10164, 10648, 11638, 12167, 13248
Offset: 1

Views

Author

John W. Layman, Mar 21 2012

Keywords

Comments

a(n) is the number of undirected rook moves on a n X n chessboard, considered up to rotations and reflections. - Hilko Koning, Aug 09 2025

Crossrefs

Programs

  • PARI
    isok(k) = {cbr = sqrtnint(k, 3); if (cbr^3 == k, 1, cbr*(cbr+1)^2 == k);} \\ Michel Marcus, Jul 08 2014

Formula

It appears that a(n) = n^3/8 if n is even, a(n) = (n-1)*(n+1)^2/8 if n is odd.
Empirical g.f.: x^2*(x^3+x^2+3*x+1) / ((x-1)^4*(x+1)^3). - Colin Barker, Jul 08 2014

A347221 Square array T(s,t), s >= 0, t >= 0, read by downward antidiagonals: T(s,t) is the number of nonnegative ordered triples (a,b,c) satisfying a+b+c <= s and a*b*c <= t.

Original entry on oeis.org

1, 1, 4, 1, 4, 10, 1, 4, 10, 19, 1, 4, 10, 20, 31, 1, 4, 10, 20, 32, 46, 1, 4, 10, 20, 35, 47, 64, 1, 4, 10, 20, 35, 50, 65, 85, 1, 4, 10, 20, 35, 53, 68, 86, 109, 1, 4, 10, 20, 35, 56, 71, 89, 110, 136, 1, 4, 10, 20, 35, 56, 77, 92, 113, 137, 166
Offset: 0

Views

Author

Vo Hoang Anh, Aug 24 2021

Keywords

Comments

Based on the fact that there are only O(sqrt(t)) distinct integers in the set S = {floor(t/1), floor(t/2), ..., floor(t/t)} and using combinatorics by fixing the number (a) as minimum, we can easily calculate this function in O(sigma(a=1->t^(1/3)) (log_2(floor(t/a)) + floor(t/a)^(1/2))).
The complexity can be reduced to O(sigma(a=1->t^(1/3)) (log_2(floor(t/a)) + floor(t/a)^(1/3))) = O(t^(5/9)).
There are many methods that take O(t^(5/9)) steps, but not all are effective; some of them have lower complexity but use too many division and multiplication steps. Some of them use precalculation and caching to speed things up, but are not as effective as the division-free algorithm that Richard Sladkey described.
It is known that for each (a), we only need a For loop of at most K = min((s-a)/2,sqrt(t/a)) iterations. If we can somehow calculate this in O(K^(1/2)) or even O(K^(1/3)) for each (a) then it is possible to calculate in O(t^(1/3)).
We can also calculate T(s, t) in O(t^(1/3)) if this function can be calculated fast enough: g(l, r, a, t) = Sum_{p = l..r} floor(t/(a*p)) for all a such that 1 <= a <= t^(1/3).
When s is small, we can try not fixing a as minimum and get O(s * t^(1/3)) complexity. You can also make the complexity not depend on O(f(t)) and get O(s^2) complexity and this can be further improved.
When s = t, the values on the main diagonal, T(s, s), are approximately 1.5*s^2 (tested with 10^7 numbers s <= 10^9 using a power regression algorithm).
The current best known algorithm O(t^(5/9)) (with modulo for large result) can run for s <= 10^18 and t <= 10^12 under 1 second and constant memory (820ms on GNU C++17 7.3.0 codeforces and 310ms on C++14 ideone).
As far as I know, the best complexity in theory is O(t^(2/3-c+o(1))) for small c > 0. Computing this table faster is as hard as the prime counting function and/or the divisor summatory function.

Examples

			T(2,0) = 10: (0,0,0), (0,0,1), (0,0,2), (0,1,0), (0,1,1), (0,1,2), (0,2,0), (1,0,0), (1,0,1), (2,0,0).
T(0,1) = 1: (0,0,0).
Array T(s,t) begins:
    1,   1,   1,   1,   1,   1,   1,   1,   1, ...
    4,   4,   4,   4,   4,   4,   4,   4,   4, ...
   10,  10,  10,  10,  10,  10,  10,  10,  10, ...
   19,  20,  20,  20,  20,  20,  20,  20,  20, ...
   31,  32,  35,  35,  35,  35,  35,  35,  35, ...
   46,  47,  50,  53,  56,  56,  56,  56,  56, ...
   64,  65,  68,  71,  77,  77,  83,  83,  84, ...
   85,  86,  89,  92,  98, 101, 107, 107, 114, ...
  109, 110, 113, 116, 122, 125, 134, 134, 141, ...
		

Crossrefs

Cf. A005448 (column 0), A347252 (main diagonal).

Programs

  • C
    int T(int s, int t) { int cnt = 0; for (int a = 0; a <= s; ++a) for (int b = 0; b <= s - a; ++b) for (int c = 0; c <= s - a - b; ++c) if (a * b * c <= t) ++cnt; return cnt; }
    
  • Mathematica
    Table[Function[s, Sum[Boole[a b c <= t], {a, 0, s}, {b, 0, s - a}, {c, 0, s - a - b}]][n - t], {n, 0, 10}, {t, n, 0, -1}] // Flatten (* Michael De Vlieger, Aug 25 2021 *)
  • PARI
    T(s, t) = sum(a=0, s, sum(b=0, s-a, sum(c=0, s-a-b, a*b*c <= t))); \\ Michel Marcus, Aug 25 2021

Formula

T(s,t) = Sum_{a=0..s} Sum_{b=0..s-a} Sum_{c=0..s-a-b} [a*b*c<=t], where [] is the Iverson bracket.
T(n, n) = A347252(n).
T(0, t) = A000012(t).
T(s, 0) = A005448(s).
T(s, A006501(s) + x) = A000292(s + 1), for all x >= 0.
This leads to: T(s, A000578(s) + x) = A000292(s + 1), for all x >= 0.
T(s, t) = (3s^2 + 3s) / 2 + A061201(t) + 1, for s > t + 1 > 1.
T(s, 1) = (3s^2 + 3s) / 2 + 2 = A139482(s + 2), for s > t + 1 > 1.
T(s, 2) = (3s^2 + 3s) / 2 + 5 = A124011(s), for s > t + 1 > 2.
T(s, t) = T(s + k, t) - 3*k*s - 3*A000217(k), for s > t + 1 > 5.
T(t + 2 - k, t) = T(t + 2, t) - 3*k*s - 6k + 3*A000217(k), for 0 <= 2k <= (t-1), for t > 4.
When n > 4, T(n, n) = T(n + 2, n) - 6n - 15 = A347252(n) = Sum_{k=1..n} floor(n/k)*A000005(k) + (3n^2 + 3n - 10) / 2 = A061201(n) + (3n^2 + 3n - 10) / 2 = (1/2)n(6g^2 + (6g-2)log(n) - 6g - 6g1 + log^2(n) + 2) + (3n^2)/2 + (3n)/2 - 5 + O(sqrt(n)) where g is the Euler-Mascheroni number and g1 is the first Stieltjes constant.

A356639 Number of integer sequences b with b(1) = 1, b(m) > 0 and b(m+1) - b(m) > 0, of length n which transform under the map S into a nonnegative integer sequence. The transform c = S(b) is defined by c(m) = Product_{k=1..m} b(k) / Product_{k=2..m} (b(k) - b(k-1)).

Original entry on oeis.org

1, 1, 3, 17, 155, 2677, 73327, 3578339, 329652351
Offset: 1

Views

Author

Thomas Scheuerle, Aug 19 2022

Keywords

Comments

This sequence can be calculated by a recursive algorithm:
Let B1 be an array of finite length, the "1" denotes that it is the first generation. Let B1' be the reversed version of B1. Let C be the element-wise product C = B1 * B1'. Then B2 is a concatenation of taking each element of B1 and add all divisors of the corresponding element in C. If we start with B1 = {1} then we get this sequence of arrays: B2 = {2}, B3 = {3, 4, 6}, ... . a(n) is the length of the array Bn. In short the length of Bn+1 and so a(n+1) is the sum over A000005(Bn * Bn').
The transform used in the definition of this sequence is its own inverse, so if c = S(b) then b = S(c). The eigensequence is 2^n = S(2^n).
There exist some transformation pairs of infinite sequences in the database:
A026549 <--> A038754; A100071 <--> A001405; A058295 <--> A------;
A111286 <--> A098011; A093968 <--> A205825; A166447 <--> A------;
A079352 <--> A------; A082458 <--> A------; A008233 <--> A264635;
A138278 <--> A------; A006501 <--> A264557; A336496 <--> A------;
A019464 <--> A------; A062112 <--> A------; A171647 <--> A359039;
A279312 <--> A------; A031923 <--> A------.
These transformation pairs are conjectured:
A137326 <--> A------; A066332 <--> A300902; A208147 <--> A308546;
A057895 <--> A------; A349080 <--> A------; A019442 <--> A------;
A349079 <--> A------.
("A------" means not yet in the database.)
Some sequences in the lists above may need offset adjustment to force a beginning with 1,2,... in the transformation.
If we allowed signed rational numbers, further interesting transformation pairs could be observed. For example, 1/n will transform into factorials with alternating sign. 2^(-n) transforms into ones with alternating sign and 1/A000045(n) into A000045 with alternating sign.

Examples

			a(4) = 17. The 17 transformation pairs of length 4 are:
  {1, 2, 3, 4}  = S({1, 2, 6, 24}).
  {1, 2, 3, 5}  = S({1, 2, 6, 15}).
  {1, 2, 3, 6}  = S({1, 2, 6, 12}).
  {1, 2, 3, 9}  = S({1, 2, 6, 9}).
  {1, 2, 3, 12} = S({1, 2, 6, 8}).
  {1, 2, 3, 21} = S({1, 2, 6, 7}).
  {1, 2, 4, 5}  = S({1, 2, 4, 20}).
  {1, 2, 4, 6}  = S({1, 2, 4, 12}).
  {1, 2, 4, 8}  = S({1, 2, 4, 8}).
  {1, 2, 4, 12} = S({1, 2, 4, 6}).
  {1, 2, 4, 20} = S({1, 2, 4, 5}).
  {1, 2, 6, 7}  = S({1, 2, 3, 21}).
  {1, 2, 6, 8}  = S({1, 2, 3, 12}).
  {1, 2, 6, 9}  = S({1, 2, 3, 9}).
  {1, 2, 6, 12} = S({1, 2, 3, 6}).
  {1, 2, 6, 15} = S({1, 2, 3, 5}).
  {1, 2, 6, 24} = S({1, 2, 3, 4}).
b(1) = 1 by definition, b(2) = 1+1 as 1 has only 1 as divisor.
a(3) = A000005(b(2)*b(2)) = 3.
The divisors of b(2) are 1,2,4. So b(3) can be b(2)+1, b(2)+2 and b(2)+4.
a(4) = A000005((b(2)+1)*(b(2)+4)) + A000005((b(2)+2)*(b(2)+2)) + A000005((b(2)+4)*(b(2)+1)) = 17.
		

Crossrefs

Previous Showing 11-14 of 14 results.