

A308085


a(n) is the least positive number k such that n*(n1)/2 + k*(k1)/2 is a square.


1



1, 1, 2, 3, 4, 2, 6, 7, 1, 9, 10, 6, 3, 13, 14, 2, 16, 17, 18, 4, 6, 21, 3, 23, 24, 9, 5, 27, 13, 4, 30, 31, 2, 6, 34, 35, 5, 37, 38, 16, 7, 30, 23, 6, 44, 20, 46, 8, 16, 1, 7, 51, 12, 53, 9, 42, 23, 8, 58, 59, 60, 10, 27, 63, 9, 65, 20, 67, 11, 69, 6, 10, 72, 3, 44, 12, 21, 77, 11, 34, 80, 46
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,3


COMMENTS

a(n) <= n1 if n > 1, because (n1)*(n2)/2 + n*(n1)/2 = (n1)^2.
a(7*k+2) <= k and a(7*k+6) <= k+2, because (7*k+2)*(7*k+1)/2 + k*(k1)/2 = (5*k+1)^2 and (7*k+6)*(7*k+5)/2 + (k+2)*(k+1)/2 = (5*k+4)^2.
From Bernard Schott, Jun 27 2019: (Start)
a(m) = 1 iff the triangular number t(m1) = (m1)*m/2 is a square, so iff m1 is in A001108, or m in A055997.
a(m) = 2 iff the triangular number t(m1) + 1 is a square, so iff m1 is in A006451. (End)


LINKS

Robert Israel, Table of n, a(n) for n = 1..10000


EXAMPLE

a(5) = 4 because 4*3/2 + 5*4/2 = 4^2 and none of 1*0/2 + 5*4/2, 2*1/2 + 5*4/2, 3*2/2 + 5*4/2 are squares.


MAPLE

f:= proc(n) local k;
for k from 1 do
if issqr((k*(k1)+n*(n1))/2) then return k fi
od
end proc:
map(f, [$1..100]);


PROG

(PARI) a(n) = {my(k=1); while (!issquare(n*(n1)/2 + k*(k1)/2), k++); k; } \\ Michel Marcus, Jun 27 2019


CROSSREFS

Cf. A000217, A055997 (a(n)=1).
Sequence in context: A206369 A152958 A278963 * A178970 A172054 A047994
Adjacent sequences: A308082 A308083 A308084 * A308086 A308087 A308088


KEYWORD

nonn,look


AUTHOR

J. M. Bergot and Robert Israel, Jun 05 2019


STATUS

approved



