OFFSET
1,5
MAPLE
# Use se(n) to find the first n terms of the sequence and te(n) to find the n-th term. se:=proc(n) local L, S, k, m, i, j: L:=[]:S:={}: for k from 1 to n do m:=ceil(sqrt(k/2)): for i from 1 to m do for j from 1 to m do if i^2+j^2<=k then S:={op(S), i^2+j^2}: fi:od:od: L:=[op(L), nops(S)]: od: end proc: te:=proc(n) local S, m, i, j: m:=ceil(sqrt(n/2)): S:={}: for i from 1 to m do for j from 1 to m do if i^2+j^2<=n then S:={op(S), i^2+j^2}: fi:od:od: return nops(S): end proc:
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Nick Loughlin, Dec 09 2008
STATUS
approved