# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a233420 Showing 1-1 of 1 %I A233420 #14 Dec 16 2013 00:14:01 %S A233420 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, %T A233420 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, %U A233420 2,3,4,2,2,3,3,3,4,2,3,4,2,3,3,3 %N A233420 Minimal number of c-squares (A020330) and/or 1's which add to n. %C A233420 Conjecture: the sequence is bounded by a constant. %e A233420 For n=33, we have 33=15+15+3. Since 33 is not in union of {1} and c-squares and is not a sum of two such numbers, then a(33)=3. %o A233420 (PARI) v=vector(10^5,n,n+n<<#binary(n)); \\ choose large enough that v[#v] > n for a(n) below. %o A233420 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=where-1,1,-1,t=min(w(n-v[i]),t); if(t==1,return(2))); t+1 \\ _Charles R Greathouse IV_, Dec 10 2013 %Y A233420 Cf. A020330, A233312. %K A233420 nonn %O A233420 1,2 %A A233420 _Vladimir Shevelev_, Dec 09 2013 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE