OFFSET
1,2
COMMENTS
Let g be a permutation of [1..n] having, say, j_i cycles of length i, with Sum_i i*j_i = n; sequence gives Sum_{g} Sum_{i} (j_1 + j_2). - N. J. A. Sloane, Jul 22 2009
a(n) is the greatest integer that can be obtained from the integers {1, 2, 3, ..., n} using each number at most once and the operators +, -, *, /.
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..400
Jun Yan, Results on pattern avoidance in parking functions, arXiv:2404.07958 [math.CO], 2024. See p. 4.
FORMULA
E.g.f.: x*(2+x)/(1-x)/2. - Vladeta Jovovic, Dec 15 2002
a(n) = A245334(n,n-2), n > 1. - Reinhard Zumkeller, Aug 31 2014
From Amiram Eldar, Jan 15 2023: (Start)
Sum_{n>=1} 1/a(n) = (2*e-1)/3.
Sum_{n>=1} (-1)^(n+1)/a(n) = 1 - 2/(3*e). (End)
EXAMPLE
a(5) = 180 because the greatest number we can obtain using 1, 2, 3, 4, 5 is 180 which is (1+2)*3*4*5.
MATHEMATICA
s=3; lst={1, s}; Do[s+=n*s+s; AppendTo[lst, s], {n, 1, 5!, 1}]; lst (* Vladimir Joseph Stephan Orlovsky, Nov 08 2008 *)
Join[{1}, (3*Range[2, 20]!)/2] (* Harvey P. Dale, Jun 15 2022 *)
PROG
(Haskell)
a070960 n = if n == 1 then 1 else 3 * a000142 n `div` 2
a070960_list = map (flip div 2) fs where fs = 3 : zipWith (*) [2..] fs
-- Reinhard Zumkeller, Aug 31 2014
(PARI) a(n) = if (n==1, 1, n!*3/2); \\ Michel Marcus, Dec 03 2022
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Koksal Karakus (karakusk(AT)hotmail.com), May 24 2002
EXTENSIONS
Edited by N. J. A. Sloane, Jul 22 2009
STATUS
approved