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.

User: David Lovler

David Lovler's wiki page.

David Lovler has authored 30 sequences. Here are the ten most recent ones:

A357734 Array T(n,k), read by descending antidiagonals, whose rows are numbers congruent to p or q mod r, with 0 <= p < q < r, sorted by r, then p, then q.

Original entry on oeis.org

0, 1, 0, 2, 1, 0, 3, 3, 2, 1, 4, 4, 3, 2, 0, 5, 6, 5, 4, 1, 0, 6, 7, 6, 5, 4, 2, 0, 7, 9, 8, 7, 5, 4, 3, 1, 8, 10, 9, 8, 8, 6, 4, 2, 1, 9, 12, 11, 10, 9, 8, 7, 5, 3, 2, 10, 13, 12, 11, 12, 10, 8, 6, 5, 3, 0, 11, 15, 14, 13, 13, 12, 11, 9, 7, 6, 1, 0
Offset: 1

Author

David Lovler, Oct 11 2022

Keywords

Comments

When r is even, there are r/2 rows for which q - p = r/2. The definition reduces to "numbers congruent to p mod r/2" for these rows. They are kept here for the sake of completeness.
The coefficients in the a(k) formula match those in the e.g.f. If we start with the a(k) formula we get the constant of the e.g.f. by setting a(0)=0.
The sum of two rows with the same r is a row. In fact (using nonnegative integers), any linear combination of rows with the same r yields a row. The same linear combination applied to p, q and r for the rows gives P, Q and R for the combined row. The linear combination also links the steps for the rows with the steps for the combined row.

Examples

			T(n,k) begins
0, 1, 2, 3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14   congruent to 0 or 1 mod 2
0, 1, 3, 4,  6,  7,  9, 10, 12, 13, 15, 16, 18, 19, 21   congruent to 0 or 1 mod 3
0, 2, 3, 5,  6,  8,  9, 11, 12, 14, 15, 17, 18, 20, 21   congruent to 0 or 2 mod 3
1, 2, 4, 5,  7,  8, 10, 11, 13, 14, 16, 17, 19, 20, 22   congruent to 1 or 2 mod 3
0, 1, 4, 5,  8,  9, 12, 13, 16, 17, 20, 21, 24, 25, 28   congruent to 0 or 1 mod 4
0, 2, 4, 6,  8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28   congruent to 0 or 2 mod 4
0, 3, 4, 7,  8, 11, 12, 15, 16, 19, 20, 23, 24, 27, 28   congruent to 0 or 3 mod 4
1, 2, 5, 6,  9, 10, 13, 14, 17, 18, 21, 22, 25, 26, 29   congruent to 1 or 2 mod 4
1, 3, 5, 7,  9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29   congruent to 1 or 3 mod 4
2, 3, 6, 7, 10, 11, 14, 15, 18, 19, 22, 23, 26, 27, 30   congruent to 2 or 3 mod 4
Row 84 (A047319) with p,q,r = 5,6,7 begins
  5, 6, 12, 13, 19, 20, 26, 27, 33, 34, 40, 41, 47, 48, 54, 55, 61, 62, 68, 69.
  With offset 1 this row has the following formulas.
  a(k) = (2*r*k + 2*p + 2*q - 3*r - (2*p - 2*q + r)*(-1)^k)/4
       = (2*7*k + 2*5 + 2*6 - 3*7 - (2*5 - 2*6 + 7)*(-1)^k)/4
       = (14*k + 1 - 5*(-1)^k)/4.
  G.f.: x*(p + (q - p)*x + (r - q)*x^2) / ((1 + x)*(x - 1)^2)
      = x*(5 + (6 - 5)*x + (7 - 6)*x^2) / ((1 + x)*(x - 1)^2)
      = x*(5 + x + x^2) / ((1 + x)*(x - 1)^2).
  E.g.f.: r - q + ((2*r*x + 2*p + 2*q - 3*r)*exp(x) - (2*p - 2*q + r)*exp(-x))/4
        = 7 - 6 + ((2*7*x + 2*5 + 2*6 - 3*7)*exp(x) - (2*5 - 2*6 + 7)*exp(-x))/4
        = 1 + ((14*x + 1)*exp(x) - 5*exp(-x))/4.
Example of a linear combination of rows.
  For r=3, the rows are
  0, 1, 3, 4, 6, 7,  9, 10, 12, 13, 15   congruent to 0 or 1 mod 3   steps [1, 2]
  0, 2, 3, 5, 6, 8,  9, 11, 12, 14, 15   congruent to 0 or 2 mod 3   steps [2, 1]
  1, 2, 4, 5, 7, 8, 10, 11, 13, 14, 16   congruent to 1 or 2 mod 3   steps [1, 2].
  L={2,3,7} applied to the above three rows yields
  7, 22, 43, 58, 79, 94, 115, 130, 151, 166, 187   congruent to 7 or 22 mod 36.
  L for steps. 2*[1,2] + 3*[2,1] + 7*[1,2] = [2,4] + [6,3] + [7,14] = [15,21].
		

Crossrefs

The first column is A144629.

Programs

  • PARI
    {for(r=2,10,for(p=0,r-2,for(q=p+1,r-1,print1(p," or ",q," mod ",r,"    ");
    forstep(i=p,10*r,[q-p,r-q+p],print1(i", "));print)))}
    
  • PARI
    M=[0..19];
    {for(r=3,6,for(p=0,r-2,for(q=p+1,r-1,newrow=List();
    for(k=1,20,listput(newrow,(2*r*k + 2*p + 2*q - 3*r - (2*p - 2*q + r)*(-1)^k)/4;));
    M=matconcat([M;Vec(newrow)]))));
    T(n,k)=M[n,k];}
    M

Formula

T(n,k) = T(n,k-1) + T(n,k-2) - T(n,k-3), k > 3.
Each row has the following formulas given p,q,r for the row.
If the row offsets are 1,
a(k) = (2*r*k + 2*p + 2*q - 3*r - (2*p - 2*q + r)*(-1)^k)/4.
G.f.: x*(p + (q - p)*x + (r - q)*x^2) / ((1 + x)*(x - 1)^2).
E.g.f.: r - q + ((2*r*x + 2*p + 2*q - 3*r)*exp(x) - (2*p - 2*q + r)*exp(-x))/4.
If the row offsets are 0,
a(k) = (2*r*k + 2*p + 2*q - r + (2*p - 2*q + r)*(-1)^k)/4.
G.f.: (p + (q - p)*x + (r - q)*x^2) / ((1 + x)*(x - 1)^2).
E.g.f.: ((2*r*x + 2*p + 2*q - r)*exp(x) + (2*p - 2*q + r)*exp(-x))/4.

A354596 Array T(n,k) = k^2 + (2n-4)*floor(k/2)^2, n >= 0, k >= 0, read by descending antidiagonals.

Original entry on oeis.org

0, 1, 0, 0, 1, 0, 5, 2, 1, 0, 0, 7, 4, 1, 0, 9, 8, 9, 6, 1, 0, 0, 17, 16, 11, 8, 1, 0, 13, 18, 25, 24, 13, 10, 1, 0, 0, 31, 36, 33, 32, 15, 12, 1, 0, 17, 32, 49, 54, 41, 40, 17, 14, 1, 0, 0, 49, 64, 67, 72, 49, 48, 19, 16, 1, 0, 21, 50, 81, 96, 85, 90, 57, 56, 21, 18, 1, 0
Offset: 0

Author

David Lovler, Jun 01 2022

Keywords

Comments

Column k is an arithmetic progression with difference 2*A008794(k).
Odd rows of A133728 triangle are contained in row 0.
For i = 0 through 4, row i is 0 and the diagonal of A319929, A322630 = A213037, A003991, A322744, and A327259, respectively. In general, row i is 0 and the diagonal of array U(i;n,k) described in A327263.

Examples

			T(n,k) begins:
  0,   1,   0,   5,   0,   9,   0,  13, ...
  0,   1,   2,   7,   8,  17,  18,  31, ...
  0,   1,   4,   9,  16,  25,  36,  49, ...
  0,   1,   6,  11,  24,  33,  54,  67, ...
  0,   1,   8,  13,  32,  41,  72,  85, ...
  0,   1,  10,  15,  40,  49,  90, 103, ...
  0,   1,  12,  17,  48,  57, 108, 121, ...
  ...
		

Programs

  • Mathematica
    T[n_, k_] := k^2 + (2*n - 4)*Floor[k/2]^2; Table[T[n - k, k], {n, 0, 10}, {k, n, 0, -1}] // Flatten (* Amiram Eldar, Jun 20 2022 *)
  • PARI
    T(n,k) = k^2 + (2*n-4)*(k\2)^2;

Formula

T(n,k) = U(n;k,k) (see A327263).
For each row, T(n,k) = T(n,k-1) + 2*T(n,k-2) - 2*T(n,k-3) - T(n,k-4) + T(n,k-5), k >= 5.
G.f. for row n: x*(1 + (2*n-1)*x + 3*x^2 + (2*n-3)*x^3)/((1 - x)^3*(1 + x)^2). When n = 2, this reduces to x*(1 + x)/(1 - x)^3.
E.g.f. for row n: (((4-n)*x + n*x^2)*cosh(x) + (n-2 + n*x + n*x^2)*sinh(x))/2. When n = 2, this reduces to (x + x^2)*cosh(x) + (x + x^2)*sinh(x) = (x + x^2)*exp(x).

A354595 a(n) = n^2 + 4*floor(n/2)^2.

Original entry on oeis.org

0, 1, 8, 13, 32, 41, 72, 85, 128, 145, 200, 221, 288, 313, 392, 421, 512, 545, 648, 685, 800, 841, 968, 1013, 1152, 1201, 1352, 1405, 1568, 1625, 1800, 1861, 2048, 2113, 2312, 2381, 2592, 2665, 2888, 2965, 3200, 3281, 3528, 3613, 3872
Offset: 0

Author

David Lovler, Jun 01 2022

Keywords

Comments

The first bisection is A139098, the second bisection is A102083.

Crossrefs

Programs

  • Mathematica
    a[n_] := n^2 + 4 Floor[n/2]^2
    Table[a[n], {n, 0, 90}]    (* A354595 *)
    LinearRecurrence[{1, 2, -2, -1, 1}, {0, 1, 8, 13, 32}, 60]
  • PARI
    a(n) = n^2 + 4*(n\2)^2;

Formula

a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5), n >= 5.
a(n) = A000290(n) + 4*A008794(n).
G.f.: x*(1 + 7*x + 3*x^2 + 5*x^3)/((1 - x)^3*(1 + x)^2).
E.g.f.: 2*x^2*cosh(x) + (1 + 2*x + 2*x^2)*sinh(x). - Stefano Spezia, Jun 07 2022

A354594 a(n) = n^2 + 2*floor(n/2)^2.

Original entry on oeis.org

0, 1, 6, 11, 24, 33, 54, 67, 96, 113, 150, 171, 216, 241, 294, 323, 384, 417, 486, 523, 600, 641, 726, 771, 864, 913, 1014, 1067, 1176, 1233, 1350, 1411, 1536, 1601, 1734, 1803, 1944, 2017, 2166, 2243, 2400, 2481, 2646, 2731, 2904
Offset: 0

Author

David Lovler, Jun 01 2022

Keywords

Comments

The first bisection is A033581, the second bisection is A080859. - Bernard Schott, Jun 07 2022

Crossrefs

Programs

  • Mathematica
    a[n_] := n^2 + 2 Floor[n/2]^2
    Table[a[n], {n, 0, 90}]    (* A354594 *)
    LinearRecurrence[{1, 2, -2, -1, 1}, {0, 1, 6, 11, 24}, 60]
  • PARI
    a(n) = n^2 + 2*(n\2)^2;

Formula

a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5), n >= 5.
a(n) = A000290(n) + 2*A008794(n).
G.f.: x*(1 + 5*x + 3*x^2 + 3*x^3)/((1 - x)^3*(1 + x)^2).
E.g.f.: (x*(1 + 3*x)*cosh(x) + (1 + 3*x + 3*x^2)*sinh(x))/2. - Stefano Spezia, Jun 07 2022

A351986 Four-column table read by rows, giving quadruples of integers [w,x,y,z] such that y^2 - y - x*z = 0 and x^2 = w*y with w*y != 0 and y != 1, sorted by the absolute value of y with the negatives first, then by x in ascending order.

Original entry on oeis.org

-4, -2, -1, -1, -1, -1, -1, -2, -1, 1, -1, 2, -4, 2, -1, 1, -18, -6, -2, -1, -2, -2, -2, -3, -2, 2, -2, 3, -18, 6, -2, 1, 2, -2, 2, -1, 2, 2, 2, 1, -48, -12, -3, -1, -12, -6, -3, -2, -3, -3, -3, -4, -3, 3, -3, 4, -12, 6, -3, 2, -48, 12, -3, 1, 12, -6, 3, -1, 3, -3, 3, -2, 3, 3, 3, 2, 12, 6, 3, 1
Offset: 1

Author

David Lovler, Feb 27 2022

Keywords

Comments

When [w,x,y,z] is a row, f(a,b,c) = w*a*b*c + x*(a*b + a*c + b*c) + y*(a+b+c) + z is associative in the following sense. f((a,b,c),d,e) = f(a,f(b,c,d),e) = f(a,b,f(c,d,e)) for all a,b,c,d,e. f(a,b,c) is commutative because of its symmetry.
For each quadruple, the corresponding f(a,b,c) has a unique zero element (call it theta), meaning f(a,b,theta) = f(a,theta,b) = f(theta,a,b) = theta for all a,b. Theta = -y/x = - x/w. f(a,b,c) also has not one but two identity elements (id_1 and id_2), meaning f(a,id_1,id_1) = f(id_1,a,id_1) = f(id_1,id_1,a) = a for all a and f(a,id_2,id_2) = f(id_2,a,id_2) = f(id_2,id_2,a) = a for all a. Id = (-y +- sqrt(y))/x = theta +- sqrt(y)/x. Thus theta = (id_1 + id_2)/2.
The identity elements and theta are integers when y is a square and x divides sqrt(y).

Examples

			Table begins:
  [  w,   x,  y,  z]
  -------------------
  [ -4,  -2, -1, -1];
  [ -1,  -1, -1, -2];
  [ -1,   1, -1,  2];
  [ -4,   2, -1,  1];
  [-18,  -6, -2, -1];
  [ -2,  -2, -2, -3];
  [ -2,   2, -2,  3];
  [-18,   6, -2,  1];
  [  2,  -2,  2, -1];
  [  2,   2,  2,  1];
  [-48, -12, -3, -1];
  [-12,  -6, -3, -2];
  [ -3,  -3, -3, -4];
  [ -3,   3, -3,  4];
  [-12,   6, -3,  2];
  [-48,  12, -3,  1];
  [ 12,  -6,  3, -1];
  [  3,  -3,  3, -2];
  [  3,   3,  3,  2];
  [ 12,   6,  3,  1];
  ...
		

Crossrefs

Cf. A332083.
The rows of A351581 are a subset.

Programs

  • PARI
    { my(y=1); fordiv (y^2+y, x, print([-((y^2+y)/x)^2/y, -(y^2+y)/x, -y, -x]) );
    fordiv (y^2+y, x, print([-(x^2/y), x, -y, (y^2+y)/x]) );
    for (y = 2, 6, fordiv (y^2+y, x, if(type(w = -(((y^2+y)/x)^2)/y)=="t_INT", print([w, -(y^2+y)/x, -y, -x]) ));
    fordiv (y^2+y, x, if(type(w = -x^2/y)=="t_INT", print([w, x, -y, (y^2+y)/x]) ));
    fordiv (y^2-y, x, if(type(w = (((y^2-y)/x)^2)/y)=="t_INT", print([w, -(y^2-y)/x, y, -x]) ));
    fordiv (y^2-y, x, if(type(w = x^2/y)=="t_INT", print([w, x, y, (y^2-y)/x]) )) )}

A351581 Four-column table read by rows giving quadruples of integers [w,x,y,z] with w > 0, x > 1, y > 1 and z > 0 such that y^2 - y - x*z = 0 and x^2 = w*y, sorted by y then by x.

Original entry on oeis.org

2, 2, 2, 1, 3, 3, 3, 2, 12, 6, 3, 1, 1, 2, 4, 6, 4, 4, 4, 3, 9, 6, 4, 2, 36, 12, 4, 1, 5, 5, 5, 4, 20, 10, 5, 2, 80, 20, 5, 1, 6, 6, 6, 5, 150, 30, 6, 1, 7, 7, 7, 6, 28, 14, 7, 3, 63, 21, 7, 2, 252, 42, 7, 1, 2, 4, 8, 14, 8, 8, 8, 7, 98, 28, 8, 2, 392, 56, 8, 1
Offset: 1

Author

David Lovler, Feb 13 2022

Keywords

Comments

It is the same to sort by y then by w also to sort by y then by z descending.
When [w,x,y,z] is a row, f(a,b,c) = w*a*b*c + x*(a*b + a*c + b*c) + y*(a+b+c) + z is associative in the following sense. f((a,b,c),d,e) = f(a,f(b,c,d),e) = f(a,b,f(c,d,e)) for all a,b,c,d,e. f(a,b,c) is commutative because of its symmetry.
For each quadruple, the corresponding f(a,b,c) has a unique zero element (call it theta), meaning f(a,b,theta) = f(a,theta,b) = f(theta,a,b) = theta for all a,b. Theta = -y/x = - x/w. f(a,b,c) also has not one but two identity elements (id_1 and id_2), meaning f(a,id_1,id_1) = f(id_1,a,id_1) = f(id_1,id_1,a) = a for all a and f(a,id_2,id_2) = f(id_2,a,id_2) = f(id_2,id_2,a) = a for all a. Id = (-y +- sqrt(y))/x = theta +- sqrt(y)/x. Thus theta = (id_1 + id_2)/2.
The identity elements are integers when y is a square and x divides sqrt(y).

Examples

			Table begins:
  [ w,  x,  y,  z]
  -----------------
  [  2,  2, 2,  1];
  [  3,  3, 3,  2];
  [ 12,  6, 3,  1];
  [  1,  2, 4,  6];
  [  4,  4, 4,  3];
  [  9,  6, 4,  2];
  [ 36, 12, 4,  1];
  [  5,  5, 5,  4];
  [ 20, 10, 5,  2];
  [ 80, 20, 5,  1];
  [  6,  6, 6,  5];
  [150, 30, 6,  1];
  [  7,  7, 7,  6];
  [ 28, 14, 7,  3];
  [ 63, 21, 7,  2];
  [252, 42, 7,  1];
  [  2,  4, 8, 14];
  [  8,  8, 8,  7];
  [ 98, 28, 8,  2];
  [392, 56, 8,  1];
  [  1,  3, 9, 24];
  [  4,  6, 9, 12];
  [  9,  9, 9,  8];
  [ 16, 12, 9,  6];
  [ 36, 18, 9,  4];
  [ 64, 24, 9,  3];
  [144, 36, 9,  2];
  [576, 72, 9,  1];
  ...
For row [1, 2, 4, 6], f(a,b,c) = a*b*c + 2*(a*b + a*c + b*c) + 4*(a+b+c) + 6. Theta = -2; id_1 = -1, id_2 = -3. The associative function f(a,b) = a*b + 2*(a+b) + 2 has theta = -2 and id = -1; f(f(a,b),c) = f(a,b,c). Another associative function g(a,b) = -a*b - 2*(a+b) - 6 with theta = -2 and id = -3 likewise gives g(g(a,b),c) = f(a,b,c).
		

Crossrefs

Programs

  • PARI
    { my(y); for (y = 2, 9, fordiv (y^2-y, x, if(type(w = x^2/y) == "t_INT", print([w, x, y, (y^2-y)/x]) )) ) }

Formula

Looking at A336013, if [X,Y,Z] is a row and f(a,b) = X*a*b + Y*(a+b) + Z is the corresponding associative function with id = -Z/Y and theta = -Y/X, then the composition f(f(a,b),c) = w*a*b*c + x*(a*b + a*c + b*c) + y*(a+b+c) + z = f(a,b,c) gives the quadruple [w,x,y,z]. f(a,b,c) has the same theta as f(a,b); the two identity elements for f(a,b,c) are id and 2*theta - id.
If theta and the identity elements are computed from a quadruple, f(a,b,c) can be written as (a*b*c - theta*(a*b + a*c + b*c) + theta^2*(a+b+c) - theta^3)/(id-theta)^2 + theta. The square in the denominator ensures that f(a,b,c) is the same for either id.
Two parameters are sufficient to describe a row. For n*s > 1, rows are [w,x,y,z] = [n, n*s, n*s^2, (n^2*s^4-n*s^2)/(n*s)] = [n, n*s, n*s^2, n*s^3 - s]. In terms of n and s, theta = -s and id = s*(-1 +- 1/sqrt(n)). Rows with s=1 stand out as having w=x=y; theta = -1 and id = -1 +- 1/sqrt(w).

A348824 Numbers in array A327259 that do not have a unique decomposition into numbers of A327261.

Original entry on oeis.org

32, 48, 72, 96, 112, 126, 128, 144, 160, 168, 176, 192, 198, 221, 224, 240, 252, 256, 264, 288, 294, 304, 336, 342, 347, 352, 360, 368, 384, 392, 396, 414, 416, 432, 448, 456, 462, 480, 496, 504, 512, 528, 544, 545, 552, 558, 560, 576, 588, 599
Offset: 1

Author

David Lovler, Oct 31 2021

Keywords

Comments

While array A327259 has many properties of the multiplication table, one way the numbers that sieve out of the array fail to be prime numbers is that unique factorization does not hold. Some numbers have two or more decompositions.
For i >= 2, A327259(i, a(n)) is in the sequence.

Examples

			48 is in the sequence because 48 = A327259(2,12) = A327259(4,6) and 2, 4, 6 and 12 are in A327261.
72 is in the sequence because 72 = A327259(2,2,5) = A327259(6,6) and 2, 5 and 6 are in A327261. A327259(2,2,5) is well-defined because A327259(n,k) is associative.
221 is in the sequence because 221 = A327259(5,25) = A327259(11,11) and 5, 11 and 25 are in A327261.
462 is in the sequence because 462 = A327259(6,39) = A327259(11,22) = A327259(14,17) and 6, 11, 14, 17, 22 and 39 are in A327261.
The first six terms and their decompositions:
1 32 = A327259(2,2,2) = A327259(4,4)
2 48 = A327259(2,12) = A327259(4,6)
3 72 = A327259(2,2,5) = A327259(6,6)
4 96 = A327259(2,2,6) = A327259(4,12)
5 112 = A327259(2,28) = A327259(4,14)
6 126 = A327259(5,14) = A327259(6,11)
More in a-file.
		

Crossrefs

Programs

  • Mathematica
    T[n_,k_]:=2n*k-If[Mod[n,2]==1,If[Mod[k,2]==1,n+k-1,k],If[Mod[k,2]==1,n,0]];F[d_]:=If[(q=Union[Sort/@(Position[Table[T[n,k],{n,2,Ceiling[d/3]},{k,2,Ceiling[d/3]}],d]+1)])=={},{{d}},q];FC[x_]:=FixedPoint[Union[Sort/@Flatten[Flatten/@Tuples[#]&/@((F/@#&/@#)&[#]),1]]&,F[x]];list={};Do[If[Length@FC@i>1,AppendTo[list,i]],{i,300}];list (* Giorgos Kalogeropoulos, Nov 05 2021 *)

Extensions

Name amended by David Lovler, Jan 26 2022

A345474 Given the associative array U(n,k) described below, numbers m > 7 such that [m-5..m+5] are not in U(n,k) (excluding the first row and column).

Original entry on oeis.org

8, 106, 26874, 105834, 1080234
Offset: 1

Author

David Lovler, Jun 22 2021

Keywords

Comments

There are no more terms up to 5*10^6.
All terms equal 1 (mod 7).
U(n,k) is a commutative and associative array with integer values that depend on whether n and k are odd or even.
U(n,k) = (7*n*k - 5*(n+k-1))/2 when n and k are both odd,
U(n,k) = (7*n*k - 5*n)/2 when n is even and k is odd,
U(n,k) = (7*n*k - 5*k)/2 when n is odd and k is even and
U(n,k) = 7*n*k/2 when n and k are both even.
U(n,1) = n for all n (identity element).
U(n,0) = 0 for all n.
U(n,k) can be expressed as (7*n*k - 5*U(0;n,k))/2, where U(0;n,k) has four cases.
U(0;n,k) = n+k-1 when n and k are both odd,
U(0;n,k) = n when n is even and k is odd,
U(0;n,k) = k when n is odd and k is even and
U(0;n,k) = 0 when n and k are both even.
The ordered list of numbers > 7 that do not appear in array U(n,k) for n and k > 1 can have at most 5 consecutive even numbers and at most 7 consecutive odd numbers. See rows 2 and 3.
U(n,k) is part of a hierarchy of multiplication-like arrays, mentioned in A327263, in which the entries depend on the parity of n and k. U(0;n,k), which is A319929(n,k), is their common parity-dependent component. For i >= 0, U(i;n,k) = (i*n*k - (i-2)*U(0;n,k))/2. In the current sequence U(n,k) = U(7;n,k). Each of these arrays leaves behind a list of numbers that do not appear outside of row 1 and column 1. Think of the prime number sieve.
U(2;n,k) is normal multiplication. For i > 2, these lists are progressively more dense and include even numbers as well as odd numbers. This allows strings of consecutive integers. Here we are interested in the maximum length strings for each i.
The ordered list of numbers > i that do not appear in array U(i;n,k) for n and k > 1 can have at most i-2 consecutive even numbers and at most i consecutive odd numbers. To verify this, look at rows 2 and 3. i consecutive odd numbers cannot interleaf with i-2 even numbers, but i-1 odd numbers can. Thus the longest strings for each i are of length 2i-3. When i is even, m is odd. When i is odd, m is even.
In general, there are more terms when i is odd than when i is even. This is because there are a few ways that i consecutive odd number can overlap i-2 consecutive even numbers.
For this sequence and similar sequences constructed from U(i;n,k), all terms m == 1 (mod i). To prove this, look at gaps of 2i-3 in row 2 of U(i;n,k). The longest strings of consecutive numbers not in U(i;n,k) can occur only for these 2i-3 numbers. The second number before any of the gaps is an even number of the form U(i;2,e) = i*2*e/2 == 0 (mod i) (where e is an even number). The middle of the string, m = U(i;2,e) + i + 1. Thus m == 1 (mod i).
Likewise, for any i, all terms m == 2 (mod i+1).
The following observations are included to expand upon the theme. For odd i in [9..23], the number of terms in [i+2..5*10^6] represented as [i, number of terms] are [9, 3], [11, 8], [13, 3], [15, 0], [17, 3], [19, 3], [21, 0], [23, 3]. For odd i in [25..99], 11 i's have no terms in [i+2..5*10^5], 12 have 1 such term, 9 have 2, 4 have 3, 1 has 4 and 1 has 5 such terms.
The scarcity of terms for even i's is borne out by the observation that up to 5*10^6, for even i in [6..22], the only terms > i+1 occur when i = 14 (1667), i = 20 (3341 and 1663181) and i = 22 (16171). Continuing the observation for even i in [24..140], up to 5*10^5 only 14 i's have a term > i+1.

Examples

			Array U(0;n,k) = A319929(n,k) begins:
   1   2   3   4   5   6   7   8   9  10
   2   0   2   0   2   0   2   0   2   0
   3   2   5   4   7   6   9   8  11  10
   4   0   4   0   4   0   4   0   4   0
   5   2   7   4   9   6  11   8  13  10
   6   0   6   0   6   0   6   0   6   0
   7   2   9   4  11   6  13   8  15  10
   8   0   8   0   8   0   8   0   8   0
   9   2  11   4  13   6  15   8  17  10
  10   0  10   0  10   0  10   0  10   0
Array U(n,k) = U(7;n,k) begins:
   1   2   3   4   5   6   7   8   9  10
   2  14  16  28  30  42  44  56  58  70
   3  16  19  32  35  48  51  64  67  80
   4  28  32  56  60  84  88 112 116 140
   5  30  35  60  65  90  95 120 125 150
   6  42  48  84  90 126 132 168 174 210
   7  44  51  88  95 132 139 176 183 220
   8  56  64 112 120 168 176 224 232 280
   9  58  67 116 125 174 183 232 241 290
  10  70  80 140 150 210 220 280 290 350
Numbers up to 200 not in U(n,k) (excluding row 1 and column 1): 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 17, 18, 20, 21, 22, 23, 24, 25, 26, 27, 29, 31, 33, 34, 36, 37, 38, 39, 40, 41, 43, 45, 46, 47, 49, 50, 52, 53, 54, 55, 57, 59, 61, 62, 63, 66, 68, 69, 71, 73, 74, 75, 76, 77, 78, 79, 81, 82, 85, 87, 89, 91, 92, 93, 94, 97, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 113, 117, 118, 119, 121, 122, 123, 124, 127, 129, 130, 133, 134, 135, 136, 137, 138, 141, 143, 145, 146, 148, 149, 151, 152, 153, 157, 158, 159, 161, 162, 164, 165, 166, 167, 169, 171, 173, 175, 177, 178, 181, 186, 187, 188, 189, 190, 191, 193, 194, 197, 199.
		

Crossrefs

In A327263 U(n,k) is called U(7;n,k).

Programs

  • PARI
    T319929(n, k) = if (n%2, if (k%2, n+k-1, k), if (k%2, n, 0));
    U(n, k) = (7*n*k - 5*T319929(n, k))/2;
    list(nn) = {my(list = List()); for (n=2, nn, for (k=2, nn\n, listput(list, U(n, k)); ); ); setminus([1..nn], Set(list)); }
    lista(nn) = {my(v=Vec(list(nn))); for (m=8, #v-1, my(x=v[m]); if (#setintersect(v, [x-5..x+5])==11, print1(x, ", ")); ); }
    
  • PARI
    /* This program computes terms of sequences based on U(i;n,k) for i >= 2. */
    T319929(n, k) = if (n%2, if (k%2, n+k-1, k), if (k%2, n, 0));
    U(n, k) = (i*n*k - (i-2)*T319929(n, k))/2; \\ U(i; n, k)
    list(nn) = {my(list = List()); for (n=2, nn, for (k=2, nn\n, listput(list, U(n, k)); ); ); setminus([1..nn], Set(list)); }
    lista(nn) = {my(v=Vec(list(nn))); for (m=i+1, #v-1, my(x=if(Mod(v[m],i)==1,v[m])); if (#setintersect(v,[x-i+2..x+i-2])==2*i-3, print1(x, ", ")); ); }
    /* Type for example: i=4; lista(10^6) */

A345473 Given the associative array U(n,k) described below, numbers m > 5 such that [m-3..m+3] are not in U(n,k) (excluding the first row and column).

Original entry on oeis.org

6, 56, 236, 956, 2636, 3356, 6236, 9716, 10196, 13436, 15896, 18296, 24716, 26396, 36116, 36956, 37196, 42956, 53036, 69356, 82556, 84536, 119516, 121496, 181556, 201116, 204236, 221756, 252116, 259676, 332636, 359036, 365036, 401516
Offset: 1

Author

David Lovler, Jun 21 2021

Keywords

Comments

U(n,k) is a commutative and associative array with integer values that depend on whether n and k are odd or even.
U(n,k) = (5*n*k - 3*(n+k-1))/2 when n and k are both odd.
U(n,k) = (5*n*k - 3*n)/2 when n is even and k is odd.
U(n,k) = (5*n*k - 3*k)/2 when n is odd and k is even.
U(n,k) = 5*n*k/2 when n and k are both even.
U(n,1) = n for all n (identity element).
U(n,0) = 0 for all n.
The ordered list of numbers >5 that do not appear in array U(n,k) for n and k > 1 can have at most 3 consecutive even numbers and at most 5 consecutive odd numbers. See rows 2 and 3.
The terms all end in 6 because row 2 of U(n,k) has all numbers that end in 0 or 2 and there are at most 3 consecutive even numbers in the set of numbers not in array U(n,k) excluding the first row and column (see comment for A327263).
There are 119 terms up to 5*10^6.

Examples

			Array U(n,k) begins:
   1   2   3   4   5   6   7   8   9  10
   2  10  12  20  22  30  32  40  42  50
   3  12  15  24  27  36  39  48  51  60
   4  20  24  40  44  60  64  80  84 100
   5  22  27  44  49  66  71  88  93 110
   6  30  36  60  66  90  96 120 126 150
   7  32  39  64  71  96 103 128 135 160
   8  40  48  80  88 120 128 160 168 200
   9  42  51  84  93 126 135 168 177 210
  10  50  60 100 110 150 160 200 210 250
Numbers up to 100 not in U(n,k) (excluding row 1 and column 1): 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 14, 16, 17, 18, 19, 21, 23, 25, 26, 28, 29, 31, 33, 34, 35, 37, 38, 41, 43, 45, 46, 47, 53, 54, 55, 56, 57, 58, 59, 61, 65, 67, 68, 69, 73, 74, 76, 77, 78, 79, 81, 83, 85, 86, 89, 91, 94, 95, 97, 98.
		

Crossrefs

In A327263 U(n,k) is called U(5;n,k).

Programs

  • PARI
    T319929(n, k) = if (n%2, if (k%2, n+k-1, k), if (k%2, n, 0));
    U(n, k) = (5*n*k - 3*T319929(n, k))/2;
    list(nn) = {my(list = List()); for (n=2, nn, for (k=2, nn\n, listput(list, U(n, k)); ); ); setminus([1..nn], Set(list)); }
    lista(nn) = {my(v=Vec(list(nn))); for (m=6, #v-1, my(x=v[m]); if (#setintersect(v,[x-3..x+3])==7, print1(x, ", ")); ); }

A345357 Numbers m > 4 such that [m-2..m+2] belong to A327261.

Original entry on oeis.org

5, 717, 2637, 14157, 89037, 112077, 149517, 156957, 180477, 235917, 255357, 267837, 269997, 293037, 399357, 447837, 533517, 592557, 679677, 703917, 770157, 909837, 929997, 1043997, 1158237, 1257597, 1283037, 1296477, 1333197, 1369197, 1500237, 1971357, 1998717, 2062557, 2099997
Offset: 1

Author

David Lovler, Jun 15 2021

Keywords

Comments

Terms > 5 have 7 for their units digit. This is because the units digit of A327261 terms can't be 0 or 3 (row 3 of A327259 has all numbers that end in 0 or 3) and there are at most 2 consecutive even terms (see comment for A327263).

Crossrefs

Programs

  • PARI
    T319929(n, k) = if (n%2, if (k%2, n+k-1, k), if (k%2, n, 0));
    T(n, k) = 2*n*k - T319929(n, k); \\ A327259
    list(nn) = {my(list = List()); for (n=2, nn, for (k=2, nn\n, listput(list, T(n, k)); ); ); setminus([1..nn], Set(list)); } \\ A327261
    lista(nn) = {my(v=Vec(list(nn))); for (m=5, #v-1, my(x=v[m]); if (vecsearch(v, x-2) && vecsearch(v, x-1) && vecsearch(v, x+1) && vecsearch(v, x+2), print1(x, ", ")); ); }