login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) = smallest k >= 0 for which there is a sequence n = b_1 < b_2 < ... < b_t = n + k such that b_1 + b_2 +...+ b_t is a perfect square.
1

%I #18 Oct 27 2016 12:18:59

%S 0,0,2,3,0,5,4,2,6,0,4,2,1,5,4,3,0,2,4,4,3,6,5,3,1,0,2,6,4,6,4,2,3,5,

%T 4,5,0,5,4,3,1,7,6,4,7,5,4,2,4,0,7,6,7,6,4,3,7,6,5,3,1,5,4,4,0,8,7,8,

%U 7,6,4,2,5,4,2,8,7,6,4,4,9,0,5,3,1,6,5

%N a(n) = smallest k >= 0 for which there is a sequence n = b_1 < b_2 < ... < b_t = n + k such that b_1 + b_2 +...+ b_t is a perfect square.

%C Records occur at n = 1, 2, 3, 5, 8, 41, 65, 80, 90, 183, 292, 467, 627, 1428, 1547, 1666, 1999, 3568, 4012, 5737, 7458, 12119, 13640, 14365, 21859, 28445, 37408, 38839, 40763, 50346, 50347, 92063, ...

%H David A. Corneth, <a href="/A277516/b277516.txt">Table of n, a(n) for n = 0..9999 (First 3001 terms from Peter Kagey)</a>

%F a(n) = A277278(n) - n.

%e a(1) = 0 via 1 = 1^2;

%e a(2) = 2 via 2 + (2+1) + (2+2) = 3^2;

%e a(6) = 4 via 6 + (6+4) = 4^2.

%o (Haskell)

%o a277516 n = a277278 n - n

%Y Cf. A277278.

%K nonn,easy

%O 0,3

%A _Peter Kagey_, Oct 19 2016