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.

Previous Showing 11-14 of 14 results.

A348476 Number of compositions of n into exactly n nonnegative parts such that all positive parts are odd.

Original entry on oeis.org

1, 1, 1, 4, 13, 36, 106, 323, 981, 2992, 9196, 28392, 87946, 273287, 851579, 2659764, 8324357, 26100560, 81969496, 257800532, 811862268, 2559731360, 8079294664, 25525787344, 80719066698, 255466082911, 809138591431, 2564605664428, 8134003910311, 25813957574292
Offset: 0

Views

Author

Alois P. Heinz, Oct 19 2021

Keywords

Examples

			a(0) = 1: [].
a(1) = 1: [1].
a(2) = 1: [1,1].
a(3) = 4: [3,0,0], [0,3,0], [0,0,3], [1,1,1].
a(4) = 13: [3,1,0,0], [3,0,1,0], [3,0,0,1], [1,3,0,0], [0,3,1,0], [0,3,0,1],[1,0,3,0], [0,1,3,0], [0,0,3,1], [1,0,0,3], [0,1,0,3], [0,0,1,3], [1,1,1,1].
		

Crossrefs

Programs

  • Maple
    b:= proc(n, t) option remember; `if`(t=0, 1-signum(n),
          add(`if`(j=0 or j::odd, b(n-j, t-1), 0), j=0..n))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..30);
  • Mathematica
    b[n_, t_] := b[n, t] = If[t == 0, 1 - Sign[n],
         Sum[If[j == 0 || OddQ[j], b[n - j, t - 1], 0], {j, 0, n}]];
    a[n_] := b[n, n];
    Table[a[n], {n, 0, 30}] (* Jean-François Alcover, May 16 2022, after Alois P. Heinz *)

Formula

a(n) ~ c * d^n / sqrt(Pi*n), where d = 3.22870495109450172934784925586... is largest positive root of the equation 4*d^4 - 12*d^3 + 4*d^2 - 24*d + 5 = 0 and c = 0.4302331663731241127284415754... is positive root of the equation 5824*c^8 - 32*c^4 - 4*c^2 - 5 = 0. - Vaclav Kotesovec, Nov 01 2021

A356605 Number of integer compositions of n into odd parts covering an interval of odd positive integers.

Original entry on oeis.org

1, 1, 1, 2, 3, 5, 6, 10, 15, 26, 41, 65, 104, 164, 262, 424, 687, 1112, 1792, 2898, 4677, 7556, 12197, 19699, 31836, 51466, 83234, 134593, 217674, 352057, 569452, 921165, 1490173, 2410784, 3900288, 6310436, 10210358, 16521108, 26733020, 43258086, 69999295
Offset: 0

Views

Author

Gus Wiseman, Aug 31 2022

Keywords

Examples

			The a(1) = 1 through a(8) = 15 compositions:
  (1)  (11)  (3)    (13)    (5)      (33)      (7)        (35)
             (111)  (31)    (113)    (1113)    (133)      (53)
                    (1111)  (131)    (1131)    (313)      (1133)
                            (311)    (1311)    (331)      (1313)
                            (11111)  (3111)    (11113)    (1331)
                                     (111111)  (11131)    (3113)
                                               (11311)    (3131)
                                               (13111)    (3311)
                                               (31111)    (111113)
                                               (1111111)  (111131)
                                                          (111311)
                                                          (113111)
                                                          (131111)
                                                          (311111)
                                                          (11111111)
		

Crossrefs

These compositions are ranked by the intersection of A060142 and A356841.
Before restricting to odds we have A107428, initial A107429.
The not necessarily gapless version is A324969 (essentially A000045).
The strict case is A332032.
The initial case is A356604.
The case of partitions is A356737, initial A053251 (ranked by A356232).
A000041 counts partitions, compositions A011782.
A066208 lists numbers with all odd prime indices, counted by A000009.
A073491 lists numbers with gapless prime indices, initial A055932.

Programs

  • Mathematica
    nogapQ[m_]:=m=={}||Union[m]==Range[Min[m],Max[m]];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], And@@OddQ/@#&&nogapQ[(#+1)/2]&]],{n,0,15}]

Extensions

More terms from Alois P. Heinz, Sep 01 2022

A348478 Number of compositions of n into exactly n nonnegative parts such that each positive i-th part has the same parity as i.

Original entry on oeis.org

1, 1, 1, 4, 7, 23, 55, 164, 407, 1235, 3051, 9432, 23431, 72989, 182624, 571384, 1436855, 4511979, 11387467, 35866100, 90782837, 286622226, 727226578, 2300578392, 5848776767, 18533394763, 47197285045, 149769168304, 381956145802, 1213526310665, 3098742448230
Offset: 0

Views

Author

Alois P. Heinz, Oct 20 2021

Keywords

Examples

			a(0) = 1: [].
a(1) = 1: [1].
a(2) = 1: [0,2].
a(3) = 4: [1,2,0], [0,2,1], [3,0,0], [0,0,3].
a(4) = 7: [1,2,1,0], [1,0,1,2], [3,0,1,0], [1,0,3,0], [0,2,0,2], [0,4,0,0], [0,0,0,4].
		

Crossrefs

Programs

  • Maple
    b:= proc(n, t) option remember; `if`(t=0, 1-signum(n),
          add(`if`(j=0 or (t-j)::even, b(n-j, t-1), 0), j=0..n))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..33);
  • Mathematica
    b[n_, t_] := b[n, t] = If[t == 0, 1 - Sign[n],
         Sum[If[j == 0 || EvenQ[t - j], b[n - j, t - 1], 0], {j, 0, n}]];
    a[n_] :=  b[n, n];
    Table[a[n], {n, 0, 33}] (* Jean-François Alcover, Apr 14 2022, after Alois P. Heinz *)

A330795 Evaluation of the polynomials given by the Riordan square of the Fibonacci sequence with a(0) = 1 (A193737) at 1/2 and normalized with 2^n.

Original entry on oeis.org

1, 3, 9, 39, 153, 615, 2457, 9831, 39321, 157287, 629145, 2516583, 10066329, 40265319, 161061273, 644245095, 2576980377, 10307921511, 41231686041, 164926744167, 659706976665, 2638827906663, 10555311626649, 42221246506599, 168884986026393, 675539944105575
Offset: 0

Views

Author

Peter Luschny, Jan 10 2020

Keywords

Crossrefs

Cf. A006131, A015521, A193737, A321620, A324969 (Fibonacci with a(0)=1).

Programs

  • Magma
    [1] cat [3*(4^n -(-1)^n)/5: n in [1..30]]; // G. C. Greubel, Sep 14 2023
    
  • Maple
    gf := (4*x^2 - 1)/(x*(4*x + 3) - 1): ser := series(gf, x, 32):
    seq(coeff(ser, x, n), n=0.. 25);
    # Alternative:
    gf:= (3/5)*exp(-x)*(exp(5*x) - 1) + 1: ser := series(gf, x, 32):
    seq(n!*coeff(ser, x, n), n=0.. 25);
    # Or:
    a := proc(n) option remember; if n < 3 then return [1, 3, 9][n + 1] fi;
    4*a(n-2) + 3*a(n-1) end: seq(a(n), n=0..25);
  • Mathematica
    LinearRecurrence[{3,4}, {1,3,9}, 31] (* G. C. Greubel, Sep 14 2023 *)
  • SageMath
    [3*(4^n -(-1)^n)//5 + int(n==0) for n in range(31)] # G. C. Greubel, Sep 14 2023

Formula

a(n) = 2^n*Sum_{k=0..n} A193737(n,k)/2^k.
a(n) = [x^n] (1 - 4*x^2)/(1 - x*(3 + 4*x)).
a(n) = n! [x^n] (3/5)*exp(-x)*(exp(5*x) - 1) + 1.
a(n) = 4*a(n-2) + 3*a(n-1).
a(n) = 3*A015521(n), n>0. - R. J. Mathar, Aug 19 2022
Previous Showing 11-14 of 14 results.