%I #11 Nov 12 2020 01:16:20
%S 0,1,2,0,1,4,1,3,3,0,1,5,1,1,1,4,4,3,0,1,5,2,0,1,6,2,6,2,4,6,1,4,2,3,
%T 4,6,2,3,1,8,3,4,3,1,5,5,2,1,4,4,7,5,3,2,4,4,4,4,5,2,4,3,1,7,3,2,8,5,
%U 2,4,4,6,7,6,2,9,4,6,4,2,6,4,5,6,2,3,5
%N a(n) is the number of distinct k such that 0 < k < n and a(k) + ... + a(n-1) is a square number.
%C If a(n) = 0, then a(n+1) = 1 and a(n+2) >= 2.
%H Rémy Sigrist, <a href="/A338773/b338773.txt">Table of n, a(n) for n = 1..10000</a>
%H Rémy Sigrist, <a href="/A338773/a338773.gp.txt">PARI program for A338773</a>
%e The first terms, alongside the corresponding k's, are:
%e n a(n) Corresponding k's
%e -- ---- -----------------
%e 1 0 {}
%e 2 1 {1}
%e 3 2 {1, 2}
%e 4 0 {}
%e 5 1 {4}
%e 6 4 {1, 2, 4, 5}
%e 7 1 {6}
%e 8 3 {1, 2, 7}
%e 9 3 {4, 5, 7}
%e 10 0 {}
%o (PARI) See Links section.
%Y See A338774 for a similar sequence.
%K nonn
%O 1,3
%A _Rémy Sigrist_, Nov 08 2020