A025065 Number of palindromic partitions of n.
1, 1, 2, 2, 4, 4, 7, 7, 12, 12, 19, 19, 30, 30, 45, 45, 67, 67, 97, 97, 139, 139, 195, 195, 272, 272, 373, 373, 508, 508, 684, 684, 915, 915, 1212, 1212, 1597, 1597, 2087, 2087, 2714, 2714, 3506, 3506, 4508, 4508, 5763, 5763, 7338, 7338, 9296, 9296, 11732, 11732, 14742, 14742, 18460, 18460, 23025, 23025, 28629, 28629
Offset: 0
Keywords
Examples
The partitions for the first few values of n are as follows: n: partitions .......................... number 1: 1 ................................... 1 2: 2 11 ................................ 2 3: 3 111 ............................... 2 4: 4 22 121 1111 ....................... 4 5: 5 131 212 11111 ..................... 4 6: 6 141 33 222 1221 11211 111111 ...... 7 7: 7 151 313 11311 232 21112 1111111 ... 7 From _Reinhard Zumkeller_, Jan 23 2010: (Start) Partitions into 1,2,4,6,... for the first values of n: 1: 1 ....................................... 1 2: 2 11 .................................... 2 3: 21 111 .................................. 2 4: 4 22 211 1111 ........................... 4 5: 41 221 2111 11111 ....................... 4 6: 6 42 4211 222 2211 21111 111111.......... 7 7: 61 421 42111 2221 22111 211111 1111111 .. 7. (End)
Links
- David A. Corneth, Table of n, a(n) for n = 0..10000 (first 101 terms from Reinhard Zumkeller that were corrected by _Georg Fischer_, Jan 20 2019)
Crossrefs
Programs
-
Haskell
a025065 = p (1:[2,4..]) where p [] _ = 0 p _ 0 = 1 p ks'@(k:ks) m | m < k = 0 | otherwise = p ks' (m - k) + p ks m -- Reinhard Zumkeller, Aug 12 2011
-
Haskell
import Data.List (group) a025065 = length . filter (<= 1) . map (sum . map ((`mod` 2) . length) . group) . ps 1 where ps x 0 = [[]] ps x y = [t:ts | t <- [x..y], ts <- ps t (y - t)] -- Reinhard Zumkeller, Dec 18 2013
-
Mathematica
Map[Length[Select[IntegerPartitions[#], Count[OddQ[Transpose[Tally[#]][[2]]], True] <= 1 &]] &, Range[40]] (* Peter J. C. Moses, Jan 20 2014 *) n = 8; Select[IntegerPartitions[n], Count[OddQ[Transpose[Tally[#]][[2]]], True] <= 1 &] (* Peter J. C. Moses, Jan 20 2014 *) CoefficientList[Series[1/((1 - x) Product[1 - x^(2 n), {n, 1, 50}]), {x, 0, 60}], x] (* Clark Kimberling, Mar 14 2014 *)
-
PARI
N=66; q='q+O('q^N); Vec( 1/((1-q)*eta(q^2)) ) \\ Joerg Arndt, Mar 11 2014
Formula
G.f.: 1/((1-q)*prod(n>=1, 1-q^(2*n))). [Joerg Arndt, Mar 11 2014]
a(2*k+2) = a(2*k) + A000041(k + 1). - David A. Corneth, May 29 2021
a(n) ~ exp(Pi*sqrt(n/3)) / (2*Pi*sqrt(n)). - Vaclav Kotesovec, Nov 16 2021
Extensions
Edited by N. J. A. Sloane, Dec 29 2007
Prepended a(0)=1, added more terms, Joerg Arndt, Mar 11 2014
Comments