OFFSET
1,3
MATHEMATICA
With[{s = Table[Count[Range[0, n - 1], _?(IntegerQ@ Sqrt[4 # + 1] &[(3 n (n + 1) + 1) - (3 # (# + 1) + 1)] &)], {n, 0, 2^10}]}, Map[-1 + FirstPosition[s, #][[1]] &, DeleteDuplicates@ s]] (* Michael De Vlieger, Dec 19 2021, after Amiram Eldar at A350090 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Marcus, Dec 19 2021
EXTENSIONS
a(1) = 0 inserted by and more terms from Jinyuan Wang, Dec 19 2021
STATUS
approved