OFFSET
2,2
COMMENTS
Leading term in length A289761 of longest perfect Wichmann ruler with n segments.
LINKS
Hugo Pfoertner, Table of n, a(n) for n = 2..10001
FORMULA
a(n) = A289761(n) - n.
G.f.: x^2*(1 + x - x^2)*(1 + x^2 - x^3 + 2*x^4 + x^5) / ((1 - x)^3*(1 + x)*(1 - x + x^2)*(1 + x + x^2)) (conjectured). - Colin Barker, Jul 14 2017
Can be seen as a family of parabolas p_{n}(x) = (2*n - 3*(1 + x))*(1 + x) evaluated at x = 2*floor(n/6)). - Peter Luschny, Jul 14 2017
MAPLE
p := (n, x) -> (2*n - 3*(1 + x))*(1 + x):
a := n -> p(n, 2*floor(n/6)):
seq(a(n), n = 2..64); # Peter Luschny, Jul 14 2017
MATHEMATICA
Table[(n^2 - (Mod[n, 6] - 3)^2)/3, {n, 2, 64}] (* Michael De Vlieger, Jul 14 2017 *)
PROG
(Python)
def A289873(n): return (n+(m:=n%6))*(n-(k:=m-3))//3+k-n # Chai Wah Wu, Jun 20 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Hugo Pfoertner, Jul 14 2017
STATUS
approved