OFFSET
0,3
COMMENTS
a(4*k+1) = (k+1)^2 for k >= 0.
REFERENCES
J. H. Conway and R. K. Guy, The Book of Numbers, Copernicus Press, NY, 1996. Sequence can be obtained by reading the successive circled numbers in the second display on page 64.
FORMULA
Let b=4. If n == -i (mod b) for 0 <= i < b, then a(n) = binomial(b,i+1)*((n+i)/b)^(i+1).
MAPLE
f:=proc(n, b) local i;
for i from 0 to b-1 do
if ((n+i) mod b) = 0 then return(binomial(b, i+1)*((n+i)/b)^(i+1)); fi;
od;
end;
[seq(f(n, 3), n=0..60)];
PROG
(Python)
from sympy import binomial
def A346006(n):
i = (4-n)%4
return binomial(4, i+1)*((n+i)//4)**(i+1) # Chai Wah Wu, Jul 25 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jul 25 2021
STATUS
approved