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-7 of 7 results.

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

A280505 The palindromic kernel of n in base 2 (with carryless GF(2)[X] factorization): a(n) = A091255(n,A057889(n)).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 12, 1, 14, 15, 16, 17, 18, 1, 20, 21, 2, 3, 24, 1, 2, 27, 28, 3, 30, 31, 32, 33, 34, 7, 36, 1, 2, 5, 40, 1, 42, 3, 4, 45, 6, 1, 48, 7, 2, 51, 4, 3, 54, 1, 56, 5, 6, 1, 60, 1, 62, 63, 64, 65, 66, 1, 68, 1, 14, 3, 72, 73, 2, 15, 4, 3, 10, 7, 80, 1, 2, 9, 84, 85, 6, 1, 8, 3, 90, 1, 12, 93, 2, 5, 96, 1, 14, 99, 4, 9, 102, 1, 8, 15, 6
Offset: 1

Views

Author

Antti Karttunen, Jan 09 2017

Keywords

Comments

a(n) = the maximal GF(2)[X]-divisor of n which in base 2 is either a palindrome or becomes a palindrome if trailing 0's are omitted.
More precisely: a(n) = the unique term m of A057890 for which A280500(n,m) > 0 and A091222(m) >= A091222(k) for all such terms k of A057890 for which A280500(n,k) > 0.
All terms are in A057890 and each term of A057890 occurs an infinite number of times.

Crossrefs

Programs

Formula

a(n) = A091255(n,A057889(n)).
Other identities. For all n >= 1:
a(A057889(n)) = a(n).
A048720(a(n), A280506(n)) = n.

A280508 a(n) = n XOR A057889(n).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 6, 0, 0, 0, 0, 0, 10, 0, 0, 12, 10, 0, 10, 12, 0, 0, 10, 0, 0, 0, 0, 0, 18, 0, 12, 20, 30, 0, 12, 0, 30, 24, 0, 20, 18, 0, 18, 20, 0, 24, 30, 0, 12, 0, 30, 20, 12, 0, 18, 0, 0, 0, 0, 0, 34, 0, 20, 36, 54, 0, 0, 24, 34, 40, 20, 60, 54, 0, 20, 24, 54, 0, 0, 60, 34, 48, 20, 0, 54, 40, 0, 36, 34, 0, 34, 36, 0, 40, 54, 0, 20, 48
Offset: 0

Views

Author

Antti Karttunen, Jan 09 2017

Keywords

Crossrefs

Cf. A057890 (positions of zeros).

Programs

Formula

a(n) = A003987(n,A057889(n)) = n XOR A057889(n).
Other identities. For all n >= 0:
a(A057889(n)) = a(n).

A280502 a(n) = A280500(n, A280501(n)).

Original entry on oeis.org

1, 2, 3, 4, 5, 1, 1, 8, 3, 3, 11, 2, 13, 2, 15, 16, 17, 1, 1, 1, 1, 22, 23, 4, 25, 26, 5, 4, 29, 5, 31, 32, 33, 15, 13, 2, 37, 2, 39, 2, 41, 2, 43, 44, 15, 13, 47, 8, 11, 50, 51, 52, 3, 3, 55, 8, 57, 11, 59, 3, 61, 62, 3, 64, 5, 31, 67, 5, 69, 26, 71, 4, 73, 74, 75, 4, 77, 29, 25, 4, 81, 82, 29, 4, 85, 25, 87, 88, 89, 5, 91, 26, 31, 94, 5, 16, 97, 22, 99, 100, 23, 17
Offset: 1

Views

Author

Antti Karttunen, Jan 09 2017

Keywords

Crossrefs

Cf. A118666 (positions of ones).

Programs

Formula

a(n) = A280500(n, A280501(n)).
Other identities. For all n >= 1:
A048720(a(n), A280501(n)) = n.

A280504 a(n) = A280500(n,A280503(n)).

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 1, 4, 1, 1, 11, 1, 13, 7, 1, 8, 1, 9, 19, 10, 1, 11, 13, 6, 25, 13, 1, 7, 11, 15, 1, 16, 1, 15, 13, 2, 37, 1, 11, 12, 41, 1, 25, 22, 1, 13, 47, 4, 11, 25, 1, 1, 19, 3, 55, 1, 13, 11, 59, 5, 61, 31, 1, 32, 1, 33, 67, 34, 69, 35, 61, 36, 1, 37, 13, 38, 59, 39, 25, 40, 81, 41, 11, 42, 1, 43, 87, 44, 55, 45, 91, 46, 1, 47, 19, 24, 97, 49, 1, 25, 13
Offset: 1

Views

Author

Antti Karttunen, Jan 09 2017

Keywords

Crossrefs

Cf. A044918 (very likely gives the positions of all ones).

Programs

Formula

a(n) = A280500(n,A280503(n)).
Other identities. For all n >= 1:
A048720(a(n), A280503(n)) = n.

A178226 Characteristic function of A154809 (numbers that are not binary palindromes).

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Jeremy Gardiner, May 23 2010

Keywords

Comments

a(n)=1 if n is in A154809, a(n)=0 otherwise.
Identical to parity of A086757 (Smallest prime p such that n is a palindrome in base p representation)

Crossrefs

Programs

  • Mathematica
    Table[If[IntegerDigits[n,2]==Reverse[IntegerDigits[n,2]],0,1],{n,0,120}] (* Harvey P. Dale, Aug 07 2023 *)
  • PARI
    A178226(n) = (n!=subst(Polrev(binary(n)),x,2)); \\ Antti Karttunen, Dec 15 2017

Formula

a(n) = 1 - A178225(n). - Antti Karttunen, Dec 15 2017

A303534 Amount by which n exceeds the largest binary palindrome less than or equal to n.

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 2, 3, 4, 5, 0, 1, 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 0, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 0, 1, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3
Offset: 0

Views

Author

Allan C. Wechsler, Apr 25 2018

Keywords

Examples

			The largest binary palindrome that doesn't exceed 30 is 27 (11011 r2). 30 - 27 = 3, so a(30) = 3.
		

Crossrefs

A006995 lists the binary palindromes.
A206913 gives the largest binary palindrome that does not exceed n.
Cf. also A261424 (analog in base 10), A280506, A303536.

Programs

Formula

a(n) = n - A206913(n).

Extensions

More terms from Altug Alkan, Apr 25 2018
Showing 1-7 of 7 results.