OFFSET
0,3
COMMENTS
Note that for n >= 3 the isolated parts of all partitions of n are n and n-1.
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..5000
Omar E. Pol, Illustration of the shell model of partitions (2D view).
Omar E. Pol, Illustration of the shell model of partitions (3D view).
Index entries for linear recurrences with constant coefficients, signature (2,-1).
FORMULA
a(n) = n for n<3, a(n) = 2*n-1 for n>=3.
a(n) = A140139(n), n>=1.
a(n) = A130773(n-1), n >=2. - R. J. Mathar, Jan 25 2023
From Stefano Spezia, Apr 21 2025: (Start)
G.f.: x*(1 + 2*x^2 - x^3)/(1 - x)^2.
E.g.f.: 1 - x^2/2 - exp(x)*(1 - 2*x). (End)
EXAMPLE
For n=4, the five partitions of 4 are {(4);(2,2);(3,1);(2,1,1);(1,1,1,1)}. Since 1 and 2 are repeated parts and 3 and 4 are not repeated parts (or isolated parts) then a(4) = 3 + 4 = 7.
MATHEMATICA
Join[{0, 1, 2}, Table[2 n - 1, {n, 3, 60}]] (* Vincenzo Librandi, Dec 23 2015 *)
PROG
(Magma) [0, 1, 2] cat [2*n-1: n in [3..60]]; // Vincenzo Librandi, Dec 23 2015
(PARI) a(n) = if (n<3, n, 2*n-1); \\ Michel Marcus, Dec 23 2015
CROSSREFS
KEYWORD
easy,nonn,less
AUTHOR
Omar E. Pol, Aug 14 2009
STATUS
approved
