Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #23 Jul 31 2015 04:11:44
%S 1,7,11,21,29,3,5,13,19,31,41,9,23,27,45,53,75,87,113,15,17,33,39,59,
%T 69,93,35,37,61,67,95,105,57,71,91,109,133,155,183,209,79,49,151,137,
%U 25,47,51,77,85,43,55,73,89,111,131,157,181,107,135,65,63,99,101,141,147,191,97,103,139,149,189,203,247,145
%N With a(1) = 1, a(n) is the smallest number not already in the sequence such that the arithmetic mean of two neighboring terms is a square.
%C Conjectured to be a permutation of the odd numbers.
%C A259602(n) = (a(n) + a(n+1)) / 2; a(A259526(n)) = 2*n-1. - _Reinhard Zumkeller_, Jun 29 2015
%H Reinhard Zumkeller, <a href="/A259260/b259260.txt">Table of n, a(n) for n = 1..10000</a>
%t s={1}; Do[n = Last@ s; a=2; While[(b = 2*a^2 - n) <= 0 || MemberQ[s, b], a++]; AppendTo[s, b], {100}]; s (* _Giovanni Resta_, Jun 23 2015 *)
%o (PARI) v=[1];n=1;while(#v<100,s=(n+v[#v])/2;if(type(s)=="t_INT",if(issquare(s)&&!vecsearch(vecsort(v),n),v=concat(v,n);n=0));n++);v
%o (Haskell)
%o import Data.List (delete)
%o a259260 n = a259260_list !! (n-1)
%o a259260_list = 1 : f 1 [3, 5 ..] where
%o f x zs = g zs where
%o g (y:ys) = if a010052 ((x + y) `div` 2) == 1
%o then y : f y (delete y zs) else g ys
%o -- _Reinhard Zumkeller_, Jun 29 2015
%Y Cf. A034175, A086517.
%Y Cf. A010052, A005408.
%Y Cf. A259602, A259565, A259429, A259542.
%K nonn
%O 1,2
%A _Derek Orr_, Jun 22 2015