login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A259372
Smallest number whose sum of squares of some contiguous sectioning of it (into one or more parts) is n.
1
0, 1, 11, 111, 2, 12, 112, 1112, 22, 3, 13, 113, 222, 23, 123, 1123, 4, 14, 33, 133, 24, 124, 233, 1233, 224, 5, 15, 115, 1115, 25, 125, 1125, 44, 144, 35, 135, 6, 16, 116, 1116, 26, 45, 145, 335, 226, 36, 136, 1136, 444, 7, 17, 117, 46, 27, 127, 1127, 246
OFFSET
0,3
COMMENTS
This sequence differs from A055016 beginning with a(100): A055016(100) = 68, whereas a(100) = 10.
a(n) = n for n = 0, 1, 101, 1233, ..
LINKS
E. Angelini, Sum of squares -- and a concatenation, SeqFan list, June 23, 2015.
EXAMPLE
10 may be sectioned into a single part, the (sum of the) square of which is 100. Because it is the smallest number to have a sum of 100, a(100) = 10.
101 may be sectioned into two parts, 10 and 1, the sum of the squares of which is 101. Because it is the smallest number to have a sum of 101, a(101) = 101.
3355 may be sectioned into 3, 35, and 5, the sum of the squares of which is 1259. Because it is the smallest number to have a sum of 1259, a(1259) = 3355.
MATHEMATICA
a[0]=0; a[n_] := Min[ FromDigits/@ Flatten/@ IntegerDigits@ Flatten[ Permutations/@ Sqrt[ IntegerPartitions[ n, {1, 5}, Range[ Sqrt@ n]^2 ]], 1]]; a/@ Range[0, 99] (* Giovanni Resta, Jun 26 2015 *)
CROSSREFS
Cf. A055016.
Sequence in context: A266513 A356329 A055016 * A348871 A004287 A061493
KEYWORD
nonn,base
AUTHOR
Hans Havermann, Jun 25 2015
STATUS
approved