A259372 Smallest number whose sum of squares of some contiguous sectioning of it (into one or more parts) is n.
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
Examples
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.
Links
- Hans Havermann, Table of n, a(n) for n = 0..10000
- E. Angelini, Sum of squares -- and a concatenation, SeqFan list, June 23, 2015.
Crossrefs
Cf. A055016.
Programs
-
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 *)
Comments