# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a036465 Showing 1-1 of 1 %I A036465 #27 May 08 2022 09:21:24 %S A036465 1,1,2,3,3,2,4,4,6,6,6,5,7,9,8,8,9,8,12,8,12,8,12,15,13,12,14,20,18, %T A036465 14,16,18,17,21,18,14,19,19,24,23,21,18,24,27,23,20,24,23,30,24,26,28, %U A036465 27,33,28,28,40,30,36,28,31,34,32,39,36,31,34,35,42,30 %N A036465 If n^2 = Sum_{i} b(i)^2 for positive integers b(i) < n, then a(n) is the maximum value of min(b(i)). %H A036465 Alois P. Heinz, Table of n, a(n) for n = 2..800 %e A036465 a(9) = 4 since 9^2 = 7^2 + 4^2 + 4^2. %p A036465 b:= proc(n, i) option remember; (s-> `if`(i=1, 1, %p A036465 `if`(s>=n and issqr(n), isqrt(n), max( %p A036465 `if`(s>n, 0, b(n-s, i)), b(n, i-1)))))(i^2) %p A036465 end: %p A036465 a:= n-> b(n^2, n-1): %p A036465 seq(a(n), n=2..75); # _Alois P. Heinz_, Nov 03 2020 %t A036465 b[n_, i_] := b[n, i] = Function[s, If[i == 1, 1, %t A036465 If[s >= n && IntegerQ@Sqrt[n], Sqrt[n], Max[ %t A036465 If[s > n, 0, b[n-s, i]], b[n, i-1]]]]][i^2]; %t A036465 a[n_] := b[n^2, n-1]; %t A036465 Table[a[n], {n, 2, 75}] (* _Jean-François Alcover_, May 08 2022, after _Alois P. Heinz_ *) %K A036465 nonn %O A036465 2,3 %A A036465 _Erich Friedman_ %E A036465 Title improved by _Sean A. Irvine_, Nov 03 2020 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE