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-3 of 3 results.

A075161 Position of A075165(n+1) in A014486.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 9, 7, 6, 10, 23, 12, 65, 24, 11, 8, 197, 15, 626, 26, 25, 66, 2056, 13, 14, 198, 16, 68, 6918, 29, 23714, 17, 67, 627, 28, 40, 82500, 2057, 199, 27, 290512, 71, 1033412, 200, 30, 6919, 3707852, 31, 37, 38, 628, 629, 13402697, 43, 70, 69, 2058
Offset: 0

Views

Author

Antti Karttunen, Sep 13 2002

Keywords

Comments

See A075166.

Crossrefs

Inverse of A075162. a(n) = A075163(n+1)-1. Cf. A075168.

A215406 A ranking algorithm for the lexicographic ordering of the Catalan families.

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 3, 3, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4
Offset: 0

Views

Author

Peter Luschny, Aug 09 2012

Keywords

Comments

See Antti Karttunen's code in A057117. Karttunen writes: "Maple procedure CatalanRank is adapted from the algorithm 3.23 of the CAGES (Kreher and Stinson) book."
For all n>0, a(A014486(n)) = n = A080300(A014486(n)). The sequence A080300 differs from this one in that it gives 0 for those n which are not found in A014486. - Antti Karttunen, Aug 10 2012

Crossrefs

Programs

  • Maple
    A215406 := proc(n) local m,a,y,t,x,u,v;
    m := iquo(A070939(n), 2);
    a := A030101(n);
    y := 0; t := 1;
    for x from 0 to 2*m-2 do
        if irem(a, 2) = 1 then y := y + 1
        else u := 2*m - x;
             v := m-1 - iquo(x+y,2);
             t := t + A037012(u,v);
             y := y - 1 fi;
        a := iquo(a, 2) od;
    A014137(m) - t end:
    seq(A215406(i),i=0..199); # Peter Luschny, Aug 10 2012
  • Mathematica
    A215406[n_] := Module[{m, d, a, y, t, x, u, v}, m = Quotient[Length[d = IntegerDigits[n, 2]], 2]; a = FromDigits[Reverse[d], 2]; y = 0; t = 1; For[x = 0, x <= 2*m - 2, x++, If[Mod[a, 2] == 1, y++, u = 2*m - x; v = m - Quotient[x + y, 2] - 1; t = t - Binomial[u - 1, v - 1] + Binomial[u - 1, v]; y--]; a = Quotient[a, 2]]; (1 - I*Sqrt[3])/2 - 4^(m + 1)*Gamma[m + 3/2]*Hypergeometric2F1[1, m + 3/2, m + 3, 4]/(Sqrt[Pi]*Gamma[m + 3]) - t]; Table[A215406[n] // Simplify, {n, 0, 86}] (* Jean-François Alcover, Jul 25 2013, translated and adapted from Peter Luschny's Maple program *)
  • Sage
    def A215406(n) : # CatalanRankGlobal(n)
        m = A070939(n)//2
        a = A030101(n)
        y = 0; t = 1
        for x in (1..2*m-1) :
            u = 2*m - x; v = m - (x+y+1)/2
            mn = binomial(u, v) - binomial(u, v-1)
            t += mn*(1 - a%2)
            y -= (-1)^a
            a = a//2
        return A014137(m) - t

A075169 Position of A014486(n) in A075170.

Original entry on oeis.org

0, 1, 2, 3, 5, 4, 6, 7, 15, 10, 11, 9, 8, 16, 13, 12, 14, 63, 31, 30, 127, 255, 65535, 21, 20, 22, 23, 47, 18, 19, 17, 64, 32, 33, 128, 256, 65536, 26, 27, 25, 24, 48, 29, 28, 126, 2047, 4095, 62, 1023, 511, 131071, 61, 60, 254, 16383, 8191, 510, 32767
Offset: 0

Views

Author

Antti Karttunen, Sep 13 2002

Keywords

Comments

See A075171.

Crossrefs

Inverse of A075168.
Showing 1-3 of 3 results.