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.
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..10000
Index entries for linear recurrences with constant coefficients, signature (0,0,0,5,0,0,0,-10,0,0,0,10,0,0,0,-5,0,0,0,1).
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).
G.f.: x*(1 + 4*x + 6*x^2 + 4*x^3 + 11*x^4 + 12*x^5 - 6*x^6 - 12*x^7 + 11*x^8 - 12*x^9 - 6*x^10 + 12*x^11 + x^12 - 4*x^13 + 6*x^14 - 4*x^15)/((1 - x)^5*(1 + x)^5*(1 + x^2)^5). - Andrew Howroyd, Nov 12 2025
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
(PARI) a(n) = { my(r=(-n)%4); binomial(4, r+1)*((n+r)/4)^(r+1) } \\ Andrew Howroyd, Nov 12 2025
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jul 25 2021
STATUS
approved
