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.

A301636 Square array T(n, k) read by antidiagonals upwards, n >= 0 and k >= 0: T(n, k) = square of the distance from n + k*i to nearest square of a Gaussian integer (where i denotes the root of -1 with positive imaginary part).

Original entry on oeis.org

0, 0, 1, 1, 1, 0, 1, 2, 1, 1, 0, 2, 4, 2, 4, 1, 1, 4, 2, 4, 9, 4, 2, 4, 1, 1, 5, 4, 4, 5, 5, 2, 0, 2, 5, 1, 1, 5, 8, 5, 1, 1, 5, 2, 0, 0, 2, 8, 10, 4, 2, 4, 5, 1, 1, 1, 1, 5, 10, 8, 5, 5, 9, 4, 2, 4, 4, 2, 4, 9, 5, 5, 8, 10, 9, 5, 5, 9, 9, 5, 5, 9, 4, 2, 4, 10
Offset: 0

Views

Author

Rémy Sigrist, Mar 25 2018

Keywords

Comments

The distance between two Gaussian integers is not necessarily integer, hence the use of the square of the distance.
This sequence is a complex variant of A053188.
See A301626 for the square array dealing with cubes of Gaussian integers.

Examples

			Square array begins:
  n\k|    0    1    2    3    4    5    6    7    8    9   10
  ---+-------------------------------------------------------
    0|    0    1    0    1    4    9    4    1    0    1    4
    1|    0    1    1    2    4    5    5    2    1    2    5
    2|    1    2    4    2    1    2    5    5    4    5    8
    3|    1    2    4    1    0    1    4    9    9   10    8
    4|    0    1    4    2    1    2    5   10   16   10    5
    5|    1    2    5    5    4    5    8   10   13    9    4
    6|    4    5    8   10    8    5    4    5    8   10    5
    7|    4    5    8   10    5    2    1    2    5   10    8
    8|    1    2    5    9    4    1    0    1    4    9   13
    9|    0    1    4    9    5    2    1    2    5   10   17
   10|    1    2    5   10    8    5    4    5    8   13   20
		

Crossrefs

Programs

  • PARI
    See Links section.

Formula

T(n, 0) <= A053188(n)^2.
T(n, 0) = 0 iff n is a square (A000290).
T(0, k) = 0 iff k is twice a square (A001105).
T(n, k) = 0 iff n + k*i = z^2 for some Gaussian integer z.

A301639 a(n) = square of the distance from n to nearest cube of a Gaussian integer.

Original entry on oeis.org

0, 0, 1, 4, 8, 9, 4, 1, 0, 1, 4, 4, 5, 8, 13, 20, 29, 40, 53, 64, 49, 36, 25, 16, 9, 4, 1, 0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 130, 117, 106, 97, 90, 85, 82, 81, 82, 85, 90, 97, 106, 117, 121, 100, 81, 64, 49, 36, 25, 16, 9, 4, 1, 0, 1, 4, 9, 16, 25
Offset: 0

Views

Author

Rémy Sigrist, Mar 25 2018

Keywords

Comments

The distance between two Gaussian integers is not necessarily integer, hence the use of the square of the distance.
This sequence is a variant of A074989: here we minimize norm(n - z^3) where z runs through every Gaussian integers, there we minimize abs(n - m^3) where m runs through every integers.

Examples

			For n = 4: the nearest Gaussian cubes to 4 are 2 + 2*i and 2 - 2*i, hence a(4) = (4-2)^2 + 2^2 = 8.
		

Crossrefs

Formula

a(n) = A301626(n, 0).
a(n) <= A074989(n)^2.
Showing 1-2 of 2 results.