OFFSET
0,9
COMMENTS
a(n)<=8 for n<10^9, with a(n)=8 for 3703393 values <=10^9.
Conjecturally, a(n)<=8 with a(n)=8 infinitely often.
a(n)>0 for n>23. This follows from n=4j+9k for j,k>=0.
If a(n)!=-1 then a(n)>=A002828(n). - David W. Wilson, Sep 07 2016
LINKS
David W. Wilson, Table of n, a(n) for n = 0..10000
EXAMPLE
a(17)=3 since 17=2^2+2^2+3^2. a(29)=2 since 29=2^2+5^2.
MATHEMATICA
Table[Min[Length /@ Select[Map[DeleteCases[#, k_ /; ! PrimeQ@ Sqrt@ k] &, IntegerPartitions@ n], Total@ # == n &] /. {} -> {-1}], {n, 0, 50}] (* Michael De Vlieger, Sep 08 2016 *)
CROSSREFS
KEYWORD
sign
AUTHOR
Dmitry Kamenetsky, Jan 01 2011
EXTENSIONS
a(0) added by David W. Wilson, Sep 07 2016
STATUS
approved