OFFSET
1,3
COMMENTS
See A317582 for similar sequences.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
EXAMPLE
For n = 5:
- a(1)^2 + a(4)^2 = 0^2 + 3^2 = 9 > 5,
- a(2)^2 + a(3)^2 = 1^2 + 2^2 = 5 <= 5,
- a(3)^2 + a(2)^2 = 2^2 + 1^2 = 5 <= 5,
- a(4)^2 + a(1)^2 = 3^2 + 0^2 = 9 > 5,
- hence a(5) = 2.
MATHEMATICA
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 *)
PROG
(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] ", "))
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Rémy Sigrist, Aug 02 2018
STATUS
approved