A386671 All integers k that can produce a closed walk in a square lattice via noncongruent primitive k-length hypotenuses, in ascending order.
40885, 69745, 98605, 127465, 146705, 175565, 214045, 233285, 242905, 262145, 271765, 329485, 358345, 377585, 416065, 435305, 464165, 473785, 550745, 560365, 579605, 618085, 646945, 666185, 675805, 695045, 704665, 752765, 762385, 787205, 810485, 839345, 848965
Offset: 1
Keywords
Examples
a(1) = 40885 because 40885-length hypotenuses of primitive Pythagorean triangles [38076, 14893] + [35844, 19667] + [11603, 39204] + [-34387, 22116] + [-37523, 16236] + [-26093, -31476] + [3636, -40723] + [8844, -39917] = [0, 0].
Links
- Charles L. Hohn, Base shape of walk where segment length a(n) is a Pythagorean prime multiple of 5 * 13 * 37
- Charles L. Hohn, a(1): (5 * 13 * 37) * 17, axis slope 15/8
- Charles L. Hohn, a(2): (5 * 13 * 37) * 29, axis slope 21/20
- Charles L. Hohn, a(3): (5 * 13 * 37) * 41, axis slope 40/9
- Charles L. Hohn, a(4): (5 * 13 * 37) * 53, axis slope 45/28
- Charles L. Hohn, a(30): (29 * 61 * 89) * 5, axis slope 4/3
Programs
-
PARI
is_a386671(k)={my(v=List); for(x=1, sqrtint(k^2/2), my(y=sqrtint(k^2-x^2)); if(x^2+y^2==k^2 && gcd([x, y, k])==1, listput(v, [x, y]))); return(if(#v>=3 && closable(v), 1, 0))} closable(v, c=vector(3))={my(o=!c[1] && !c[2]); if(#v==1, return(if(c[3] && (o || vecsort(abs([c[1], c[2]]))==vecsort(abs(v[1]))), 1, 0))); my(x, y, v2=v); listpop(v2); foreach(if(o, [0, 1], [0, 1, -1]), x, foreach(if(!x, [0], o, [1], [1, -1]), y, forperm(2, p, if(closable(v2, c+[v[#v][p[1]]*x, v[#v][p[2]]*y, abs(x)]), return(1)); if(!x || o, break)))); 0}
Comments