OFFSET
1,1
COMMENTS
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,6,0,-8).
FORMULA
EXAMPLE
For k = 3, (2^3-1)*2^3 = 7*8 = 56, and 2^3*(2^3+1) = 8*9 = 72. Then, 56 and 72 form the consecutive oblong pair surrounding the square (2^3)^2 = 64, and the square 64 is equidistant from 56 and 72 at a distance of 2^3.
For k = 4, (2^4-1)*2^4 = 15*16 = 240, and 2^4*(2^4+1) = 16*17 = 272. Then, 240 and 272 form the consecutive oblong pair surrounding the square (2^4)^2 = 256, and the square 256 is equidistant from 240 and 272 at a distance of 2^4.
MATHEMATICA
a[n_]:=4^Ceiling[n/2]+(-1)^n*2^(Ceiling[n/2]); Array[a, 34] (* James C. McMahon, Nov 16 2025 *)
(* Alternative: *)
LinearRecurrence[{0, 6, 0, -8}, {2, 6, 12, 20}, 34] (* James C. McMahon, Nov 16 2025 *)
PROG
(Python)
def A390325(n): return (m:=1<<(n+1>>1))*(m+(-1 if n&1 else 1)) # Chai Wah Wu, Nov 17 2025
CROSSREFS
KEYWORD
nonn,easy,changed
AUTHOR
Charles Kusniec, Nov 01 2025
STATUS
approved
