

A233420


Minimal number of csquares (A020330) and/or 1's which add to n.


3



1, 2, 1, 2, 3, 2, 3, 4, 3, 1, 2, 3, 2, 3, 1, 2, 3, 2, 3, 2, 3, 4, 3, 4, 2, 3, 4, 3, 4, 2, 3, 4, 3, 4, 3, 1, 2, 3, 2, 3, 4, 3, 4, 5, 1, 2, 3, 2, 3, 4, 2, 3, 4, 1, 2, 3, 2, 3, 4, 2, 3, 4, 1, 2, 3, 2, 3, 4, 2, 3, 4, 2, 2, 3, 3, 3, 4, 2, 3, 4, 2, 3, 3, 3
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

Conjecture: the sequence is bounded by a constant.


LINKS

Table of n, a(n) for n=1..84.


EXAMPLE

For n=33, we have 33=15+15+3. Since 33 is not in union of {1} and csquares and is not a sum of two such numbers, then a(33)=3.


PROG

(PARI) v=vector(10^5, n, n+n<<#binary(n)); \\ choose large enough that v[#v] > n for a(n) below.
a(n)=if(setsearch(v, n), return(1)); if(n<3, return(n)); my(where=setsearch(v, n+1, 1), t=n); if(!where, where=setsearch(v, n, 1)); forstep(i=where1, 1, 1, t=min(w(nv[i]), t); if(t==1, return(2))); t+1 \\ Charles R Greathouse IV, Dec 10 2013


CROSSREFS

Cf. A020330, A233312.
Sequence in context: A053735 A033667 A033923 * A220098 A246017 A116939
Adjacent sequences: A233417 A233418 A233419 * A233421 A233422 A233423


KEYWORD

nonn


AUTHOR

Vladimir Shevelev, Dec 09 2013


STATUS

approved



