OFFSET
1,2
COMMENTS
The 8 main spokes are (with 1 in the center, 2 to the east, 3 to the northeast): east: A054552; northeast: A054554; north: A054556; northwest: A053755; west: A054567; southwest: A054569; south: A033951; southeast: A016754.
LINKS
Karl-Heinz Hofmann, Table of n, a(n) for n = 1..10000
Karl-Heinz Hofmann, Visualization of the first few terms
Index entries for linear recurrences with constant coefficients, signature (2,-1,0,0,0,0,0,1,-2,1).
FORMULA
G.f.: x*(1-x^8+x^9)/((1-x)^3*(1+x)*(1+x^2)*(1+x^4)). - Joerg Arndt, Dec 29 2022
a(n) = floor((n+3)^2 / 16) + (1 if n != 1 mod 8). - Kevin Ryde, Dec 30 2022
EXAMPLE
See visualization in links.
MATHEMATICA
Rest@ CoefficientList[Series[x (1 - x^8 + x^9)/((1 - x)^3*(1 + x) (1 + x^2) (1 + x^4)), {x, 0, 63}], x] (* Michael De Vlieger, Dec 29 2022 *)
a[n_] := BitShiftRight[(n + 3)^2, 4] + Boole[BitAnd[n, 7] != 1]; Array[a, 65] (* Amiram Eldar, Dec 30 2022, after the PARI code *)
PROG
(Python)
def A357745(n): return ((n+3)**2 >> 4) + 1 if n % 8 != 1 else (n+3)**2 >> 4
(PARI) a(n) = sqr(n+3)>>4 + (bitand(n, 7)!=1); \\ Kevin Ryde, Dec 30 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Karl-Heinz Hofmann, Dec 22 2022
STATUS
approved