OFFSET
0,1
EXAMPLE
a(1) = 0: A245575(0) = #{0+0} = 1;
a(2) = 1: A245575(1) = #{1+0, 0+1} = 2;
a(3) = 2: A245575(2) = #{2+0, 1+1, 0+2} = 3;
a(4) = 6: A245575(6) = #{6+0, 4+2, 2+4, 0+6} = 4;
a(5) = 18: A245575(18) = #{16+2, 12+6, 9+9, 6+12, 2+16} = 5;
a(6) = 36: A245575(36) = #{36+0, 30+6, 20+16, 16+20, 6+30, 0+36} = 6.
MATHEMATICA
nmax = 36000;
qsQ[n_] := qsQ[n] = With[{s = Sqrt[n]}, Which[IntegerQ[s], True, n == Floor[s] (Floor[s]+1), True, True, False]];
A245575[n_] := Count[Range[0, n], k_ /; qsQ[k] && qsQ[n-k]];
Table[{A245575[n], n}, {n, 0, nmax}] // Sort // SplitBy[#, First]& // #[[All, 1, 2]]& (* Jean-François Alcover, May 08 2017 *)
PROG
(Haskell)
import Data.List (elemIndex); import Data.Maybe (fromJust)
a240952 = fromJust . (`elemIndex` a245575_list)
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Reinhard Zumkeller, Aug 04 2014
EXTENSIONS
a(21)-a(32) from Jinyuan Wang, Jul 08 2021
STATUS
approved