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.

A280494 Rows of triangular table A280499 read in reverse order.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jan 09 2017

Keywords

Comments

This is GF(2)[X] analog of A127013, using "carryless division in base-2" instead of ordinary division.

Examples

			The first 17 rows of the triangle:
1
1 2
1 0 3
1 0 2 4
1 0 3 0 5
1 0 0 2 3 6
1 0 0 0 0 0 7
1 0 0 0 2 0 4 8
1 0 3 0 0 0 7 0 9
1 0 0 0 3 2 0 6 5 10
1 0 0 0 0 0 0 0 0 0 11
1 0 0 0 0 0 2 0 3 4 6 12
1 0 0 0 0 0 0 0 0 0 0 0 13
1 0 0 0 0 0 0 2 0 0 0 0 7 14
1 0 0 0 0 0 0 0 0 0 3 0 5 0 15
1 0 0 0 0 0 0 0 2 0 0 0 4 0 8 16
1 0 3 0 0 0 0 0 0 0 0 0 5 0 15 0 17
		

Crossrefs

Cf. A048720, A127013, A280499, A280500, A280493 (the row sums).

Programs

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).

A178908 GF(2) sum of divisors of n.

Original entry on oeis.org

1, 3, 2, 7, 7, 6, 6, 15, 12, 9, 10, 14, 12, 10, 8, 31, 25, 20, 18, 21, 19, 30, 24, 30, 24, 20, 18, 18, 20, 24, 30, 63, 60, 43, 40, 36, 36, 54, 54, 45, 40, 53, 48, 54, 48, 40, 46, 62, 60, 40, 42, 36, 36, 54, 54, 34, 36, 60, 58, 56, 60, 34, 38, 127, 121, 68, 66, 79, 79, 120, 120
Offset: 1

Views

Author

Keywords

Comments

Take the n-th GF(2) polynomial, compute its sum of divisors, and find the index of that polynomial in the list of GF(2) polynomials.
If 2^k <= n < 2^(k+1), then also 2^k <= a(n) < 2^(k+1), since any proper divisor of a GF(2) polynomial has lower degree.
Numbers whose binary representations correspond to the divisors occur as the nonzero terms on row n of A280499, and they are XORed together to obtain a(n). A280493 gives another GF(2)[X]-analog of A000203. - Antti Karttunen, Jan 11 2017

Examples

			5 => x^2 + 1 = (x+1)^2. sigma((x+1)^2) = (x+1)^2 + x+1 + 1 = x^2 + x + 1 => 7, so a(5) = 7. (All polynomials here are over GF(2).)
		

Crossrefs

Programs

  • PARI
    a(n)={local(p,fm,r,k);
    while(n>0,p+=Mod(n,2)*x^k;n\=2;k++);
    r=Mod(1,2);fm=factor(p);for(k=1,matsize(fm)[1],r*=(fm[k,1]^(fm[k,2]+1)-1)/(fm[k,1]-1));
    subst(lift(r),x,2)}
    
  • PARI
    a(n) = {my(s = vecsum(divisors(Mod(1,2)*Pol(binary(n))))); subst(lift(s), x, 2);} \\ Michel Marcus, Jan 13 2019
    
  • Scheme
    ;; A003987bi implements the 2-argument bitwise-XOR function (A003987).
    ;; A091255bi implements the 2-argument GF(2)[X] GCD-function (A091255) which is used for checking that k is a divisor of n.
    (define (A178908 n) (let loop ((k n) (s 0)) (if (zero? k) s (loop (- k 1) (A003987bi s (if (= k (A091255bi n k)) k 0))))))
    ;; Antti Karttunen, Jan 11 2017

Formula

For all n >= 0, a(2^n) = A000203(2^n) = A280493(2^n) = A000225(1+n). - Antti Karttunen, Jan 11 2017

A280493 Sum of GF(2)[X] divisors of n: the sum is ordinary sum of integers, the summands being all the natural numbers whose binary expansions encode such (0,1)-polynomials that divide the (0,1)-polynomial encoded by n when the polynomial factorization is done over the field GF(2).

Original entry on oeis.org

1, 3, 4, 7, 9, 12, 8, 15, 20, 27, 12, 28, 14, 24, 24, 31, 41, 60, 20, 63, 29, 36, 40, 60, 26, 42, 52, 56, 44, 72, 32, 63, 68, 123, 56, 140, 38, 60, 88, 135, 42, 87, 72, 84, 112, 120, 48, 124, 68, 78, 92, 98, 76, 156, 56, 120, 102, 132, 60, 168, 62, 96, 104, 127, 201, 204, 68, 287, 81, 168, 136, 300, 74, 114, 192, 140, 140, 264, 112, 279, 95, 126, 192, 203
Offset: 1

Views

Author

Antti Karttunen, Jan 09 2017

Keywords

Comments

This is roughly a GF(2)[X]-analog of A000203. A178908 gives another, maybe a more consistent analog.

Examples

			9 ("1001" in binary) encodes polynomial X^3 + 1, which is factored over GF(2) as (X+1)(X^2 + X + 1), where polynomial X + 1 is encoded by 3 ("11" in binary), and polynomial X^2 + X + 1 by 7 ("111" in binary), and furthermore (like all polynomials) it is also divisible by 1 and itself, thus a(9) = 1 + 3 + 7 + 9 = 20.
		

Crossrefs

Row sums of triangles A280494 and A280499.
Cf. A014580 (gives the positions where a(n) = n+1).

Programs

  • Scheme
    (define (A280493 n) (let loop ((k n) (s 0)) (if (zero? k) s (loop (- k 1) (+ s (if (= k (A091255bi n k)) k 0))))))
    ;; A091255bi implements the 2-argument GF(2)[X] GCD-function (A091255) which is used for checking that k is a divisor of n.
    ;; Another version:
    (define (A280493 n) (add A280494 (+ 1 (A000217 (- n 1))) (A000217 n)))
    (define (add intfun lowlim uplim) (let sumloop ((i lowlim) (res 0)) (cond ((> i uplim) res) (else (sumloop (+ 1 i) (+ res (intfun i)))))))

Formula

For all n >= 0, a(2^n) = A000203(2^n) = A178908(2^n) = A000225(1+n).
Showing 1-4 of 4 results.