OFFSET
0,3
COMMENTS
Row sums of A116948.
Place n+2 equally-spaced points around a circle, labeled 0,1,2,...,n+1. For each i = 0..n+1 such that 2i != i mod n+2, draw an (undirected) chord from i to 2i mod n+2. Then a(n) is the number of distinct chords. - Kival Ngaokrajang, May 13 2016 (Edited by N. J. A. Sloane, Jun 23 2016)
From Gus Wiseman, Apr 19 2019: (Start)
Also the number of integer partitions of n + 2 with 1 fewer distinct multiplicities than (not necessarily distinct) parts. These are partitions of the form (x,x), (x,y), (x,x,y), or (x,y,y). For example, the a(0) = 1 through a(8) = 9 partitions are the following. The Heinz numbers of these partitions are given by A325270.
(11) (21) (22) (32) (33) (43) (44) (54) (55)
(31) (41) (42) (52) (53) (63) (64)
(211) (221) (51) (61) (62) (72) (73)
(311) (411) (322) (71) (81) (82)
(331) (332) (441) (91)
(511) (422) (522) (433)
(611) (711) (442)
(622)
(811)
(End)
LINKS
Kival Ngaokrajang, Illustration of initial terms
Burkard Polster, Times Tables, Mandelbrot and the Heart of Mathematics, Mathologer video (2015).
Index entries for linear recurrences with constant coefficients, signature (1,0,1,-1).
FORMULA
G.f.: (1+2*x^2)/((1-x)*(1-x^3)).
a(n) = a(n-1) + a(n-3) - a(n-4) for n>3.
a(n) = cos(2*Pi*n/3+Pi/6)/sqrt(3)-sin(2*Pi*n/3+Pi/6)/3+(3n+2)/3.
a(n) = Sum_{k=0..n} 2*A001045(L((n-k+2)/3)) where L(j/p) is the Legendre symbol of j and p.
a(n) = 1 + floor((n+1)/3) + floor(2*n/3). - Wesley Ivan Hurt, Jul 25 2016
a(n) = n+sign((n-1) mod 3). - Wesley Ivan Hurt, Sep 25 2017
MAPLE
A117571:=n->1 + floor(2*n/3) + floor((n+1)/3): seq(A117571(n), n=0..100); # Wesley Ivan Hurt, Jul 25 2016
MATHEMATICA
CoefficientList[Series[(1 + 2 x^2)/((1 - x) (1 - x^3)), {x, 0, 71}], x] (* Michael De Vlieger, May 13 2016 *)
PROG
(Magma) [1 + Floor(2*n/3) + Floor((n+1)/3) : n in [0..100]]; // Wesley Ivan Hurt, Jul 25 2016
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Mar 29 2006
STATUS
approved