OFFSET
1,2
COMMENTS
Asking for 2^n different values implies that a(n) differs from all a(k), k<n and in view of the minimality condition, also that a(n) > a(n-1) for n>1.
Note that a(n) is close to, but not always larger than sum(a(k),k=1..n-1), as opposed to the case in A064934.
EXAMPLE
Up to a(4)=16, we have a(n)=n^2.
But since 5^2=25=9+16 is already represented as sum of earlier terms, this is excluded, while a(5)=6^2=36 has the required property.
Obviously, any square larger to the sum of all preceding terms leads to enough new terms, thus a(n) <= floor( sqrt( sum(a(k),k=1..n-1))+1)^2.
But in contrast to A064934, such a simple formula (with equality) cannot be used here:
a(7)=12^2=144 < 147=sum(a(k),k<7) and also a(10)=sum(a(k),k<10)-84.
PROG
(PARI) {s=1; p=0; for( n=1, 20, until( !bitand( s, s>>(p^2) ), p++); s+=s<<(p^2); print1( p^2, ", "))}
CROSSREFS
KEYWORD
nonn
AUTHOR
M. F. Hasler, Apr 09 2008
EXTENSIONS
a(24)-a(30) from Donovan Johnson, Oct 03 2009
STATUS
approved