OFFSET
2,1
COMMENTS
For definitions see A103294.
LINKS
Hugo Pfoertner, Table of n, a(n) for n = 2..10001
Peter Luschny, Are optimal rulers of Wichmann type?
B. Wichmann, A note on restricted difference bases, J. Lond. Math. Soc. 38 (1963), 465-466.
FORMULA
a(n) = ( n^2 - (mod(n,6)-3)^2 ) / 3 + n.
Conjectures from Colin Barker, Jul 14 2017: (Start)
G.f.: x^2*(3 + 4*x^5 - 3*x^6) / ((1 - x)^3*(1 + x)*(1 - x + x^2)*(1 + x + x^2)).
a(n) = 2*a(n-1) - a(n-2) + a(n-6) - 2*a(n-7) + a(n-8) for n>9.
(End)
MATHEMATICA
Table[(n^2 - (Mod[n, 6] - 3)^2)/3 + n, {n, 2, 66}] (* Michael De Vlieger, Jul 14 2017 *)
PROG
(PARI) a(n) = n + (n^2 - (n%6 - 3)^2)/3; \\ Michel Marcus, Jul 14 2017
(Python)
def A289761(n): return (n+(m:=n%6))*(n-(k:=m-3))//3+k # Chai Wah Wu, Jun 20 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Hugo Pfoertner, Jul 12 2017
STATUS
approved