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.

A224985 Floor of the Euclidean distance of a point on the (1, 1, 1; 2, 2, 2) 3D walk.

Original entry on oeis.org

0, 1, 1, 1, 3, 4, 5, 7, 9, 10, 13, 15, 17, 20, 23, 25, 29, 33, 36, 40, 44, 48, 53, 58, 62, 67, 73, 77, 84, 89, 95, 102, 108, 114, 121, 128, 135, 143, 150, 157, 166, 174, 181, 190, 199, 207, 217, 226, 235, 245, 255, 265, 275, 286, 296, 307, 318, 329, 341, 352, 363, 376
Offset: 0

Views

Author

Jon Perry, Apr 22 2013

Keywords

Comments

Consider a standard 3-dimensional Euclidean lattice. We take 1 step along the positive x-axis, 1 along the positive y-axis, 1 along the positive z-axis, 2 along the positive x-axis, and so on.
This sequence gives the floor of the Euclidean distance to the origin after n steps.
The coordinates are (0,0,0), (1,0,0), (1,1,0), (1,1,1), (3,1,1), (3,3,1), (3,3,3), (6,3,3),... where the x, y and z-coordinates run through A000217. The squared distances are s = 0, 1, 2, 3, 11, 19, 27, 54,... which obey an 11th-order linear recurrence with g.f. -x*(1+4*x^3+x^6) / ( (1+x+x^2)^3*(x-1)^5), a(n) = floor(sqrt(s(n))). - R. J. Mathar, May 02 2013

Crossrefs

Programs

  • JavaScript
    p = new Array(0, 0, 0);
    for (a = 1; a < 100; a++) {
    p[a % 3] += Math.ceil(a/3);
    document.write(Math.floor(Math.sqrt(p[0] * p[0] + p[1] * p[1] + p[2] * p[2])) + ", ");
    }