Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #13 Aug 06 2018 19:51:17
%S 0,1,2,3,2,2,4,4,2,3,6,5,4,2,6,4,4,7,6,5,4,10,6,4,6,8,8,3,6,8,6,5,8,
%T 11,6,6,12,10,0,10,14,9,4,10,16,8,6,11,12,8,8,16,14,6,10,13,12,6,12,
%U 14,8,8,14,13,4,10,14,16,4,12,16,13,8,16,18,10,10
%N a(n) is the number of k with 1 <= k <= n-1 such that a(k)^2 + a(n-k)^2 <= n.
%C See A317582 for similar sequences.
%H Rémy Sigrist, <a href="/A317638/b317638.txt">Table of n, a(n) for n = 1..10000</a>
%e For n = 5:
%e - a(1)^2 + a(4)^2 = 0^2 + 3^2 = 9 > 5,
%e - a(2)^2 + a(3)^2 = 1^2 + 2^2 = 5 <= 5,
%e - a(3)^2 + a(2)^2 = 2^2 + 1^2 = 5 <= 5,
%e - a(4)^2 + a(1)^2 = 3^2 + 0^2 = 9 > 5,
%e - hence a(5) = 2.
%t a[n_] := a[n] = Length@ Select[ Range[n - 1], a[#]^2 + a[n - #]^2 <= n &]; a[0] = 0; Array[a, 80] (* _Robert G. Wilson v_, Aug 03 2018 *)
%o (PARI) a = vector(73); for (n=1, #a, a[n] = sum(k=1, n-1, a[k]^2 + a[n-k]^2 <= n); print1 (a[n] ", "))
%Y Cf. A317582.
%K nonn,look
%O 1,3
%A _Rémy Sigrist_, Aug 02 2018