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

A268728 Square array A(row,col) = B(row,(2*col)-1), where B(p,2q-1) = 0 if gcd(p,2q-1) > 1, and A269158(p,q) otherwise. 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, 0, 0, 0, 4, 3, 0, 1, 0, 13, 3, 0, 2, 0, 0, 14, 0, 0, 0, 0, 1, 0, 11, 1, 0, 2, 4, 0, 1, 0, 8, 1, 0, 1, 7, 7, 2, 1, 0, 25, 0, 0, 1, 0, 0, 7, 0, 0, 0, 26, 3, 0, 6, 15, 5, 4, 0, 0, 1, 0, 31, 3, 0, 0, 10, 3, 13, 4, 0, 2, 1, 0, 28, 0, 0, 6, 0, 2, 14, 0, 6, 0, 0, 1, 0, 21, 1, 0, 1, 26, 7, 11, 4, 12, 0, 3, 0, 0
Offset: 1

Views

Author

Antti Karttunen, Feb 19 2016

Keywords

Comments

The array gives the values of bivariate function B(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, 0, 3, 3,  0,  1,  1,  0,  3,  3,  0,  1,  1,  0,  3,  3
  0, 0, 0, 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
  1, 2, 0, 2,  1,  1,  6,  0,  6,  1,  5,  6,  0,  6,  5,  5
  0, 0, 4, 7,  0, 15, 10,  0, 26, 25,  0, 29, 20,  0, 16, 19
  1, 0, 7, 0,  5,  3,  2,  7,  2,  1,  0,  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,  0,  4,  9,  0, 12,  1,  0,  0, 12,  0,  4,  9
  0, 0, 0, 6, 12, 15, 13,  0, 31, 27, 26, 26,  0, 16, 22, 21
  1, 2, 0, 0, 13,  0,  7, 11, 14, 13, 14,  3,  8, 10, 10, 15
  1, 0, 3, 3,  0,  1,  1,  0,  3,  3,  0,  1,  1,  0,  3,  3
  1, 0, 3, 7,  0, 14,  0,  6,  1, 11, 14,  8,  8,  9, 12, 11
  0, 2, 0, 0,  8, 13,  9, 15, 27, 27,  0, 31, 20, 18, 22, 20
  1, 0, 0, 0,  0,  0, 11,  0,  9,  3,  0, 15,  0,  0,  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,  0,  8, 17, 11,  8, 14, 18, 10
  0, 0, 7, 0,  0, 10,  2,  0, 21, 27,  0, 28, 25,  0, 23, 25
  1, 0, 0, 2,  0, 14, 10,  0, 25,  0, 11, 19,  8,  9, 10, 16
  1, 2, 0, 2,  1,  1,  6,  0,  6,  1,  5,  6,  0,  6,  5,  5
  1, 0, 0, 0,  0, 15, 11,  0,  0, 26,  0, 10, 17,  0, 10, 15
  0, 0, 7, 4,  0,  0, 12,  3, 23, 23, 17, 31, 29, 28, 25, 31
  1, 2, 3, 4,  1,  0, 13,  8, 26,  0, 31,  0, 13, 19,  8, 11
  0, 0, 4, 7,  0, 15, 10,  0, 26, 25,  0, 29, 20,  0, 16, 19
  1, 0, 0, 0,  5,  1,  1,  0, 25, 25,  0, 28,  0, 12, 25, 13
		

Crossrefs

Transpose: A268729.
Column 1: Seems to be 0 followed by A039982.
Cf. A065621 (occurs as row 2, row 8, and in general, as any row 2^(2n+1) for n >= 0).
Cf. A268829, A269158 (variants).

Programs

  • Scheme
    (define (A268728 n) (A268728bi (A002260 n) (+ -1 (* 2 (A004736 n)))))
    (define (A268728bi p q) (if (not (odd? q)) (error "A268728bi: the second argument should be odd: " p q) (let loop ((p p) (q q) (s 0)) (cond ((zero? p) 0) ((= 1 p) 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)))))))))
    ;; Alternative implementation using the definition given in A269158:
    (define (A268728 n) (let ((p (A002260 n)) (q (+ -1 (* 2 (A004736 n))))) (if (< 1 (gcd p q)) 0 (A269158auxbi p q))))

Formula

A(row,col) = B(row,(2*col)-1), where function B(p,q) [only odd values allowed for q] is defined as: If gcd(p,q) > 1, B(p,q) = 0, otherwise B(p,q) = F(p,q) = A269158(p,(q+1)/2), function F defined as in A269158.

A269159 Transpose of A269158.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Feb 20 2016

Keywords

Comments

See comments in A269158.

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, 3, 0,  2,  1,  0,  2,  0,  0,  2,  3,  0,  2,  0,  0,  2,  2,  0
0,  7, 3, 0,  5,  4,  7,  7,  0,  2,  0,  3,  3,  0,  0,  0,  7,  7,  0
0,  4, 3, 0,  2,  7,  7,  4,  4,  6,  0,  3,  7,  3,  0,  0,  3,  0,  2
0, 13, 1, 0,  1, 12,  5, 13,  9, 12, 13,  1,  0,  8, 12,  0, 13,  4,  0
0, 14, 1, 0,  1, 15,  3, 14,  4, 15, 11,  1, 14, 13,  0,  0, 15, 10, 14
0, 11, 1, 0,  6, 10,  2, 11,  9, 13,  7,  1, 13,  9, 11,  0,  0,  2, 10
0,  8, 3, 0,  5, 11,  7,  8,  5, 13, 11,  3,  6, 15, 15,  0,  8, 13,  0
0, 25, 3, 0,  6, 26,  2, 25, 12, 31, 14,  3,  1, 27,  9,  0, 17, 21, 25
0, 26, 3, 0,  1, 25,  1, 26,  1, 27, 13,  3, 11, 27,  3,  0,  8, 27, 19
0, 31, 1, 0,  5, 30,  5, 31,  0, 26, 14,  1, 14, 26, 14,  0, 17, 31, 11
0, 28, 1, 0,  6, 29,  3, 28,  0, 26,  3,  1,  8, 31, 15,  0, 11, 28, 19
0, 21, 1, 0,  1, 20,  1, 21, 12, 20,  8,  1,  8, 20,  4,  0,  8, 25,  8
0, 22, 3, 0,  6, 21,  4, 22,  9, 16, 10,  3,  9, 18,  8,  0, 14, 31,  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, 1, 0,  2, 48,  3, 49, 13, 51,  1,  1,  3, 50,  2,  0,  1, 60, 26
0, 50, 1, 0,  1, 51,  3, 50, 12, 51, 13,  1,  8, 49,  6,  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. A269158 (transpose), A268729 (variant).

Programs

Showing 1-2 of 2 results.