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 31-40 of 59 results. Next

A358375 Numbers k such that the k-th standard ordered rooted tree is binary.

Original entry on oeis.org

1, 4, 18, 25, 137, 262146, 393217, 2097161, 2228225
Offset: 1

Views

Author

Gus Wiseman, Nov 14 2022

Keywords

Comments

We define the n-th standard ordered rooted tree to be obtained by taking the (n-1)-th composition in standard order (graded reverse-lexicographic, A066099) as root and replacing each part with its own standard ordered rooted tree. This ranking is an ordered variation of Matula-Goebel numbers, giving a bijective correspondence between positive integers and unlabeled ordered rooted trees.

Examples

			The initial terms and their corresponding trees:
       1: o
       4: (oo)
      18: ((oo)o)
      25: (o(oo))
     137: ((oo)(oo))
  262146: (((oo)o)o)
  393217: (o((oo)o))
		

Crossrefs

The unordered version is A111299, counted by A001190
These trees are counted by A126120.
A000081 counts unlabeled rooted trees, ranked by A358378.
A358371 and A358372 count leaves and nodes in standard ordered rooted trees.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    srt[n_]:=If[n==1,{},srt/@stc[n-1]];
    Select[Range[1000],FreeQ[srt[#],[_]?(Length[#]!=2&)]&]

A166587 A signed variant of the Motzkin numbers.

Original entry on oeis.org

1, 1, -1, 2, -4, 9, -21, 51, -127, 323, -835, 2188, -5798, 15511, -41835, 113634, -310572, 853467, -2356779, 6536382, -18199284, 50852019, -142547559, 400763223, -1129760415, 3192727797, -9043402501, 25669818476, -73007772802
Offset: 0

Views

Author

Paul Barry, Oct 17 2009

Keywords

Comments

Hankel transform is A131713. Binomial transform is A166588.
[a(n+1)] = [1,-1,2,-4,9,...] is the inverse binomial transform of A126120. - Philippe Deléham, Nov 29 2009

Examples

			G.f. = 1 + x - x^2 + 2*x^3 - 4*x^4 + 9*x^5 - 21*x^6 + 51*x^7 - 127*x^8 + ...
		

Programs

  • Maple
    f:= gfun:-rectoproc({3*n*a(n)+(-3-2*n)*a(1+n)+(-3-n)*a(n+2)=0,a(0) = 1, a(1) = 1}, a(n),remember):
    map(f, [$0..100]); # Robert Israel, May 17 2016
    with(PolynomialTools): CoefficientList(convert(taylor((1 + 3*x - sqrt(1 + 2*x - 3*x^2))/2/x, x = 0, 33), polynom), x); # Taras Goy, Aug 07 2017
  • Mathematica
    CoefficientList[Series[(1 + 3*t - Sqrt[1 + 2*t - 3*t^2])/(2 t), {t, 0, 50}], t] (* G. C. Greubel, May 17 2016 *)

Formula

G.f.: (1+3x-sqrt(1+2x-3x^2))/(2x); (1+3x)/(1+2x-x^2/(1+x-x^2/(1+x-x^2/(1+x-x^2/(1+...))))) (continued fraction).
a(n) = 0^n + Sum_{k=0..n} binomial(n-1, k-1)*(-3)^(n-k)*A000108(k).
G.f.: (1+3*x-sqrt(1+2*x-3*x^2))/(2x) = (3-1/G(0))/2 ; G(k) = 1+2*x/(1-x/(1-x/(1+2*x/(1+x/(2+x/G(k+1)))))) ; (continued fraction). - Sergei N. Gladkovskii, Dec 11 2011
Conjecture: n*(n+1)*a(n) + n*(n+1)*a(n-1) - (5*n-3)*(n-2)*a(n-2) + 3*(n-2)*(n-3)*a(n-3) = 0. - R. J. Mathar, Nov 15 2012
G.f. G(x) satisfies (3 x^2 - 2 x^2 - x) G'(x) - (x+1) G(x) + 3 x + 1 = 0, from which follows 3*n*a(n) + (-3-2*n)*a(1+n) + (-3-n)*a(n+2) = 0 as well as Mathar's conjecture. - Robert Israel, May 17 2016
E.g.f.: 1 + Integral (exp(-x) * BesselI(1,2*x) / x) dx. - Ilya Gutkovskiy, Jun 01 2020

A303022 Number of free pure symmetric multifunctions (with empty expressions allowed) with one atom, n positions, and no unitary parts (subexpressions of the form x[y]).

Original entry on oeis.org

1, 1, 1, 2, 5, 12, 27, 63, 152, 376, 939, 2371, 6047, 15577, 40429, 105637, 277625, 733518, 1947126, 5190503, 13888811, 37291968, 100444019, 271316998, 734802247, 1994873116, 5427893149, 14799525982, 40429761365, 110645688034, 303316712450, 832799212777
Offset: 1

Views

Author

Gus Wiseman, Aug 15 2018

Keywords

Comments

Also the number of orderless Mathematica expressions with one atom, n positions, and no unitary parts.

Examples

			The a(6) = 12 Mathematica expressions:
  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,o][]
  o[][o,o][]
  o[o,o][][]
  o[][][][][]
		

Crossrefs

Programs

  • Mathematica
    allOLBF[n_]:=allOLBF[n]=If[n==1,{"o"},Join@@Cases[Table[PR[k,n-k-1],{k,n-1}],PR[h_,g_]:>Join@@Table[Apply@@@Tuples[{allOLBF[h],Select[Union[Sort/@Tuples[allOLBF/@p]],Length[#]!=1&]}],{p,IntegerPartitions[g]}]]];
    Table[Length[allOLBF[n]],{n,10}]
  • PARI
    EulerT(v)={Vec(exp(x*Ser(dirmul(v,vector(#v,n,1/n))))-1, -#v)}
    seq(n)={my(v=[1]); for(n=2, n, my(t=EulerT(v)-v); v=concat(v, v[n-1] + sum(k=1, n-2, v[k]*t[n-k-1]))); v} \\ Andrew Howroyd, Aug 19 2018

Extensions

Terms a(21) and beyond from Andrew Howroyd, Aug 19 2018

A303027 Number of free pure symmetric multifunctions with one atom, n positions, and no empty or unitary parts (subexpressions of the form x[] or x[y]).

Original entry on oeis.org

1, 0, 0, 1, 1, 1, 3, 5, 7, 15, 28, 47, 90, 175, 319, 607, 1181, 2251, 4325, 8449, 16425, 31992, 62823, 123521, 243047, 480316, 951290, 1886293, 3749341, 7467815, 14893500, 29752398, 59532947, 119274491, 239275400, 480638121, 966571853, 1945901716, 3921699524
Offset: 1

Views

Author

Gus Wiseman, Aug 15 2018

Keywords

Comments

Also the number of orderless Mathematica expressions with one atom, n positions, and no empty or unitary parts.

Examples

			The a(10) = 15 Mathematica expressions:
  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[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,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,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
    allOLZR[n_]:=allOLZR[n]=If[n==1,{"o"},Join@@Cases[Table[PR[k,n-k-1],{k,n-1}],PR[h_,g_]:>Join@@Table[Apply@@@Tuples[{allOLZR[h],Select[Union[Sort/@Tuples[allOLZR/@p]],Length[#]>1&]}],{p,IntegerPartitions[g]}]]];
    Table[Length[allOLZR[n]],{n,25}]
  • PARI
    EulerT(v)={Vec(exp(x*Ser(dirmul(v,vector(#v,n,1/n))))-1, -#v)}
    seq(n)={my(v=[1]); for(n=2, n, my(t=EulerT(v)-v); v=concat(v, sum(k=1, n-2, v[k]*t[n-k-1]))); v} \\ Andrew Howroyd, Aug 19 2018

Extensions

Terms a(29) and beyond from Andrew Howroyd, Aug 19 2018

A304173 Number of rooted plane trees where every branch that has a predecessor (a branch directly to its left and emanating from the same root) has at least as many leaves as its predecessor.

Original entry on oeis.org

1, 1, 2, 5, 13, 34, 90, 242, 660, 1822, 5085, 14333, 40759, 116817, 337140, 979098, 2859439, 8393113, 24747052, 73262246, 217681621, 648939319, 1940461444, 5818595438, 17492367097, 52712114792, 159193762250, 481754196170, 1460650624068, 4436422703787, 13496947320929
Offset: 1

Views

Author

Gus Wiseman, Aug 16 2018

Keywords

Examples

			The a(5) = 13 plane trees:
  ((((o)))), (((oo))), (((o)o)), ((o(o))), ((ooo)),
  (((o))o), (o((o))), (o(oo)), ((o)(o)),
  ((o)oo), (o(o)o), (oo(o)),
  (oooo).
Missing from this list is ((oo)o).
		

Crossrefs

Programs

  • Mathematica
    pplane[n_]:=If[n==1,{{}},Join@@Table[Select[Tuples[pplane/@c],OrderedQ[Count[#,{},{0,Infinity}]&/@#]&],{c,Join@@Permutations/@IntegerPartitions[n-1]}]];
    Table[Length[pplane[n]],{n,10}]
  • PARI
    seq(n)={my(p=x*y+O(x^2)); for(n=2, n, p=x*(y-1 + 1/prod(k=1, n-1, 1 - y^k*polcoef(p,k,y)))); Vec(subst(p,y,1))} \\ Andrew Howroyd, Jan 22 2021

Formula

G.f.: A(x,1) where A(x,y) satisfies A(x,y) = x*(y-1 + 1/(Product_{k>=1} 1 - y^k * [y^k] A(x,y))). - Andrew Howroyd, Jan 22 2021

Extensions

Terms a(15) and beyond from Andrew Howroyd, Jan 22 2021

A304175 Number of leaf-balanced rooted plane trees with n nodes.

Original entry on oeis.org

1, 1, 2, 5, 12, 27, 59, 128, 277, 597, 1280, 2730, 5794, 12248, 25836, 54508, 115222, 244144, 518104, 1099499, 2330326, 4930089, 10415135, 21992400, 46470911, 98353146, 208580686, 443186181, 942988423, 2007981801, 4276830431, 9109431322, 19404918449, 41357252072, 88236092543
Offset: 1

Views

Author

Gus Wiseman, Aug 16 2018

Keywords

Comments

A rooted plane tree is leaf-balanced if every branch of the root has the same number of leaves, and every branch of the root is itself leaf-balanced.

Examples

			The a(5) = 12 leaf-balanced plane trees:
  ((((o)))), (((oo))), (((o)o)), ((o(o))), ((ooo)),
  (((o))o), (o((o))), ((o)(o)),
  ((o)oo), (o(o)o), (oo(o)),
  (oooo).
Missing from this list are ((oo)o) and (o(oo)).
		

Crossrefs

Programs

  • Mathematica
    lbplane[n_]:=If[n==1,{{}},Join@@Table[Select[Tuples[lbplane/@c],SameQ@@(Count[#,{},{0,Infinity}]&/@#)&],{c,Join@@Permutations/@IntegerPartitions[n-1]}]];
    Table[Length[lbplane[n]],{n,10}]
  • PARI
    seq(n)={my(v=vector(n)); v[1]=x/(1-x) + O(x*x^n); for(k=2, n, v[k]=x*sumdiv(k, d, if(dAndrew Howroyd, Dec 13 2020

Extensions

Terms a(17) and beyond from Andrew Howroyd, Dec 13 2020

A247495 Generalized Motzkin numbers: Square array read by descending antidiagonals, T(n, k) = k!*[x^k](exp(n*x)* BesselI_{1}(2*x)/x), n>=0, k>=0.

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 0, 2, 2, 1, 2, 4, 5, 3, 1, 0, 9, 14, 10, 4, 1, 5, 21, 42, 36, 17, 5, 1, 0, 51, 132, 137, 76, 26, 6, 1, 14, 127, 429, 543, 354, 140, 37, 7, 1, 0, 323, 1430, 2219, 1704, 777, 234, 50, 8, 1, 42, 835, 4862, 9285, 8421, 4425, 1514, 364, 65, 9, 1
Offset: 0

Views

Author

Peter Luschny, Dec 11 2014

Keywords

Comments

This two-dimensional array of numbers can be seen as a generalization of the Motzkin numbers A001006 for two reasons: The case n=1 reduces to the Motzkin numbers and the columns are the values of the Motzkin polynomials M_{k}(x) = sum_{j=0..k} A097610(k,j)*x^j evaluated at the nonnegative integers.

Examples

			Square array starts:
[n\k][0][1] [2]  [3]   [4]   [5]    [6]     [7]      [8]
[0]   1, 0,  1,   0,    2,    0,     5,      0,      14, ...  A126120
[1]   1, 1,  2,   4,    9,   21,    51,    127,     323, ...  A001006
[2]   1, 2,  5,  14,   42,  132,   429,   1430,    4862, ...  A000108
[3]   1, 3, 10,  36,  137,  543,  2219,   9285,   39587, ...  A002212
[4]   1, 4, 17,  76,  354, 1704,  8421,  42508,  218318, ...  A005572
[5]   1, 5, 26, 140,  777, 4425, 25755, 152675,  919139, ...  A182401
[6]   1, 6, 37, 234, 1514, 9996, 67181, 458562, 3172478, ...  A025230
A000012,A001477,A002522,A079908, ...
.
Triangular array starts:
              1,
             0, 1,
           1, 1, 1,
          0, 2, 2, 1,
        2, 4, 5, 3, 1,
      0, 9, 14, 10, 4, 1,
   5, 21, 42, 36, 17, 5, 1,
0, 51, 132, 137, 76, 26, 6, 1.
		

Crossrefs

Programs

  • Maple
    # RECURRENCE
    T := proc(n,k) option remember; if k=0 then 1 elif k=1 then n else
    (n*(2*k+1)*T(n,k-1)-(n-2)*(n+2)*(k-1)*T(n,k-2))/(k+2) fi end:
    seq(print(seq(T(n,k),k=0..9)),n=0..6);
    # OGF (row)
    ogf := n -> (1-n*x-sqrt(((n-2)*x-1)*((n+2)*x-1)))/(2*x^2):
    seq(print(seq(coeff(series(ogf(n),x,12),x,k),k=0..9)),n=0..6);
    # EGF (row)
    egf := n -> exp(n*x)*hypergeom([],[2],x^2):
    seq(print(seq(k!*coeff(series(egf(n),x,k+2),x,k),k=0..9)),n=0..6);
    # MOTZKIN polynomial (column)
    A097610 := proc(n,k) if type(n-k,odd) then 0 else n!/(k!*((n-k)/2)!^2* ((n-k)/2+1)) fi end: M := (k,x) -> add(A097610(k,j)*x^j,j=0..k):
    seq(print(seq(M(k,n),n=0..9)),k=0..6);
    # OGF (column)
    col := proc(n, len) local G; G := A247497_row(n); (-1)^(n+1)* add(G[k+1]/(x-1)^(k+1), k=0..n); seq(coeff(series(%, x, len+1),x,j), j=0..len) end: seq(print(col(n,8)), n=0..6); # Peter Luschny, Dec 14 2014
  • Mathematica
    T[0, k_] := If[EvenQ[k], CatalanNumber[k/2], 0];
    T[n_, k_] := n^k*Hypergeometric2F1[(1 - k)/2, -k/2, 2, 4/n^2];
    Table[T[n - k, k], {n, 0, 10}, {k, n, 0, -1}] // Flatten (* Jean-François Alcover, Nov 03 2017 *)
  • Sage
    def A247495(n,k):
        if n==0: return(k//2+1)*factorial(k)/factorial(k//2+1)^2 if is_even(k) else 0
        return n^k*hypergeometric([(1-k)/2,-k/2],[2],4/n^2).simplify()
    for n in (0..7): print([A247495(n,k) for k in range(11)])

Formula

T(n,k) = (n*(2*k+1)*T(n,k-1)-(n-2)*(n+2)*(k-1)*T(n,k-2))/(k+2) for k>=2.
T(n,k) = Sum_{j=0..floor(k/2)} n^(k-2*j)*binomial(k,2*j)*binomial(2*j,j)/(j+1).
T(n,k) = n^k*hypergeom([(1-k)/2,-k/2], [2], 4/n^2) for n>0.
T(n,n) = A247496(n).
O.g.f. for row n: (1-n*x-sqrt(((n-2)*x-1)*((n+2)*x-1)))/(2*x^2).
O.g.f. for row n: R(x)/x where R(x) is series reversion of x/(1+n*x+x^2).
E.g.f. for row n: exp(n*x)*hypergeom([],[2],x^2).
O.g.f. for column k: the k-th column consists of the values of the k-th Motzkin polynomial M_{k}(x) evaluated at x = 0,1,2,...; M_{k}(x) = sum_{j=0..k} A097610(k,j)*x^j = sum_{j=0..k} (-1)^j*binomial(k,j)*A001006(j)*(x+1)^(k-j).
O.g.f. for column k: sum_{j=0..k} (-1)^(k+1)*A247497(k,j)/(x-1)^(j+1). - Peter Luschny, Dec 14 2014
O.g.f. for row n: 1/(1 - n*x - x^2/(1 - n*x - x^2/(1 - n*x - x^2/(1 - n*x - x^2/(1 - ...))))), a continued fraction. - Ilya Gutkovskiy, Sep 21 2017
T(n,k) is the coefficient of x^k in the expansion of 1/(k+1) * (1 + n*x + x^2)^(k+1). - Seiichi Manyama, May 07 2019

A318049 Number of first/rest balanced rooted plane trees with n nodes.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 1, 3, 2, 6, 8, 11, 26, 28, 67, 96, 162, 316, 448, 922, 1435, 2572, 4660, 7563, 14397, 23896, 43337, 77097, 133071, 244787, 423093, 767732, 1367412, 2426612, 4408497, 7802348, 14152342, 25365035, 45602031, 82631362, 148246136, 269103870, 485379304
Offset: 1

Views

Author

Gus Wiseman, Aug 13 2018

Keywords

Comments

A rooted plane tree is first/rest balanced if either (1) it is a single node, or (2a) the number of leaves in the first branch is equal to the number of branches minus one, and (2b) every branch is also first/rest balanced.
Also the number of composable free pure multifunctions (CPMs) with one atom and n positions. A CPM is either (case 1) the leaf symbol "o", or (case 2) an expression of the form h[g_1, ..., g_k] where h and each of the g_i for i = 1, ..., k > 0 are CPMs, and the number of leaves in h is equal to k. The number of positions in a CPM is the number of brackets [...] plus the number of o's.

Examples

			The a(12) = 11 first/rest balanced rooted plane trees:
  (o(o(o((oo)oo))))
  (o(o((oo)(oo)o)))
  (o(o((oo)o(oo))))
  (o((oo)(o(oo))o))
  (o((oo)o(o(oo))))
  (o((oo)(oo)(oo)))
  ((oo)(o(o(oo)))o)
  ((oo)o(o(o(oo))))
  ((o(o(oo)))oooo)
  ((oo)(o(oo))(oo))
  ((oo)(oo)(o(oo)))
The a(12) = 11 composable free pure multifunctions:
  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][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[o]]
  o[o][o[o],o[o[o]]]
  o[o[o[o]]][o,o,o,o]
		

Crossrefs

Programs

  • Mathematica
    balplane[n_]:=balplane[n]=If[n===1,{{}},Join@@Function[c,Select[Tuples[balplane/@c],Length[Cases[#[[1]],{},{0,Infinity}]]==Length[#]-1&]]/@Join@@Permutations/@IntegerPartitions[n-1]];
    Table[Length[balplane[n]],{n,10}]
  • PARI
    seq(n)={my(p=x*y+O(x^2)); for(n=1, n\2, p = x*y + x*sum(k=1, n, y^k * polcoef(p,k,y) * (O(x^(2*n-k+1)) + p)^k )); Vec(subst(p + O(x*x^n), y, 1)) } \\ Andrew Howroyd, Jan 22 2021

Formula

G.f.: A(x,1) where A(x,y) satisfies A(x,y) = x*(y + Sum_{k>=1} y^k * ([y^k] A(x,y)) * A(x,y)^k). - Andrew Howroyd, Jan 22 2021

Extensions

Terms a(21) and beyond from Andrew Howroyd, Jan 22 2021

A138349 Moment sequence of tr(A) in USp(4).

Original entry on oeis.org

1, 0, 1, 0, 3, 0, 14, 0, 84, 0, 594, 0, 4719, 0, 40898, 0, 379236, 0, 3711916, 0, 37975756, 0, 403127256, 0, 4415203280, 0, 49671036900, 0, 571947380775, 0, 6721316278650, 0, 80419959684900, 0, 977737404590100, 0, 12058761323277900, 0
Offset: 0

Views

Author

Andrew V. Sutherland, Mar 16 2008

Keywords

Comments

An aerated version of A005700, which is the main entry for this sequence.
If A is a random matrix in the compact group USp(4) (4 X 4 complex matrices which are unitary and symplectic), then a(n)=E[(tr(A))^n] is the n-th moment of the trace of A.
The multiplicity of the trivial representation in the n-th tensor power of the standard representation of USp(4).
Number of returning NESW walks of length n on a 2-d integer lattice remaining in the chamber x>=y>=0, same as A005700(n/2) for n even.
Under a generalized Sato-Tate conjecture, this is the moment sequence of the distribution of scaled Frobenius traces a_p/sqrt(p) (as p varies), for almost all genus 2 curves. - Andrew V. Sutherland, Mar 16 2008

Examples

			a(4)=3 because E[(tr(A))^4] = 3 for a random matrix A in USp(4).
a(4)=3 because A126120(4)A126120(8)-A126120(6)^2 = 2*14-5*5 = 3.
a(4)=3 because EEWW, EWEW and ENSW are the returning walks on Z^2 with x>=y>=0.
		

Crossrefs

Formula

a(n) = (1/2)Integral_{x=0..Pi,y=0..Pi}(2cos(x)+2cos(y))^n(2cos(x)-2cos(y))^2(2/Pi*sin^2(x))(2/Pi*sin^2(y))dxdy.
a(n) = A126120(n)*A126120(n+4)-A126120(n+2)^2.
a(2n) = A005700(n) = A000108(n)*A000108(n+2)-A000108(n+1)^2, a(2n+1)=0.

A215495 a(4*n) = a(4*n+2) = a(2*n+1) = 2*n + 1.

Original entry on oeis.org

1, 1, 1, 3, 3, 5, 3, 7, 5, 9, 5, 11, 7, 13, 7, 15, 9, 17, 9, 19, 11, 21, 11, 23, 13, 25, 13, 27, 15, 29, 15, 31, 17, 33, 17, 35, 19, 37, 19, 39, 21, 41, 21, 43, 23, 45, 23, 47, 25, 49, 25, 51, 27, 53, 27, 55, 29, 57, 29, 59, 31, 61, 31, 63, 33, 65, 33, 67, 35, 69, 35, 71, 37, 73, 37, 75, 39, 77, 39, 79, 41, 81, 41, 83, 43, 85, 43
Offset: 0

Views

Author

Paul Curtz, Aug 13 2012

Keywords

Comments

A214282(n) and -A214283(n) are companions. Separately or together, they have many links with the Catalan's numbers A000108(n). Examples:
A214282(n+1) - 2*A214282(n) = -1, -1, 1, 0, -2, -5, 5, 0, -14, -42, 42, 0, -132, ....
2*A214283(n) - A214283(n+1) = 1, 0, -1, -2, 2, 0, -5, -14, 14, 0, -42, -132, 132, ....
A214282(n) + A214283(n) = 1, 0, -1, 0, 2, 0, -5, 0, 14, 0, -42,... (A126120).
The companion to a(n) is b(n) = -A214283(n)/(1,1,1,1,2,2,5,5,...) = 0, 1, 2, 3, 2, 5, 4, 7, 4, 9, 6, ....
a(n) - b(n) = A056594(n).
Discovered as a(n) = A214282(n+1)/A000108([n/2]). See abs(A129996(n-2)).

Crossrefs

Programs

  • Magma
    I:=[1,1,1,3,3,5]; [n le 6 select I[n] else Self(n-2) +Self(n-4) -Self(n-6): n in [1..30]]; // G. C. Greubel, Apr 23 2018
  • Mathematica
    a[n_?EvenQ] := n/2 + Boole[Mod[n, 4] == 0]; a[n_?OddQ] := n; Table[a[n], {n, 0, 86}] (* Jean-François Alcover, Aug 14 2012 *)
    LinearRecurrence[{0,1,0,1,0,-1}, {1,1,1,3,3,5}, 50] (* G. C. Greubel, Apr 23 2018 *)
  • PARI
    x='x+O('x^30); Vec(( 1+x+2*x^3+x^4+x^5 )/( (x^2+1)*(x-1)^2*(1+x)^2 )) \\ G. C. Greubel, Apr 23 2018
    

Formula

a(n+3) = (A185048(n+3)=2,2,4,2,... ) + 1.
a(n+2) - a(n) = 0, 2, 2, 2. (Period 4).
a(n) = 2*a(n-4) - a(n-8).
a(2*n) = A109613(n).
a(n+1) - a(n) = 2* (-1)^n * A059169(n).
G.f. : ( 1+x+2*x^3+x^4+x^5 ) / ( (x^2+1)*(x-1)^2*(1+x)^2 ). - Jean-François Alcover, Aug 14 2012
Previous Showing 31-40 of 59 results. Next