OFFSET
1,1
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,0,2,-2,0,-1,1).
FORMULA
For k >= 1, a(3k-2) = 4k^2 - 2k, a(3k-1) = 4k^2 and a(3k) = 4k^2 + 4k.
MATHEMATICA
Select[ Range[ 1000 ], Mod[ #, 2*Floor[ Sqrt[ # ]//N ] ]==0& ]
LinearRecurrence[{1, 0, 2, -2, 0, -1, 1}, {2, 4, 8, 12, 16, 24, 30}, 70] (* Harvey P. Dale, Dec 11 2022 *)
PROG
(PARI) is(n) = n%(2*sqrtint(n)) == 0;
CROSSREFS
KEYWORD
nonn
AUTHOR
Jinyuan Wang, Mar 09 2019
STATUS
approved