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.

A091255 Square array computed from gcd(P(x),P(y)) where P(x) and P(y) are polynomials with coefficients in {0,1} given by the binary expansions of x and y, and the polynomial calculation is done over GF(2), with the result converted back to a binary number, and then expressed in decimal. Array is symmetric, and is read by falling antidiagonals.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jan 03 2004

Keywords

Comments

Array is read by antidiagonals, with (x,y) = (1,1), (1,2), (2,1), (1,3), (2,2), (3,1), ...
Analogous to A003989.
"Coded in binary" means that a polynomial a(n)*X^n+...+a(0)*X^0 over GF(2) is represented by the binary number a(n)*2^n+...+a(0)*2^0 in Z (where a(k)=0 or 1).

Examples

			The top left 17 X 17 corner of the array:
      1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17
    +---------------------------------------------------------------
   1: 1, 1, 1, 1, 1, 1, 1, 1, 1,  1,  1,  1,  1,  1,  1,  1,  1, ...
   2: 1, 2, 1, 2, 1, 2, 1, 2, 1,  2,  1,  2,  1,  2,  1,  2,  1, ...
   3: 1, 1, 3, 1, 3, 3, 1, 1, 3,  3,  1,  3,  1,  1,  3,  1,  3, ...
   4: 1, 2, 1, 4, 1, 2, 1, 4, 1,  2,  1,  4,  1,  2,  1,  4,  1, ...
   5: 1, 1, 3, 1, 5, 3, 1, 1, 3,  5,  1,  3,  1,  1,  5,  1,  5, ...
   6: 1, 2, 3, 2, 3, 6, 1, 2, 3,  6,  1,  6,  1,  2,  3,  2,  3, ...
   7: 1, 1, 1, 1, 1, 1, 7, 1, 7,  1,  1,  1,  1,  7,  1,  1,  1, ...
   8: 1, 2, 1, 4, 1, 2, 1, 8, 1,  2,  1,  4,  1,  2,  1,  8,  1, ...
   9: 1, 1, 3, 1, 3, 3, 7, 1, 9,  3,  1,  3,  1,  7,  3,  1,  3, ...
  10: 1, 2, 3, 2, 5, 6, 1, 2, 3, 10,  1,  6,  1,  2,  5,  2,  5, ...
  11: 1, 1, 1, 1, 1, 1, 1, 1, 1,  1, 11,  1,  1,  1,  1,  1,  1, ...
  12: 1, 2, 3, 4, 3, 6, 1, 4, 3,  6,  1, 12,  1,  2,  3,  4,  3, ...
  13: 1, 1, 1, 1, 1, 1, 1, 1, 1,  1,  1,  1, 13,  1,  1,  1,  1, ...
  14: 1, 2, 1, 2, 1, 2, 7, 2, 7,  2,  1,  2,  1, 14,  1,  2,  1, ...
  15: 1, 1, 3, 1, 5, 3, 1, 1, 3,  5,  1,  3,  1,  1, 15,  1, 15, ...
  16: 1, 2, 1, 4, 1, 2, 1, 8, 1,  2,  1,  4,  1,  2,  1, 16,  1, ...
  17: 1, 1, 3, 1, 5, 3, 1, 1, 3,  5,  1,  3,  1,  1,  15, 1, 17, ...
  ...
3, which is "11" in binary, encodes polynomial X + 1, while 7 ("111" in binary) encodes polynomial X^2 + X + 1, whereas 9 ("1001" in binary), encodes polynomial X^3 + 1. Now (X + 1)(X^2 + X + 1) = (X^3 + 1) when the polynomials are multiplied over GF(2), or equally, when multiplication of integers 3 and 7 is done as a carryless base-2 product (A048720(3,7) = 9). Thus it follows that A(3,9) = A(9,3) = 3 and A(7,9) = A(9,7) = 7.
Furthermore, 5 ("101" in binary) encodes polynomial X^2 + 1 which is equal to (X + 1)(X + 1) in GF(2)[X], thus A(5,9) = A(9,5) = 3, as the irreducible polynomial (X + 1) is the only common factor for polynomials X^2 + 1 and X^3 + 1.
		

Crossrefs

Cf. also A327856 (the upper left triangular section of this array), A327857.

Programs

  • PARI
    A091255sq(a,b) = fromdigits(Vec(lift(gcd(Pol(binary(a))*Mod(1, 2),Pol(binary(b))*Mod(1, 2)))),2); \\ Antti Karttunen, Aug 12 2019

Formula

A(x,y) = A(y,x) = A(x, A003987(x,y)) = A(A003987(x,y), y), where A003987 gives the bitwise-XOR of its two arguments. - Antti Karttunen, Sep 28 2019

Extensions

Data section extended up to a(105), examples added by Antti Karttunen, Sep 28 2019

A280500 Square array for division in ring GF(2)[X]: A(r,c) = r/c, or 0 if c is not a divisor of r, where the binary expansion of each number defines the corresponding (0,1)-polynomial.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jan 09 2017

Keywords

Comments

The array A(row,col) is read by descending antidiagonals: A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), etc.

Examples

			The top left 17 X 17 corner of the array:
col: 1  2   3  4  5  6  7  8  9 10 11 12 13 14 15 16 17
     --------------------------------------------------
     1, 0,  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
     2, 1,  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
     3, 0,  1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
     4, 2,  0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
     5, 0,  3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
     6, 3,  2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
     7, 0,  0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
     8, 4,  0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0
     9, 0,  7, 0, 0, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0
    10, 5,  6, 0, 2, 3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0
    11, 0,  0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0
    12, 6,  4, 3, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0
    13, 0,  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0
    14, 7,  0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0
    15, 0,  5, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0
    16, 8,  0, 4, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0
    17, 0, 15, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 1
    ---------------------------------------------------
7 ("111" in binary) encodes polynomial X^2 + X + 1, which is irreducible over GF(2) (7 is in A014580), thus it is divisible only by itself and 1, and for any other values of c than 1 and 7, A(7,c) = 0.
9 ("1001" in binary) encodes polynomial X^3 + 1, which is factored over GF(2) as (X+1)(X^2 + X + 1), and thus A(9,3) = 7 and A(9,7) = 3 because the polynomial X + 1 is encoded by 3 ("11" in binary).
		

Crossrefs

Cf. A280499 for the lower triangular region (A280494 for its transpose).

Programs

  • PARI
    up_to = 10440;
    A280500sq(a,b) = { my(Pa=Pol(binary(a))*Mod(1, 2), Pb=Pol(binary(b))*Mod(1, 2)); if(0!=lift(Pa % Pb), 0, fromdigits(Vec(lift(Pa/Pb)),2)); };
    A280500list(up_to) = { my(v = vector(up_to), i=0); for(a=1,oo, for(col=1,a, i++; if(i > up_to, return(v)); v[i] = A280500sq(col,(a-(col-1))))); (v); };
    v280500 = A280500list(up_to);
    A280500(n) = v280500[n]; \\ Antti Karttunen, Jan 05 2025
    
  • Scheme
    (define (A280500 n) (A280500bi (A002260 n) (A004736 n)))
    ;; A very naive implementation:
    (define (A280500bi row col) (let loop ((d row)) (cond ((zero? d) d) ((= (A048720bi d col) row) d) (else (loop (- d 1)))))) ;; A048720bi implements the carryless binary multiplication A048720.

Formula

A(row,col) = the unique d such that A048720(d,col) = row, provided that such d exists, otherwise zero.
Other identities. For all n >= 1:
A(n, A001317(A268389(n))) = A268669(n).

A106448 Table of (x+y)/gcd(x,y) where (x,y) runs through the pairs (1,1), (1,2), (2,1), (1,3), (2,2), (3,1), ...

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 21 2005

Keywords

Comments

Can also be viewed as a triangular table T(n,k) (n>=1, 1<=k<=n) read by rows: T(1,1); T(2,1), T(2,2); T(3,1), T(3,2), T(3,3); T(4,1), T(4,2), T(4,3), T(4,4); ... where T(n,k) gives the least value v>0 such that v*k = 0 modulo n+1, i.e., in other words, T(n,k) = (n+1)/gcd(n+1,k).

Examples

			The top left corner of the square array is:
   2  3  4  5  6  7  8  9 10 11 ...
   3  2  5  3  7  4  9  5 11 ...
   4  5  2  7  8  3 10 11 ...
   5  3  7  2  9  5 11 ...
   6  7  8  9  2 11 ...
   7  4  3  5 11 ...
   8  9 10 11 ...
   9  5 11 ...
  10 11 ...
  11 ...
		

Crossrefs

GF(2)[X] analog: A106449. Row 1 is n+1, row 2 is LEFT(LEFT(LEFT(A026741))), row 3 is LEFT^4(A051176). Essentially the same as A054531, but without its right-hand edge of all-1's.

Formula

T(n, k) = numerator((n+k)/n) = numerator((n+k)/k). - Michel Marcus, Dec 29 2013

A106450 a(n) = A004443(n) if n is odd, a(n) = A004443(n)/2 if n is even.

Original entry on oeis.org

2, 3, 0, 1, 3, 7, 2, 5, 5, 11, 4, 9, 7, 15, 6, 13, 9, 19, 8, 17, 11, 23, 10, 21, 13, 27, 12, 25, 15, 31, 14, 29, 17, 35, 16, 33, 19, 39, 18, 37, 21, 43, 20, 41, 23, 47, 22, 45, 25, 51, 24, 49, 27, 55, 26, 53, 29, 59, 28, 57, 31, 63, 30, 61, 33, 67, 32, 65, 35, 71, 34, 69, 37, 75
Offset: 0

Views

Author

Antti Karttunen, May 21 2005

Keywords

Crossrefs

Skipping the initial term (a(0)=2), this is row 2 of A106449.

Programs

  • PARI
    Vec((2+3*x-2*x^2-2*x^3+x^4+3*x^5+x^6)/((1-x)^2*(1+x)^2*(1+x^2)) + O(x^50)) \\ Colin Barker, Apr 19 2016

Formula

a(4*n+1) = 4*n+3, a(4*n+2) = 2*n, a(4*n+3) = 4*n+1, a(4*n+4) = 2*n+3.
From Colin Barker, Apr 19 2016: (Start)
a(n) = ((2+4*i)*(-i)^n+(2-4*i)*i^n-(-3+(-1)^n)*n)/4 for n>0 where i is the imaginary unit.
a(n) = a(n-2)+a(n-4)-a(n-6) for n>6.
G.f.: (2+3*x-2*x^2-2*x^3+x^4+3*x^5+x^6) / ((1-x)^2*(1+x)^2*(1+x^2)).
(End)
From Ilya Gutkovskiy, Apr 19 2016: (Start)
a(n) = (4*floor(1/(n+1)) - (-1)^n*n + 3*n + 8*sin((Pi*n)/2) + 4*cos((Pi*n)/2))/4.
E.g.f.: 1 + cos(x) + x*cosh(x) + 2*sin(x) + x*sinh(x)/2. (End)
Showing 1-4 of 4 results.