cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-9 of 9 results.

A025065 Number of palindromic partitions of n.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

That is, the number of partitions of n into parts which can be listed in palindromic order.
Alternatively, number of partitions of n into parts from the set {1,2,4,6,8,10,12,...}. - T. D. Noe, Aug 05 2005
Also, partial sums of A035363.
Also number of partitions of n with at most one part occurring an odd number of times. - Reinhard Zumkeller, Dec 18 2013
The first Mathematica program computes terms of A025065; the second computes the k palindromic partitions of user-chosen n. - Clark Kimberling, Jan 20 2014
a(n) is the number of partitions p of n+1 such that 2*max(p) > n+1. - Clark Kimberling, Apr 20 2014.
From Gus Wiseman, Nov 28 2018: (Start)
Also the number of integer partitions of n + 2 that are the vertex-degrees of some hypertree. For example, the a(6) = 7 partitions of 8 that are the vertex-degrees of some hypertree, together with a realizing hypertree are:
(41111): {{1,2},{1,3},{1,4},{1,5}}
(32111): {{1,2},{1,3},{1,4},{2,5}}
(22211): {{1,2},{1,3},{2,4},{3,5}}
(311111): {{1,2},{1,3},{1,4,5,6}}
(221111): {{1,2},{1,3},{2,4,5,6}}
(2111111): {{1,2},{1,3,4,5,6,7}}
(11111111): {{1,2,3,4,5,6,7,8}}
(End)
Conjecture: a(n) is the length of maximal initial segment of A308355(n-1) that is identical to row n of A128628, for n >= 2. - Clark Kimberling, May 24 2019
From Gus Wiseman, May 21 2021: (Start)
The Heinz numbers of palindromic partitions are given by A265640. The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k), giving a bijective correspondence between positive integers and integer partitions.
Also the number of integer partitions of n with a part greater than or equal to n/2. This is equivalent to Clark Kimberling's final comment above. The Heinz numbers of these partitions are given by A344414. For example, the a(1) = 1 through a(8) = 12 partitions are:
(1) (2) (3) (4) (5) (6) (7) (8)
(11) (21) (22) (32) (33) (43) (44)
(31) (41) (42) (52) (53)
(211) (311) (51) (61) (62)
(321) (421) (71)
(411) (511) (422)
(3111) (4111) (431)
(521)
(611)
(4211)
(5111)
(41111)
Also the number of integer partitions of n with at least n/2 parts. The Heinz numbers of these partitions are given by A344296. For example, the a(1) = 1 through a(8) = 12 partitions are:
(1) (2) (21) (22) (221) (222) (2221) (2222)
(11) (111) (31) (311) (321) (3211) (3221)
(211) (2111) (411) (4111) (3311)
(1111) (11111) (2211) (22111) (4211)
(3111) (31111) (5111)
(21111) (211111) (22211)
(111111) (1111111) (32111)
(41111)
(221111)
(311111)
(2111111)
(11111111)
(End)

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)
		

Crossrefs

Cf. A172033, A004277. - Reinhard Zumkeller, Jan 23 2010
The bisections are both A000070.
The ordered version (palindromic compositions) is A016116.
The complement is counted by A233771 and A210249.
The case of palindromic prime signature is A242414.
Palindromic partitions are ranked by A265640, with complement A229153.
The case of palindromic plane trees is A319436.
The multiplicative version (palindromic factorizations) is A344417.
A000569 counts graphical partitions.
A027187 counts partitions of even length, ranked by A028260.
A035363 counts partitions into even parts, ranked by A066207.
A058696 counts partitions of even numbers, ranked by A300061.
A110618 counts partitions with length <= half sum, ranked by A344291.

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

a(n) = A000070(A004526(n)). - Reinhard Zumkeller, Jan 23 2010
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

A349365 G.f. A(x) satisfies A(x) = 1 / (1 - x - x * A(x^2)).

Original entry on oeis.org

1, 2, 4, 10, 24, 60, 148, 370, 920, 2296, 5720, 14268, 35568, 88700, 221156, 551482, 1375096, 3428888, 8549944, 21319624, 53160896, 132558360, 330537528, 824204780, 2055176304, 5124638944, 12778424976, 31863351980, 79452130896, 198116051644, 494007751668
Offset: 0

Views

Author

Ilya Gutkovskiy, Nov 15 2021

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 30; A[] = 0; Do[A[x] = 1/(1 - x - x A[x^2]) + O[x]^(nmax + 1) // Normal,nmax + 1]; CoefficientList[A[x], x]
    a[0] = 1; a[1] = 2; a[n_] := a[n] = a[n - 2] + Sum[a[Floor[k/2]] a[n - k - 1], {k, 0, n - 1}]; Table[a[n], {n, 0, 30}]
  • PARI
    a_vector(n) = my(v=vector(n+1)); v[1]=1; for(i=1, n, v[i+1]=v[i]+sum(j=0, (i-1)\2, v[j+1]*v[i-2*j])); v; \\ Seiichi Manyama, Nov 26 2023

Formula

G.f.: 1 / (1 - x - x / (1 - x^2 - x^2 / (1 - x^4 - x^4 / (1 - x^8 - x^8 / (1 - ...))))).
a(0) = 1, a(1) = 2; a(n) = a(n-2) + Sum_{k=0..n-1} a(floor(k/2)) * a(n-k-1).
a(n) ~ c * d^n, where d = 2.4935271724548067876965033643037290636931200352851874903211458249308... and c = 0.6156170089558875346518987360369130661426312977478830077668203229773... - Vaclav Kotesovec, Nov 16 2021
a(0) = 1; a(n) = a(n-1) + Sum_{k=0..floor((n-1)/2)} a(k) * a(n-1-2*k). - Seiichi Manyama, Nov 26 2023

A319381 Number of plane trees with n nodes where the sequence of branches directly under any given node is a membership-chain.

Original entry on oeis.org

1, 1, 1, 2, 2, 4, 6, 9, 11, 20, 28, 40, 58, 82, 110, 159, 217, 305, 420, 570, 767, 1042
Offset: 1

Views

Author

Gus Wiseman, Sep 17 2018

Keywords

Examples

			The a(9) = 11 membership-chain trees:
  ((((((((o))))))))  (((((((o)o))))))  ((((((o)o)o))))  (((((o)o)o)o))
                     ((((((o))(o)))))  (((((o)o)(o))))  ((((o)o)(o)o))
                     (((((o)))((o))))  (((((o))(o)o)))  ((((o))(o)o)o)
                                       ((((o))(o))(o))
		

Crossrefs

Programs

  • Mathematica
    yanplane[n_]:=If[n==1,{{}},Join@@Table[Select[Tuples[yanplane/@c],And@@MemberQ@@@Partition[#,2,1]&],{c,Join@@Permutations/@IntegerPartitions[n-1]}]];
    Table[Length[yanplane[n]],{n,10}]

A218032 G.f. A(x) satisfies A(x) = 1 + x / (1 - x * A(x^2)).

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 35, 57, 94, 154, 254, 417, 687, 1129, 1859, 3057, 5032, 8277, 13623, 22412, 36883, 60684, 99862, 164312, 270384, 444899, 732093, 1204629, 1982228, 3261701, 5367131, 8831505, 14532200, 23912499, 39347839, 64746320, 106539481, 175309363, 288469809
Offset: 0

Views

Author

Joerg Arndt, Oct 19 2012

Keywords

Comments

What does this sequence count?

Crossrefs

Programs

  • PARI
    N=66;  R=O('x^N);  x='x+R;
    F = 1 + x;
    for (k=1,N+1, F = 1 + x / (1 - x * subst(F,'x,'x^2) ) + R; );
    Vec(F)

A319378 Number of plane trees with n nodes where the sequence of branches directly under any given node with at least two branches has empty intersection.

Original entry on oeis.org

1, 1, 2, 5, 13, 39, 118, 375, 1225, 4079, 13794, 47287, 163962, 573717, 2023800
Offset: 1

Views

Author

Gus Wiseman, Sep 17 2018

Keywords

Examples

			The a(5) = 13 locally nonintersecting plane trees:
  ((((o))))  (((oo)))  ((ooo))  (oooo)
             (((o)o))  ((oo)o)
             ((o(o)))  (o(oo))
             (((o))o)  ((o)oo)
             (o((o)))  (o(o)o)
                       (oo(o))
		

Crossrefs

Programs

  • Mathematica
    monplane[n_]:=If[n==1,{{}},Join@@Table[Select[Tuples[monplane/@c],Or[Length[#]==1,Intersection@@#=={}]&],{c,Join@@Permutations/@IntegerPartitions[n-1]}]];
    Table[Length[monplane[n]],{n,10}]

A319437 Number of series-reduced palindromic plane trees with n nodes.

Original entry on oeis.org

1, 0, 1, 1, 1, 2, 3, 4, 7, 10, 15, 23, 35, 52, 81, 121, 185, 280, 427, 645, 985, 1490, 2269, 3440, 5233, 7936, 12071, 18313, 27839, 42256, 64217, 97490, 148137, 224924, 341725, 518923, 788321, 1197178, 1818597, 2761926, 4195381, 6371808, 9678537, 14699771
Offset: 1

Views

Author

Gus Wiseman, Sep 18 2018

Keywords

Comments

A rooted plane tree is series-reduced if every non-leaf node has at least two branches, and palindromic if the sequence of branches directly under any given node is a palindrome.

Crossrefs

Programs

  • Mathematica
    srpanplane[n_]:=If[n==1,{{}},Join@@Table[Select[Tuples[srpanplane/@c],#==Reverse[#]&],{c,Join@@Permutations/@Select[IntegerPartitions[n-1],Length[#]>1&]}]];
    Table[Length[srpanplane[n]],{n,15}]
  • PARI
    PAL(p)={(1+p)/subst(1-p, x, x^2)}
    seq(n)={my(p=O(1));for(i=1, n, p=PAL(x*p)-x*p); Vec(p)} \\ Andrew Howroyd, Sep 19 2018

Extensions

Terms a(27) and beyond from Andrew Howroyd, Sep 19 2018

A344417 Number of palindromic factorizations of n.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 4, 1, 2, 1, 2, 1, 1, 1, 2, 2, 1, 2, 2, 1, 1, 1, 4, 1, 1, 1, 5, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 4, 2, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 2, 7, 1, 1, 1, 2, 1, 1, 1, 5, 1, 1, 2, 2, 1, 1, 1, 4, 4, 1, 1, 2, 1, 1, 1
Offset: 1

Views

Author

Gus Wiseman, May 22 2021

Keywords

Comments

A palindrome is a sequence that is the same whether it is read forward or in reverse. A palindromic factorization of n is a finite multiset of positive integers > 1 with product n that can be permuted into a palindrome.

Examples

			The palindromic factorizations for n = 2, 4, 16, 36, 64, 144:
  (2)  (4)    (16)       (36)       (64)           (144)
       (2*2)  (4*4)      (6*6)      (8*8)          (12*12)
              (2*2*4)    (2*2*9)    (4*4*4)        (4*4*9)
              (2*2*2*2)  (3*3*4)    (2*2*16)       (4*6*6)
                         (2*2*3*3)  (2*2*4*4)      (2*2*36)
                                    (2*2*2*2*4)    (3*3*16)
                                    (2*2*2*2*2*2)  (2*2*6*6)
                                                   (3*3*4*4)
                                                   (2*2*2*2*9)
                                                   (2*2*3*3*4)
                                                   (2*2*2*2*3*3)
		

Crossrefs

Positions of 1's are A005117.
The case of palindromic compositions is A016116.
The additive version (palindromic partitions) is A025065.
The case of palindromic prime signature is A242414.
The case of palindromic plane trees is A319436.
A001055 counts factorizations.
A229153 ranks non-palindromic partitions.
A265640 ranks palindromic partitions.

Programs

  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    palQ[y_]:=Select[Permutations[y],#==Reverse[#]&]!={};
    Table[Length[Select[facs[n],palQ]],{n,50}]

Formula

a(2^n) = A025065(n).
a(n) = A057567(A000188(n)). - Andrew Howroyd, May 22 2021

A367666 G.f. A(x) satisfies A(x) = 1 / (1 - x - x^2 * A(x^3)).

Original entry on oeis.org

1, 1, 2, 3, 5, 9, 15, 26, 46, 79, 138, 241, 418, 729, 1270, 2209, 3849, 6703, 11669, 20325, 35393, 61629, 107329, 186900, 325464, 566779, 986987, 1718745, 2993062, 5212135, 9076470, 15805899, 27524544, 47931568, 83468632, 145353195, 253119779, 440785795
Offset: 0

Views

Author

Seiichi Manyama, Nov 26 2023

Keywords

Crossrefs

Programs

  • Maple
    A367666 := proc(n)
        option remember;
        if n = 0 then
            1;
        else
            procname(n-1) + add(procname(k) * procname(n-2-3*k),k=0..floor((n-2)/3)) ;
        end if;
    end proc:
    seq(A367666(n),n=0..70) ; # R. J. Mathar, Dec 04 2023
  • PARI
    a_vector(n) = my(v=vector(n+1)); v[1]=1; for(i=1, n, v[i+1]=v[i]+sum(j=0, (i-2)\3, v[j+1]*v[i-1-3*j])); v;

Formula

a(0) = 1; a(n) = a(n-1) + Sum_{k=0..floor((n-2)/3)} a(k) * a(n-2-3*k).

A351938 a(0) = 1; a(n) = -a(n-1) + 2 * Sum_{k=0..floor((n-1)/2)} a(k) * a(n-2*k-1).

Original entry on oeis.org

1, 1, 1, 3, 5, 9, 17, 35, 65, 125, 241, 463, 885, 1701, 3265, 6271, 12033, 23105, 44353, 85147, 163445, 313777, 602353, 1156339, 2219809, 4261389, 8180561, 15704215, 30147333, 57873821, 111100225, 213278943, 409431169, 785984353, 1508852673, 2896541859
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 26 2022

Keywords

Crossrefs

Programs

  • Mathematica
    a[0] = 1; a[n_] := a[n] = -a[n - 1] + 2 Sum[a[k] a[n - 2 k - 1], {k, 0, Floor[(n - 1)/2]}]; Table[a[n], {n, 0, 35}]
    nmax = 35; A[] = 0; Do[A[x] = 1/(1 + x - 2 x A[x^2]) + O[x]^(nmax + 1) // Normal, nmax + 1]; CoefficientList[A[x], x]

Formula

G.f. A(x) satisfies: A(x) = 1 / (1 + x - 2 * x * A(x^2)).
Showing 1-9 of 9 results.