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

A268729 Transpose of A268728.

Original entry on oeis.org

0, 1, 0, 1, 2, 0, 0, 0, 7, 0, 1, 0, 3, 4, 0, 0, 2, 0, 3, 13, 0, 1, 0, 0, 0, 0, 14, 0, 1, 0, 4, 2, 0, 1, 11, 0, 1, 2, 7, 7, 1, 0, 1, 8, 0, 0, 0, 7, 0, 0, 1, 0, 0, 25, 0, 1, 0, 0, 4, 5, 15, 6, 0, 3, 26, 0, 1, 2, 0, 4, 13, 3, 10, 0, 0, 3, 31, 0, 1, 0, 0, 6, 0, 14, 2, 0, 6, 0, 0, 28, 0, 0, 0, 3, 0, 12, 4, 11, 7, 26, 1, 0, 1, 21, 0
Offset: 1

Views

Author

Antti Karttunen, Feb 19 2016

Keywords

Comments

See comments in A268728.

Examples

			The top left [1 .. 19] x [1 .. 19] section of the array:
0,  1, 1, 0, 1,  0,  1,  1,  1,  0,  1,  1,  1,  0,  1,  0,  1,  0,  1
0,  2, 0, 0, 2,  0,  0,  2,  0,  0,  2,  0,  0,  2,  0,  0,  2,  0,  0
0,  7, 3, 0, 0,  4,  7,  7,  0,  0,  0,  3,  3,  0,  0,  0,  7,  7,  0
0,  4, 3, 0, 2,  7,  0,  4,  4,  6,  0,  3,  7,  0,  0,  0,  3,  0,  2
0, 13, 0, 0, 1,  0,  5, 13,  0, 12, 13,  0,  0,  8,  0,  0, 13,  0,  0
0, 14, 1, 0, 1, 15,  3, 14,  4, 15,  0,  1, 14, 13,  0,  0, 15, 10, 14
0, 11, 1, 0, 6, 10,  2, 11,  9, 13,  7,  1,  0,  9, 11,  0,  0,  2, 10
0,  8, 0, 0, 0,  0,  7,  8,  0,  0, 11,  0,  6, 15,  0,  0,  8,  0,  0
0, 25, 3, 0, 6, 26,  2, 25, 12, 31, 14,  3,  1, 27,  9,  0,  0, 21, 25
0, 26, 3, 0, 1, 25,  1, 26,  1, 27, 13,  3, 11, 27,  3,  0,  8, 27,  0
0, 31, 0, 0, 5, 0,   0, 31,  0, 26, 14,  0, 14,  0,  0,  0, 17,  0, 11
0, 28, 1, 0, 6, 29,  3, 28,  0, 26,  3,  1,  8, 31, 15,  0, 11, 28, 19
0, 21, 1, 0, 0, 20,  1, 21, 12,  0,  8,  1,  8, 20,  0,  0,  8, 25,  8
0, 22, 0, 0, 6,  0,  4, 22,  0, 16, 10,  0,  9, 18,  0,  0, 14,  0,  9
0, 19, 3, 0, 5, 16,  5, 19,  4, 22, 10,  3, 12, 22,  2,  0, 18, 23, 10
0, 16, 3, 0, 5, 19,  4, 16,  9, 21, 15,  3, 11, 20, 15,  0, 10, 25, 16
0, 49, 0, 0, 2,  0,  3, 49,  0, 51,  0,  0,  3, 50,  0,  0,  1,  0, 26
0, 50, 1, 0, 0, 51,  0, 50, 12,  0, 13,  1,  8,  0,  0,  0,  1, 62,  3
0, 55, 1, 0, 2, 54,  1, 55,  1, 53,  1,  1,  2, 54,  2,  0,  2, 54, 26
		

Crossrefs

Cf. A268728.

Programs

A269158 Square array A(row,col) = F(row,(2*col)-1), where F(0,q) = F(1,q) = 0, F(2p,q) = F(p,q) XOR A003188(q), F(2p+1,q) = F(q mod 2p+1, 2p+1) XOR (2p+1 AND q). Array is read by descending antidiagonals as A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), ...

Original entry on oeis.org

0, 0, 1, 0, 2, 1, 0, 7, 3, 0, 0, 4, 3, 0, 1, 0, 13, 3, 0, 2, 0, 0, 14, 1, 0, 5, 1, 1, 0, 11, 1, 0, 2, 4, 0, 1, 0, 8, 1, 0, 1, 7, 7, 2, 1, 0, 25, 3, 0, 1, 12, 7, 7, 0, 0, 0, 26, 3, 0, 6, 15, 5, 4, 0, 0, 1, 0, 31, 3, 0, 5, 10, 3, 13, 4, 2, 2, 1, 0, 28, 1, 0, 6, 11, 2, 14, 9, 6, 0, 3, 1, 0, 21, 1, 0, 1, 26, 7, 11, 4, 12, 0, 3, 0, 0
Offset: 1

Views

Author

Antti Karttunen, Feb 20 2016

Keywords

Comments

The array gives the values of bivariate function F(p,q) which is well-defined only when q is odd, thus while here its argument p obtains all integer values from 1 onward, argument q gets only odd numbers 1, 3, 5, 7, 9, ... as its values.
Any row n occurs also as row (4^k * n), for all k >= 0.

Examples

			The top left [1 .. 16] x [1 .. 25] section of the array:
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
1,  2,  7,  4, 13, 14, 11,  8, 25, 26, 31, 28, 21, 22, 19, 16
1,  3,  3,  3,  1,  1,  1,  3,  3,  3,  1,  1,  1,  3,  3,  3
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
1,  2,  5,  2,  1,  1,  6,  5,  6,  1,  5,  6,  1,  6,  5,  5
0,  1,  4,  7, 12, 15, 10, 11, 26, 25, 30, 29, 20, 21, 16, 19
1,  0,  7,  7,  5,  3,  2,  7,  2,  1,  5,  3,  1,  4,  5,  4
1,  2,  7,  4, 13, 14, 11,  8, 25, 26, 31, 28, 21, 22, 19, 16
1,  0,  0,  4,  9,  4,  9,  5, 12,  1,  0,  0, 12,  9,  4,  9
0,  0,  2,  6, 12, 15, 13, 13, 31, 27, 26, 26, 20, 16, 22, 21
1,  2,  0,  0, 13, 11,  7, 11, 14, 13, 14,  3,  8, 10, 10, 15
1,  3,  3,  3,  1,  1,  1,  3,  3,  3,  1,  1,  1,  3,  3,  3
1,  0,  3,  7,  0, 14, 13,  6,  1, 11, 14,  8,  8,  9, 12, 11
0,  2,  0,  3,  8, 13,  9, 15, 27, 27, 26, 31, 20, 18, 22, 20
1,  0,  0,  0, 12,  0, 11, 15,  9,  3, 14, 15,  4,  8,  2, 15
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
1,  2,  7,  3, 13, 15,  0,  8, 17,  8, 17, 11,  8, 14, 18, 10
0,  2,  7,  0,  4, 10,  2, 13, 21, 27, 31, 28, 25, 31, 23, 25
1,  0,  0,  2,  0, 14, 10,  0, 25, 19, 11, 19,  8,  9, 10, 16
1,  2,  5,  2,  1,  1,  6,  5,  6,  1,  5,  6,  1,  6,  5,  5
1,  0,  0,  0,  1, 15, 11, 11,  0, 26, 21, 10, 17, 15, 10, 15
0,  0,  7,  4,  0,  5, 12,  3, 23, 23, 17, 31, 29, 28, 25, 31
1,  2,  3,  4,  1,  0, 13,  8, 26,  0, 31, 23, 13, 19,  8, 11
0,  1,  4,  7, 12, 15, 10, 11, 26, 25, 30, 29, 20, 21, 16, 19
1,  0,  0,  0,  5,  1,  1, 13, 25, 25,  0, 28, 25, 12, 25, 13
		

Crossrefs

Transpose: A269159.
Column 1: Seems to be 0 followed by A039982.
Column 32769: A268819.
Cf. A065621 (occurs as row 2, row 8, and in general, as any row 2^(2n+1) for n >= 0. Seems to be also present as a slanted diagonal F(2n+1,2n-1).)
Cf. A268816 (row 6, row 24, etc.).
Cf. arrays A268829 and A268728 (variants), and also A268931.

Programs

  • Mathematica
    F[p_, q_] := F[p, q] = Which[p <= 1, 0, p > 1 && OddQ[p], F[Mod[q, p], p] ~BitXor~ BitAnd[p, q], True, F[p/2, q] ~BitXor~ BitXor[q, Floor[q/2]]];
    A[n_, k_] := F[n, 2 k - 1];
    Table[A[n - k, k], {n, 1, 14}, {k, 1, n}] // Flatten (* Jean-François Alcover, Sep 11 2017 *)
  • Scheme
    (define (A269158 n) (A269158auxbi (A002260 n) (+ -1 (* 2 (A004736 n)))))
    ;; A269158auxbi can be implemented either as a tail-recursive loop:
    (define (A269158auxbi p q) (if (not (odd? q)) (error "A269158bi: the second argument should be odd: " p q) (let loop ((p p) (q q) (s 0)) (cond ((<= p 1) s) ((odd? p) (loop (modulo q p) p (A003987bi s (A004198bi p q)))) (else (loop (/ p 2) q (A003987bi s (A003987bi q (/ (- q 1) 2)))))))))
    ;; Or a recurrence (reflecting the given recursive formula):
    (define (A269158auxbi p q) (cond ((<= p 1) 0) ((even? p) (A003987bi (A269158auxbi (/ p 2) q) (A003188 q))) (else (A003987bi (A269158auxbi (modulo q p) p) (A004198bi p q)))))

Formula

A(row,col) = F(row,(2*col)-1), where function F is defined as: If p <= 1, F(p,q) = 0, otherwise if p is an odd number > 1, F(p,q) = F(q mod p, p) XOR (p AND q), otherwise [when p is an even number] F(p,q) = F(p/2,q) XOR A003188(q).

A268829 Square array A(row,col) = B(row,(2*col)-1), where B(p,q) = 0 if gcd(p,q) > 1, and 1 + 2*F(p,q) otherwise, where F is defined as in A269158. Array is read by descending antidiagonals as A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), ...

Original entry on oeis.org

1, 1, 3, 1, 5, 3, 1, 15, 0, 1, 1, 9, 7, 1, 3, 1, 27, 7, 1, 5, 1, 1, 29, 0, 1, 0, 0, 3, 1, 23, 3, 1, 5, 9, 1, 3, 1, 17, 3, 1, 3, 15, 15, 5, 3, 1, 51, 0, 1, 3, 0, 0, 15, 0, 1, 1, 53, 7, 1, 13, 31, 11, 9, 1, 1, 3, 1, 63, 7, 1, 0, 21, 7, 27, 9, 0, 5, 3, 1, 57, 0, 1, 13, 0, 5, 29, 0, 13, 1, 0, 3, 1, 43, 3, 1, 3, 53, 15, 23, 9, 25, 1, 7, 1, 1
Offset: 1

Views

Author

Antti Karttunen, Feb 20 2016

Keywords

Examples

			The top left [1 .. 16] x [1 .. 25] section of the array:
1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1
3,  5, 15,  9, 27, 29, 23, 17, 51, 53, 63, 57, 43, 45, 39, 33
3,  0,  7,  7,  0,  3,  3,  0,  7,  7,  0,  3,  3,  0,  7,  7
1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1
3,  5,  0,  5,  3,  3, 13,  0, 13,  3, 11, 13,  0, 13, 11, 11
1,  0,  9, 15,  0, 31, 21,  0, 53, 51,  0, 59, 41,  0, 33, 39
3,  1, 15,  0, 11,  7,  5, 15,  5,  3,  0,  7,  3,  9, 11,  9
3,  5, 15,  9, 27, 29, 23, 17, 51, 53, 63, 57, 43, 45, 39, 33
3,  0,  1,  9,  0,  9, 19,  0, 25,  3,  0,  1, 25,  0,  9, 19
1,  1,  0, 13, 25, 31, 27,  0, 63, 55, 53, 53,  0, 33, 45, 43
3,  5,  1,  1, 27,  0, 15, 23, 29, 27, 29,  7, 17, 21, 21, 31
3,  0,  7,  7,  0,  3,  3,  0,  7,  7,  0,  3,  3,  0,  7,  7
3,  1,  7, 15,  1, 29,  0, 13,  3, 23, 29, 17, 17, 19, 25, 23
1,  5,  1,  0, 17, 27, 19, 31, 55, 55,  0, 63, 41, 37, 45, 41
3,  0,  0,  1,  0,  1, 23,  0, 19,  7,  0, 31,  0,  0,  5, 31
1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1
3,  5, 15,  7, 27, 31,  1, 17,  0, 17, 35, 23, 17, 29, 37, 21
1,  0, 15,  1,  0, 21,  5,  0, 43, 55,  0, 57, 51,  0, 47, 51
3,  1,  1,  5,  1, 29, 21,  1, 51,  0, 23, 39, 17, 19, 21, 33
3,  5,  0,  5,  3,  3, 13,  0, 13,  3, 11, 13,  0, 13, 11, 11
3,  0,  1,  0,  0, 31, 23,  0,  1, 53,  0, 21, 35,  0, 21, 31
1,  1, 15,  9,  1,  0, 25,  7, 47, 47, 35, 63, 59, 57, 51, 63
3,  5,  7,  9,  3,  1, 27, 17, 53,  1, 63,  0, 27, 39, 17, 23
1,  0,  9, 15,  0, 31, 21,  0, 53, 51,  0, 59, 41,  0, 33, 39
3,  1,  0,  1, 11,  3,  3,  0, 51, 51,  1, 57,  0, 25, 51, 27
		

Crossrefs

Cf. arrays A268728, A269158.

Programs

  • Scheme
    (define (A268829 n) (let ((p (A002260 n)) (q (+ -1 (* 2 (A004736 n))))) (if (< 1 (gcd p q)) 0 (+ 1 (* 2 (A269158auxbi p q)))))) ;; This one uses the code of A269158.
    ;; The following is a more stand-alone implementation:
    (define (A268829 n) (A268829auxbi (A002260 n) (+ -1 (* 2 (A004736 n)))))
    (define (A268829auxbi p q) (if (not (odd? q)) (error "A268829auxbi: the second argument should be odd: " p q) (let loop ((p p) (q q) (s 0)) (cond ((zero? p) 0) ((= 1 p) (+ 1 (* 2 s))) ((odd? p) (loop (modulo q p) p (A003987bi s (A004198bi p q)))) (else (loop (/ p 2) q (A003987bi s (A003987bi q (/ (- q 1) 2)))))))))

Formula

A(i,j) = B(i,(2*j)-1), where B(p,q) = 0 if gcd(p,q) > 1, and 1 + 2*F(p,q) = 1 + 2*A269158(p,(q+1)/2) otherwise, where function F is defined as in A269158.

A268819 Column 32769 of array A269158: a(n) = F(n,65537), function F as defined in A269158.

Original entry on oeis.org

0, 98305, 3, 0, 6, 98306, 2, 98305, 12, 98311, 14, 3, 1, 98307, 9, 0, 24, 98317, 24, 6, 16, 98319, 27, 98306, 0, 98304, 23, 2, 30, 98312, 2, 98305, 48, 98329, 0, 12, 52, 98329, 6, 98311, 3, 98321, 3, 14, 14, 98330, 3, 3, 41, 98305, 43, 1, 4, 98326, 45, 98307, 6, 98335, 43, 9, 27, 98307, 19, 0, 27, 98353, 2, 24, 100, 98305, 1
Offset: 1

Views

Author

Antti Karttunen, Feb 25 2016

Keywords

Comments

Terms a(1) .. a(65536) occur as column 32769 in arrays A268728 and A269158.

Crossrefs

Cf. arrays A268728 and A269158.
Cf. A269157 (indices of zeros).

Programs

  • Scheme
    ;; Two variants, both give same results in range n=1..65536:
    (define (A268819 n) (A268728auxbi n 65537))
    (define (A268819 n) (A269158auxbi n 65537))

Formula

a(n) = F(n,65537) = A269158(n,32769), function F as defined in A269158.
Other identities. For n = 1..65536:
a(n) = A268728(n,32769).
A165471(n) = 1 - A010873(A052928(a(n))).

A290108 a(n) = A268819(n) mod 8.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Sep 11 2017

Keywords

Crossrefs

Programs

Formula

a(n) = A010877(A268819(n)) = A268819(n) mod 8.
Showing 1-5 of 5 results.