OFFSET
1,2
MAPLE
A083121 := proc(nmax) local a119, anew, asum, n, a; a119 := [1] ; a := [1] ; while nops(a119) < nmax do n := nops(a119)+1 ; if n mod 2 = 0 then anew := 1 ; while anew in a119 do anew := anew+1 ; od ; a119 := [op(a119), anew] ; else asum := add(op(i, a119), i=ceil(n/2)..n-1) ; anew := 1 ; while anew in a119 or not issqr(asum+anew) do anew := anew+1 ; od ; a119 := [op(a119), anew] ; a := [op(a), sqrt(asum+anew)] ; fi ; od; a ; end: A083121(120) ; # R. J. Mathar, Jul 17 2007
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Apr 23 2003
EXTENSIONS
More terms from R. J. Mathar, Jul 17 2007
STATUS
approved