login
a(1) = 1, a(2) = 2, a(n) = smallest positive integer not occurring earlier such that the sum of three successive terms is a square.
7

%I #8 Jun 23 2015 11:22:20

%S 1,2,6,8,11,17,21,26,34,4,43,53,25,3,36,10,18,72,31,41,9,14,13,22,29,

%T 30,5,46,49,74,73,78,45,102,109,113,67,16,38,27,35,19,90,12,42,115,39,

%U 15,142,68,79,177,33,114,214,156,71,62,63,44,37,40,23,58,88,50,87,7,75

%N a(1) = 1, a(2) = 2, a(n) = smallest positive integer not occurring earlier such that the sum of three successive terms is a square.

%H Ivan Neretin, <a href="/A076991/b076991.txt">Table of n, a(n) for n = 1..10000</a>

%t a = {1, 2}; Do[s = a[[-1]] + a[[-2]]; k = Floor[Sqrt[s]] + 1; While[MemberQ[a, k^2 - s], k++]; AppendTo[a, k^2 - s], {n, 3, 70}]; a (* _Ivan Neretin_, May 25 2015 *)

%Y Cf. A076093, A077396, A034175.

%K nonn,look

%O 1,2

%A _Amarnath Murthy_, Oct 25 2002

%E More terms from _David Garber_, Oct 30 2002