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.

A276986 Numbers n for which there is a permutation p of (1,2,3,...,n) such that k+p(k) is a Catalan number for 1<=k<=n.

This page as a plain text file.
%I A276986 #36 Nov 20 2016 09:04:12
%S A276986 0,1,3,4,9,10,12,13,28,29,31,32,37,38,40,41,90,91,93,94,99,100,102,
%T A276986 103,118,119,121,122,127,128,130,131,297,298,300,301,306,307,309,310,
%U A276986 325,326,328,329,334,335,337,338,387,388,390,391,396,397,399,400,415,416
%N A276986 Numbers n for which there is a permutation p of (1,2,3,...,n) such that k+p(k) is a Catalan number for 1<=k<=n.
%C A276986 A001453 is a subsequence. - _Altug Alkan_, Sep 29 2016
%C A276986 n>=1 is in the sequence if and only if there is a Catalan number c such that c/2 <= n < c and c-n-1 is in the sequence. - _Robert Israel_, Nov 20 2016
%H A276986 Robert Israel, <a href="/A276986/b276986.txt">Table of n, a(n) for n = 1..10000</a>
%F A276986 a(i) + a(2^n+1-i) = A000108(n+1)-1 for 1<=i<=2^n. - _Robert Israel_, Nov 20 2016
%e A276986 3 is in the sequence because the permutation (1,3,2) added termwise to (1,2,3) yields (2,5,5) and both 2 and 5 are Catalan numbers.
%p A276986 S:= {0}:
%p A276986 for i from 1 to 8 do
%p A276986   c:= binomial(2*i,i)/(i+1);
%p A276986   S:= S union map(t -> c - t - 1, S);
%p A276986 od:
%p A276986 sort(convert(S,list)); # _Robert Israel_, Nov 20 2016
%t A276986 CatalanTo[n0_] :=
%t A276986 Module[{n = n0}, k = 1; L = {};
%t A276986   While[CatalanNumber[k] <= 2*n, L = {L, CatalanNumber[k]}; k++];
%t A276986   L = Flatten[L]]
%t A276986 perms[n0_] := Module[{n = n0, S, func, T, T2},
%t A276986   func[k_] := Cases[CatalanTo[n], x_ /; 1 <= x - k <= n] - k;
%t A276986   T = Tuples[Table[func[k], {k, 1, n}]];
%t A276986   T2 = Cases[T, x_ /; Length[Union[x]] == Length[x]];
%t A276986   Length[T2]]
%t A276986 Select[Range[41], perms[#] > 0 &]
%Y A276986 Cf. A000108, A073364.
%K A276986 nonn
%O A276986 1,3
%A A276986 _Gary E. Davis_, Sep 24 2016
%E A276986 More terms from _Alois P. Heinz_, Sep 28 2016
%E A276986 a(23)-a(58) from _Robert Israel_, Nov 18 2016