login
a(n) = n minus the number of positive squares needed to sum to n using the greedy algorithm: a(n) = n - A053610(n).
9

%I #9 Aug 18 2015 00:39:11

%S 0,0,0,0,3,3,3,3,6,8,8,8,8,11,11,11,15,15,15,15,18,18,18,18,21,24,24,

%T 24,24,27,27,27,27,30,32,32,35,35,35,35,38,38,38,38,41,43,43,43,43,48,

%U 48,48,48,51,51,51,51,54,56,56,56,56,59,59,63,63,63,63,66,66,66,66,69,71,71,71,71,74,74,74,78,80

%N a(n) = n minus the number of positive squares needed to sum to n using the greedy algorithm: a(n) = n - A053610(n).

%H Antti Karttunen, <a href="/A260740/b260740.txt">Table of n, a(n) for n = 0..10000</a>

%F a(n) = n - A053610(n).

%F As a recurrence:

%F a(0) = 0; for n >= 1, a(n) = -1 + A048760(n) + a(n-A048760(n)). [Where A048760(n) gives the largest square <= n.]

%F Other identities. For all n >= 1:

%F a(n) = A255131(n) - A062535(n).

%o (Scheme, two variants)

%o (define (A260740 n) (- n (A053610 n)))

%o (definec (A260740 n) (if (zero? n) n (+ -1 (A048760 n) (A260740 (- n (A048760 n))))))

%Y Cf. A048760, A053610, A062535, A255131, A261221, A261222, A261223, A261224.

%Y Cf. also A261225.

%K nonn

%O 0,5

%A _Antti Karttunen_, Aug 12 2015