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.

Showing 1-4 of 4 results.

A347687 Triangle read by rows: T(n,k) (1<=k<=n) = (r(n+k)-r(k))/(2*n), where {r(i), i>=1} is the n-th row of array A347684.

Original entry on oeis.org

0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 2, 2, 1, 0, 1, 0, 0, 0, 1, 0, 1, 3, 2, 2, 3, 1, 0, 1, 0, 3, 0, 3, 0, 1, 0, 1, 4, 0, 2, 2, 0, 4, 1, 0, 1, 0, 3, 0, 0, 0, 3, 0, 1, 0, 1, 5, 4, 3, 2, 2, 3, 4, 5, 1, 0, 1, 0, 0, 0, 5, 0, 5, 0, 0, 0, 1, 0, 1, 6, 4, 3, 5, 2, 2, 5, 3, 4, 6, 1, 0
Offset: 1

Views

Author

N. J. A. Sloane, Sep 19 2021

Keywords

Comments

Stated another way, T(n,k) = (1/(2*n)) * (A347684(n,k+n) - A347684(n,k)) for 1 <= k <= n.
Conjecture: Row n is not just the rescaled differences between the first two blocks of n terms of row n of A347684, but is in fact the rescaled differences between any two successive blocks of n terms that start at positions == 1 (mod n). See also the comments in A347684.
It would be nice to have an independent characterization of this triangle. There is a lot of structure - see the link for the first 40 rows.
Except for the final 0 in each row, the rows begin with 1 and are palindromic. T(n,k) = 0 iff gcd(n,k) > 1.

Examples

			The initial rows are:
1,  [0],
2,  [1, 0],
3,  [1, 1, 0],
4,  [1, 0, 1, 0],
5,  [1, 2, 2, 1, 0],
6,  [1, 0, 0, 0, 1, 0],
7,  [1, 3, 2, 2, 3, 1, 0],
8,  [1, 0, 3, 0, 3, 0, 1, 0],
9,  [1, 4, 0, 2, 2, 0, 4, 1, 0],
10, [1, 0, 3, 0, 0, 0, 3, 0, 1, 0],
11, [1, 5, 4, 3, 2, 2, 3, 4, 5, 1, 0],
12, [1, 0, 0, 0, 5, 0, 5, 0, 0, 0, 1, 0],
...
Row 5 of A347684 starts 1, 9, 11, 9, 0, 11, 29, 31, 19, 0, 21, 49, 51, 29, 0, 31, ... Subtracting the first block of five terms from the second block of five terms we get [11, 29, 31, 19, 0] - [1, 9, 11, 9, 0] = [10, 20, 20, 10, 0], and after dividing by 10 we get [1, 2, 2, 1, 0], which is row 5 of the present triangle.
		

Crossrefs

Programs

  • Maple
    myfun1 := proc(A,B) local Ar,Br;
    if igcd(A,B) > 1 then return(0); fi;
      Ar:=(A)^(-1) mod B;
       if 2*Ar > B then Ar:=B-Ar; fi;
      Br:=(B)^(-1) mod A;
       if 2*Br > A then Br:=A-Br; fi;
    A*Ar+B*Br;
    end;
    T87:=(n,k) -> (myfun1(n,n+k)-myfun1(n,k))/(2*n);
    for n from 1 to 20 do lprint([seq(T87(n,k),k=1..n)]); od:

A347681 Triangle read by rows: T(n,k) (1<=k<=n) = f(prime(n),prime(k)), where f(x,y) = x*red_inv(x,y) + y*red_inv(y,x) if gcd(x,y)=1, or 0 if gcd(x,y)>1, and red_inv is defined in the comments.

Original entry on oeis.org

0, 5, 0, 9, 11, 0, 13, 13, 29, 0, 21, 23, 21, 43, 0, 25, 25, 51, 27, 131, 0, 33, 35, 69, 69, 67, 103, 0, 37, 37, 39, 113, 153, 77, 305, 0, 45, 47, 91, 139, 45, 183, 137, 229, 0, 57, 59, 59, 57, 175, 233, 407, 115, 231, 0, 61, 61, 61, 125, 309, 311, 373, 495, 185, 869, 0, 73, 73, 149, 223, 221, 443, 443, 75, 369, 813, 371, 0
Offset: 1

Views

Author

N. J. A. Sloane, Sep 18 2021

Keywords

Comments

If u, v are positive integers with gcd(u,v) = 1, the "reduced inverse" red_inv(u,v) of u mod v is u^(-1) mod v if u^(-1) mod v <= v/2, otherwise it is v - u^(-1) mod v.
That is, we map u to whichever of +-u has a representative mod v in the range 0 to v/2. Stated another way, red_inv(u,v) is a number r in the range 0 to v/2 such that r*u == +-1 mod v.
For example, red_inv(3,11) = 4, since 3^(-1) mod 11 = 4. But red_inv(2,11) = 5 = 11-6, since red_inv(2,11) = 6.
Arises in the study of A344005.

Examples

			Triangle begins:
0,
5, 0,
9, 11, 0,
13, 13, 29, 0,
21, 23, 21, 43, 0,
25, 25, 51, 27, 131, 0,
33, 35, 69, 69, 67, 103, 0,
37, 37, 39, 113, 153, 77, 305, 0,
45, 47, 91, 139, 45, 183, 137, 229, 0,
57, 59, 59, 57, 175, 233, 407, 115, 231, 0,
...
		

Crossrefs

Programs

  • Maple
    myfun1 := proc(A,B) local Ar,Br;
    if igcd(A,B) > 1 then return(0); fi;
      Ar:=(A)^(-1) mod B;
       if 2*Ar > B then Ar:=B-Ar; fi;
      Br:=(B)^(-1) mod A;
       if 2*Br > A then Br:=A-Br; fi;
    A*Ar+B*Br;
    end;
    myfun2:=(i,j)->myfun1(ithprime(i),ithprime(j));
    for i from 1 to 20 do lprint([seq(myfun2(i,j),j=1..i)]); od:

A347682 Array read by antidiagonals: T(n,k) (n>=1, k>=1) = f(prime(n),prime(k)), where f(x,y) = x*red_inv(x,y) + y*red_inv(y,x) if gcd(x,y)=1, or 0 if gcd(x,y)>1, and red_inv is defined in the comments.

Original entry on oeis.org

0, 5, 5, 9, 0, 9, 13, 11, 11, 13, 21, 13, 0, 13, 21, 25, 23, 29, 29, 23, 25, 33, 25, 21, 0, 21, 25, 33, 37, 35, 51, 43, 43, 51, 35, 37, 45, 37, 69, 27, 0, 27, 69, 37, 45, 57, 47, 39, 69, 131, 131, 69, 39, 47, 57, 61, 59, 91, 113, 67, 0, 67, 113, 91, 59, 61, 73, 61, 59, 139, 153, 103, 103, 153, 139, 59, 61, 73
Offset: 1

Views

Author

N. J. A. Sloane, Sep 18 2021

Keywords

Comments

If u, v are positive integers with gcd(u,v) = 1, the "reduced inverse" red_inv(u,v) of u mod v is u^(-1) mod v if u^(-1) mod v <= v/2, otherwise it is v - u^(-1) mod v.
That is, we map u to whichever of +-u has a representative mod v in the range 0 to v/2. Stated another way, red_inv(u,v) is a number r in the range 0 to v/2 such that r*u == +-1 mod v.
For example, red_inv(3,11) = 4, since 3^(-1) mod 11 = 4. But red_inv(2,11) = 5 = 11-6, since red_inv(2,11) = 6.
Arises in the study of A344005.

Examples

			The array begins:
0, 5, 9, 13, 21, 25, 33, 37, 45, 57, 61, 73,...
5, 0, 11, 13, 23, 25, 35, 37, 47, 59, 61, 73,...
9, 11, 0, 29, 21, 51, 69, 39, 91, 59, 61, 149,...
13, 13, 29, 0, 43, 27, 69, 113, 139, 57, 125, 223,...
21, 23, 21, 43, 0, 131, 67, 153, 45, 175, 309, 221,...
25, 25, 51, 27, 131, 0, 103, 77, 183, 233, 311, 443,...
33, 35, 69, 69, 67, 103, 0, 305, 137, 407, 373, 443,...
37, 37, 39, 113, 153, 77, 305, 0, 229, 115, 495, 75,...
...
The first few antidiagonals are:
[0]
[5, 5]
[9, 0, 9]
[13, 11, 11, 13]
[21, 13, 0, 13, 21]
[25, 23, 29, 29, 23, 25]
[33, 25, 21, 0, 21, 25, 33]
[37, 35, 51, 43, 43, 51, 35, 37]
...
		

Crossrefs

Rows 1 and 2 are (essentially) A076274 and A208296.

Programs

  • Maple
    myfun1 := proc(A,B) local Ar,Br;
    if igcd(A,B) > 1 then return(0); fi;
      Ar:=(A)^(-1) mod B;
       if 2*Ar > B then Ar:=B-Ar; fi;
      Br:=(B)^(-1) mod A;
       if 2*Br > A then Br:=A-Br; fi;
    A*Ar+B*Br;
    end;
    myfun2:=(i,j)->myfun1(ithprime(i),ithprime(j));
    for i from 1 to 30 do lprint([seq(myfun2(i-j+1,j),j=1..i)]); od:

A347683 Triangle read by rows: T(n,k) (1<=k<=n) = f(n,k), where f(x,y) = x*red_inv(x,y) + y*red_inv(y,x) if gcd(x,y)=1, or 0 if gcd(x,y)>1, and red_inv is defined in the comments.

Original entry on oeis.org

0, 1, 0, 1, 5, 0, 1, 0, 7, 0, 1, 9, 11, 9, 0, 1, 0, 0, 0, 11, 0, 1, 13, 13, 15, 29, 13, 0, 1, 0, 17, 0, 31, 0, 15, 0, 1, 17, 0, 17, 19, 0, 55, 17, 0, 1, 0, 19, 0, 0, 0, 41, 0, 19, 0, 1, 21, 23, 23, 21, 23, 43, 65, 89, 21, 0, 1, 0, 0, 0, 49, 0, 71, 0, 0, 0, 23, 0, 1, 25, 25, 25, 51, 25, 27, 79, 53, 79, 131, 25, 0
Offset: 1

Views

Author

N. J. A. Sloane, Sep 18 2021

Keywords

Comments

If u, v are positive integers with gcd(u,v) = 1, the "reduced inverse" red_inv(u,v) of u mod v is u^(-1) mod v if u^(-1) mod v <= v/2, otherwise it is v - u^(-1) mod v.
That is, we map u to whichever of +-u has a representative mod v in the range 0 to v/2. Stated another way, red_inv(u,v) is a number r in the range 0 to v/2 such that r*u == +-1 mod v.
For example, red_inv(3,11) = 4, since 3^(-1) mod 11 = 4. But red_inv(2,11) = 5 = 11-6, since red_inv(2,11) = 6.
Arises in the study of A344005.

Examples

			Triangle begins:
0,
1, 0,
1, 5, 0,
1, 0, 7, 0,
1, 9, 11, 9, 0,
1, 0, 0, 0, 11, 0,
1, 13, 13, 15, 29, 13, 0,
1, 0, 17, 0, 31, 0, 15, 0,
1, 17, 0, 17, 19, 0, 55, 17, 0,
1, 0, 19, 0, 0, 0, 41, 0, 19, 0,
...
		

Crossrefs

Programs

  • Maple
    myfun1 := proc(A,B) local Ar,Br;
    if igcd(A,B) > 1 then return(0); fi;
      Ar:=(A)^(-1) mod B;
       if 2*Ar > B then Ar:=B-Ar; fi;
      Br:=(B)^(-1) mod A;
       if 2*Br > A then Br:=A-Br; fi;
    A*Ar+B*Br;
    end;
    for i from 1 to 20 do lprint([seq(myfun1(i,j),j=1..i)]); od:
Showing 1-4 of 4 results.