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.

A211192 Consider all distinct functions f representable as x -> x^x^...^x with n x's and parentheses inserted in all possible ways; sequence gives difference between numbers of f with f(0)=1 and numbers of f with f(0)=0, with conventions that 0^0=1^0=1^1=1, 0^1=0.

Original entry on oeis.org

0, -1, 1, 0, 2, 1, 8, 10, 39, 72, 225, 506, 1434, 3550, 9767, 25391, 69293, 185061, 505843, 1372744, 3769842, 10339104, 28546539, 78890525, 218945822, 608657861, 1697106780, 4740593393, 13272626627, 37224982494, 104599603493, 294384019508, 829836855332
Offset: 0

Views

Author

Alois P. Heinz, Feb 18 2013

Keywords

Comments

A000081(n) distinct functions are representable as x -> x^x^...^x with n x's and parentheses inserted in all possible ways. Some functions are representable in more than one way, the number of valid parenthesizations is A000108(n-1) for n>0.

Examples

			There are A000081(4) = 4 functions f representable as x -> x^x^...^x with 4 x's and parentheses inserted in all possible ways: ((x^x)^x)^x, (x^x)^(x^x) == (x^(x^x))^x, x^((x^x)^x), x^(x^(x^x)).  Only x^((x^x)^x) evaluates to 0 at x=0: 0^((0^0)^0) = 0^(1^0) = 0^1 = 0.  Three functions evaluate to 1 at x=0: ((0^0)^0)^0 = (1^0)^0 = 1^0 = 1, (0^0)^(0^0) = 1^1 = 1, 0^(0^(0^0)) = 0^(0^1) = 0^0 = 1. Thus a(4) = 3-1 = 2.
a(8) = A222380(8) - A222379(8) = 77 - 38 = 39.
		

Crossrefs

Programs

  • Maple
    g:= proc(n, i) option remember; `if`(n=0, [0, 1], `if`(i<1, 0, (v->[v[1]-
          v[2], v[2]])(add(((l, h)-> [binomial(l[2]+l[1]+j-1, j)*(h[1]+h[2]),
          binomial(l[1]+j-1, j)*h[2]])(g(i-1$2), g(n-i*j, i-1)), j=0..n/i))))
        end:
    a:= n-> (f-> f[1]-f[2])(g(n-1$2)):
    seq(a(n), n=0..40);
  • Mathematica
    g[n_, i_] := g[n, i] = If[n==0, {0, 1}, If[i<1, {0, 0}, ({#[[1]]-#[[2]], #[[2]]}&)[Sum[Function[{l, h}, {(h[[1]]+h[[2]])*Binomial[j+l[[1]]+l[[2]] -1, j], h[[2]]*Binomial[j+l[[1]]-1, j]}][g[i-1, i-1]], g[n-i*j, i-1]]], {j, 0, Quotient[n, i]}]];
    a[n_] := (#[[1]]-#[[2]]&)[g[n-1, n-1]]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Feb 22 2017, translated from Maple *)

Formula

a(n) = A222380(n) - A222379(n).
From Alois P. Heinz, Mar 01 2019: (Start)
a(n) is even <=> n in { A258592 }.
a(n) is odd <=> n in { A263831 }. (End)

A263832 The number c_{Cc,pi_1(B_2)}(n) of the second amphicosm n-coverings over the second amphicosm.

Original entry on oeis.org

1, 0, 5, 2, 7, 0, 9, 6, 18, 0, 13, 10, 15, 0, 35, 14, 19, 0, 21, 14, 45, 0, 25, 30, 38, 0, 58, 18, 31, 0, 33, 30, 65, 0, 63, 36, 39, 0, 75, 42, 43, 0, 45, 26, 126, 0, 49, 70, 66, 0, 95, 30, 55, 0, 91, 54, 105, 0, 61, 70, 63, 0, 162, 62, 105, 0, 69
Offset: 1

Views

Author

N. J. A. Sloane, Oct 28 2015

Keywords

Crossrefs

Programs

  • Mathematica
    sigma[n_] := DivisorSigma[1, n]; q = Quotient;
    a[n_] := Switch[Mod[n, 4], 0, Sum[sigma[q[n, 2d]] - sigma[q[n, 4d]], {d, Divisors[q[n, 4]]}], 2, 0, 1|3, Sum[sigma[d], {d, Divisors[n]}]];
    Array[a, 70] (* Jean-François Alcover, Dec 01 2018, after Gheorghe Coserea *)
  • PARI
    A007429(n) = sumdiv(n, d, sigma(d));
    a(n) = {
      if (n%2, A007429(n), if (n%4, 0,
          sumdiv(n\4, d, sigma(n\(2*d)) - sigma(n\(4*d)))));
    };
    vector(67, n, a(n))  \\ Gheorghe Coserea, May 05 2016

Extensions

More terms from Gheorghe Coserea, May 05 2016

A258592 Values of k such that the number of rooted trees with k nodes (A000081(k)) is even.

Original entry on oeis.org

0, 3, 4, 6, 7, 9, 11, 12, 13, 19, 20, 21, 24, 26, 29, 31, 32, 34, 36, 37, 39, 41, 43, 44, 45, 46, 47, 48, 51, 52, 53, 54, 55, 57, 58, 59, 60, 62, 63, 66, 69, 70, 72, 79, 80, 81, 83, 85, 86, 88, 89, 90, 91, 92, 94, 95, 96, 97, 100, 101, 102, 103, 105, 106, 107
Offset: 1

Views

Author

Vladimir Reshetnikov, Nov 06 2015

Keywords

Comments

Complement of A263831.

Crossrefs

Programs

  • Mathematica
    Module[{t}, t[1] = 1; t[k_] := t[k] = Sum[DivisorSum[k-m, t[#] # &] t[m]/(k-1), {m, k-1}]; Select[Range[0, 107], EvenQ@t[#] &]] (* after Alois P. Heinz *)
Showing 1-3 of 3 results.