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-10 of 11 results. Next

A073430 Upper triangular region of the table A073346.

Original entry on oeis.org

1, 1, 0, 0, 2, 0, 1, 0, 4, 0, 0, 2, 4, 8, 0, 0, 2, 8, 16, 16, 0, 0, 0, 12, 40, 48, 32, 0, 1, 0, 12, 80, 144, 128, 64, 0, 0, 2, 12, 136, 384, 448, 320, 128, 0, 0, 2, 12, 224, 912, 1408, 1280, 768, 256, 0, 0, 0, 20, 328, 2048, 4096, 4544, 3456, 1792, 512, 0, 0, 2, 16, 480, 4336
Offset: 0

Views

Author

Antti Karttunen, Jul 31 2002

Keywords

Programs

A036987 Fredholm-Rueppel sequence.

Original entry on oeis.org

1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Keywords

Comments

Binary representation of the Kempner-Mahler number Sum_{k>=0} 1/2^(2^k) = A007404.
a(n) = (product of digits of n; n in binary notation) mod 2. This sequence is a transformation of the Thue-Morse sequence (A010060), since there exists a function f such that f(sum of digits of n) = (product of digits of n). - Ctibor O. Zizka, Feb 12 2008
a(n-1), n >= 1, the characteristic sequence for powers of 2, A000079, is the unique solution of the following formal product and formal power series identity: Product_{j>=1} (1 + a(j-1)*x^j) = 1 + Sum_{k>=1} x^k = 1/(1-x). The product is therefore Product_{l>=1} (1 + x^(2^l)). Proof. Compare coefficients of x^n and use the binary representation of n. Uniqueness follows from the recurrence relation given for the general case under A147542. - Wolfdieter Lang, Mar 05 2009
a(n) is also the number of orbits of length n for the map x -> 1-cx^2 on [-1,1] at the Feigenbaum critical value c=1.401155... . - Thomas Ward, Apr 08 2009
A054525 (Mobius transform) * A001511 = A036987 = A047999^(-1) * A001511 = the inverse of Sierpiński's gasket * the ruler sequence. - Gary W. Adamson, Oct 26 2009 [Of course this is only vaguely correct depending on how the fuzzy indexing in these formulas is made concrete. - R. J. Mathar, Jun 20 2014]
Characteristic function of A000225. - Reinhard Zumkeller, Mar 06 2012
Also parity of the Catalan numbers A000108. - Omar E. Pol, Jan 17 2012
For n >= 2, also the largest exponent k >= 0 such that n^k in binary notation does not contain both 0 and 1. Unlike for the decimal version of this sequence, A062518, where the terms are only conjectural, for this sequence the values of a(n) can be proved to be the characteristic function of A000225, as follows: n^k will contain both 0 and 1 unless n^k = 2^r-1 for some r. But this is a special case of Catalan's equation x^p = y^q-1, which was proved by Preda Mihăilescu to have no nontrivial solution except 2^3 = 3^2 - 1. - Christopher J. Smyth, Aug 22 2014
Image, under the coding a,b -> 1; c -> 0, of the fixed point, starting with a, of the morphism a -> ab, b -> cb, c -> cc. - Jeffrey Shallit, May 14 2016
Number of nonisomorphic Boolean algebras of order n+1. - Jianing Song, Jan 23 2020

Examples

			G.f. = 1 + x + x^3 + x^7 + x^15 + x^31 + x^63 + x^127 + x^255 + x^511 + ...
a(7) = 1 since 7 = 2^3 - 1, while a(10) = 0 since 10 is not of the form 2^k - 1 for any integer k.
		

Crossrefs

The first row of A073346. Occurs for first time in A073202 as row 6 (and again as row 8).
Congruent to any of the sequences A000108, A007460, A007461, A007463, A007464, A061922, A068068 reduced modulo 2. Characteristic function of A000225.
If interpreted with offset=1 instead of 0 (i.e., a(1)=1, a(2)=1, a(3)=0, a(4)=1, ...) then this is the characteristic function of 2^n (A000079) and as such occurs as the first row of A073265. Also, in that case the INVERT transform will produce A023359.
This is Guy Steele's sequence GS(1, 3), also GS(3, 1) (see A135416).
Cf. A054525, A047999. - Gary W. Adamson, Oct 26 2009

Programs

  • Haskell
    a036987 n = ibp (n+1) where
       ibp 1 = 1
       ibp n = if r > 0 then 0 else ibp n' where (n',r) = divMod n 2
    a036987_list = 1 : f [0,1] where f (x:y:xs) = y : f (x:xs ++ [x,x+y])
    -- Same list generator function as for a091090_list, cf. A091090.
    -- Reinhard Zumkeller, May 19 2015, Apr 13 2013, Mar 13 2013
    
  • Maple
    A036987:= n-> `if`(2^ilog2(n+1) = n+1, 1, 0):
    seq(A036987(n), n=0..128);
  • Mathematica
    RealDigits[ N[ Sum[1/10^(2^n), {n, 0, Infinity}], 110]][[1]]
    (* Recurrence: *)
    t[n_, 1] = 1; t[1, k_] = 1;
    t[n_, k_] := t[n, k] =
      If[n < k, If[n > 1 && k > 1, -Sum[t[k - i, n], {i, 1, n - 1}], 0],
       If[n > 1 && k > 1, Sum[t[n - i, k], {i, 1, k - 1}], 0]];
    Table[t[n, k], {k, n, n}, {n, 104}]
    (* Mats Granvik, Jun 03 2011 *)
    mb2d[n_]:=1 - Module[{n2 = IntegerDigits[n, 2]}, Max[n2] - Min[n2]]; Array[mb2d, 120, 0] (* Vincenzo Librandi, Jul 19 2019 *)
    Table[PadRight[{1},2^k,0],{k,0,7}]//Flatten (* Harvey P. Dale, Apr 23 2022 *)
  • PARI
    {a(n) =( n++) == 2^valuation(n, 2)}; /* Michael Somos, Aug 25 2003 */
    
  • PARI
    a(n) = !bitand(n, n+1); \\ Ruud H.G. van Tol, Apr 05 2023
    
  • Python
    from sympy import catalan
    def a(n): return catalan(n)%2 # Indranil Ghosh, May 25 2017
    
  • Python
    def A036987(n): return int(not(n&(n+1))) # Chai Wah Wu, Jul 06 2022

Formula

1 followed by a string of 2^k - 1 0's. Also a(n)=1 iff n = 2^m - 1.
a(n) = a(floor(n/2)) * (n mod 2) for n>0 with a(0)=1. - Reinhard Zumkeller, Aug 02 2002 [Corrected by Mikhail Kurkov, Jul 16 2019]
Sum_{n>=0} 1/10^(2^n) = 0.110100010000000100000000000000010...
1 if n=0, floor(log_2(n+1)) - floor(log_2(n)) otherwise. G.f.: (1/x) * Sum_{k>=0} x^(2^k) = Sum_{k>=0} x^(2^k-1). - Ralf Stephan, Apr 28 2003
a(n) = 1 - A043545(n). - Michael Somos, Aug 25 2003
a(n) = -Sum_{d|n+1} mu(2*d). - Benoit Cloitre, Oct 24 2003
Dirichlet g.f. for right-shifted sequence: 2^(-s)/(1-2^(-s)).
a(n) = A000108(n) mod 2 = A001405(n) mod 2. - Paul Barry, Nov 22 2004
a(n) = Sum_{k=0..n} (-1)^(n-k)*binomial(n,k)*Sum_{j=0..k} binomial(k, 2^j-1). - Paul Barry, Jun 01 2006
A000523(n+1) = Sum_{k=1..n} a(k). - Mitch Harris, Jul 22 2011
a(n) = A209229(n+1). - Reinhard Zumkeller, Mar 07 2012
a(n) = Sum_{k=1..n} A191898(n,k)*cos(Pi*(n-1)*(k-1))/n; (conjecture). - Mats Granvik, Mar 04 2013
a(n) = A000035(A000108(n)). - Omar E. Pol, Aug 06 2013
a(n) = 1 iff n=2^k-1 for some k, 0 otherwise. - M. F. Hasler, Jun 20 2014
a(n) = ceiling(log_2(n+2)) - ceiling(log_2(n+1)). - Gionata Neri, Sep 06 2015
From John M. Campbell, Jul 21 2016: (Start)
a(n) = (A000168(n-1) mod 2).
a(n) = (A000531(n+1) mod 2).
a(n) = (A000699(n+1) mod 2).
a(n) = (A000891(n) mod 2).
a(n) = (A000913(n-1) mod 2), for n>1.
a(n) = (A000917(n-1) mod 2), for n>0.
a(n) = (A001142(n) mod 2).
a(n) = (A001246(n) mod 2).
a(n) = (A001246(n) mod 4).
a(n) = (A002057(n-2) mod 2), for n>1.
a(n) = (A002430(n+1) mod 2). (End)
a(n) = 2 - A043529(n). - Antti Karttunen, Nov 19 2017
a(n) = floor(1+log(n+1)/log(2)) - floor(log(2n+1)/log(2)). - Adriano Caroli, Sep 22 2019
This is also the decimal expansion of -Sum_{k>=1} mu(2*k)/(10^k - 1), where mu is the Möbius function (A008683). - Amiram Eldar, Jul 12 2020

Extensions

Edited by M. F. Hasler, Jun 20 2014

A073345 Table T(n,k), read by ascending antidiagonals, giving the number of rooted plane binary trees of size n and height k.

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 6, 8, 0, 0, 0, 0, 0, 0, 0, 4, 20, 0, 0, 0, 0, 0, 0, 0, 0, 1, 40, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94, 152, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 114, 376, 144, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Antti Karttunen, Jul 31 2002

Keywords

Examples

			The top-left corner of this square array is
  1 0 0 0 0 0 0 0 0 ...
  0 1 0 0 0 0 0 0 0 ...
  0 0 2 1 0 0 0 0 0 ...
  0 0 0 4 6 6 4 1 0 ...
  0 0 0 0 8 20 40 68 94 ...
E.g. we have A000108(3) = 5 binary trees built from 3 non-leaf (i.e. branching) nodes:
_______________________________3
___\/__\/____\/__\/____________2
__\/____\/__\/____\/____\/_\/__1
_\/____\/____\/____\/____\./___0
The first four have height 3 and the last one has height 2, thus T(3,3) = 4, T(3,2) = 1 and T(3,any other value of k) = 0.
		

References

  • Luo Jian-Jin, Catalan numbers in the history of mathematics in China, in Combinatorics and Graph Theory, (Yap, Ku, Lloyd, Wang, Editors), World Scientific, River Edge, NJ, 1995.

Crossrefs

Variant: A073346. Column sums: A000108. Row sums: A001699.
Diagonals: A073345(n, n) = A011782(n), A073345(n+3, n+2) = A014480(n), A073345(n+2, n) = A073773(n), A073345(n+3, n) = A073774(n) - Henry Bottomley and AK, see the attached notes.
A073429 gives the upper triangular region of this array. Cf. also A065329, A001263.

Programs

  • Maple
    A073345 := n -> A073345bi(A025581(n), A002262(n));
    A073345bi := proc(n,k) option remember; local i,j; if(0 = n) then if(0 = k) then RETURN(1); else RETURN(0); fi; fi; if(0 = k) then RETURN(0); fi; 2 * add(A073345bi(n-i-1,k-1) * add(A073345bi(i,j),j=0..(k-1)),i=0..floor((n-1)/2)) + 2 * add(A073345bi(n-i-1,k-1) * add(A073345bi(i,j),j=0..(k-2)),i=(floor((n-1)/2)+1)..(n-1)) - (`mod`(n,2))*(A073345bi(floor((n-1)/2),k-1)^2); end;
    A025581 := n -> binomial(1+floor((1/2)+sqrt(2*(1+n))),2) - (n+1);
    A002262 := n -> n - binomial(floor((1/2)+sqrt(2*(1+n))),2);
  • Mathematica
    a[0, 0] = 1; a[n_, k_]/;k2^n-1 := 0; a[n_, k_]/;1 <= n <= k <= 2^n-1 := a[n, k] = Sum[a[n-1, k-1-i](2Sum[ a[j, i], {j, 0, n-2}]+a[n-1, i]), {i, 0, k-1}]; Table[a[n, k], {n, 0, 9}, {k, 0, 9}]
    (* or *) a[0] = 0; a[1] = 1; a[n_]/;n>=2 := a[n] = Expand[1 + x a[n-1]^2]; gfT[n_] := a[n]-a[n-1]; Map[CoefficientList[ #, x, 8]&, Table[gfT[n], {n, 9}]/.{x^i_/;i>=9 ->0}] (Callan)

Formula

(See the Maple code below. Is there a nicer formula?)
This table was known to the Chinese mathematician Ming An-Tu, who gave the following recurrence in the 1730s. a(0, 0) = 1, a(n, k) = Sum[a(n-1, k-1-i)( 2*Sum[ a(j, i), {j, 0, n-2}]+a(n-1, i) ), {i, 0, k-1}]. - David Callan, Aug 17 2004
The generating function for row n, T_n(x):=Sum[T(n, k)x^k, k>=0], is given by T_n = a(n)-a(n-1) where a(n) is defined by the recurrence a(0)=0, a(1)=1, a(n) = 1 + x a(n-1)^2 for n>=2. - David Callan, Oct 08 2005

A058922 a(n) = n*2^n - 2^n = 2^n*(n-1).

Original entry on oeis.org

0, 4, 16, 48, 128, 320, 768, 1792, 4096, 9216, 20480, 45056, 98304, 212992, 458752, 983040, 2097152, 4456448, 9437184, 19922944, 41943040, 88080384, 184549376, 385875968, 805306368, 1677721600, 3489660928, 7247757312, 15032385536, 31138512896, 64424509440, 133143986176
Offset: 1

Views

Author

N. J. A. Sloane, Jan 12 2001

Keywords

Comments

A hierarchical sequence (S(W'2{2}*c) - see A059126).

Crossrefs

A001787(n) = a(n+1)/4. A073346(n, n-2) = a(n-2).
Cf. A000337. - Omar E. Pol, Feb 22 2010

Programs

Formula

a(n) = -det(M(n+1)) where M(n) is the n X n matrix with m(i,i)=1, m(i,j)=-i/j for i != j. - Benoit Cloitre, Feb 01 2003
With offset 0, this is 4n*2^(n-1), the binomial transform of 4n. - Paul Barry, May 20 2003
a(1)=0, a(n) = 2*a(n-1) + 2^n for n>1. - Philippe Deléham, Apr 20 2009
a(n) = A000337(n) - 1. - Omar E. Pol, Feb 22 2010
From R. J. Mathar, Mar 01 2010: (Start)
a(n)= 4*a(n-1) - 4*a(n-2).
G.f.: 4*x^2/(2*x-1)^2. (End)
From Amiram Eldar, Jan 12 2021: (Start)
Sum_{n>=2} 1/a(n) = log(2)/2.
Sum_{n>=2} (-1)^n/a(n) = log(3/2)/2. (End)

A073431 Number of separate orbits/cycles to which the Catalan bijections A069767/A069768 partition each A000108(n) structures encoded in the range [A014137(n-1)..A014138(n-1)] of the sequence A014486/A063171.

Original entry on oeis.org

1, 1, 1, 2, 3, 6, 12, 28, 65, 160, 408, 1074, 2898, 7998, 22508, 64426, 187251, 551730, 1645840, 4964876, 15130808, 46545788, 144424944, 451715460
Offset: 0

Views

Author

Antti Karttunen, Jul 31 2002

Keywords

Crossrefs

Occurs for first time in A073201 as row 6 (and 8). Column sums of the square array A074079/Row sums of the triangle A074080.

Programs

  • Maple
    A073431 := proc(n) local i; (1/2^n) * add((2^(n-i))*A073346bi(n,i),i=0..n); end;

Formula

a(0)=1, a(n) = (1/(2^(n-1))) * Sum_{i=1..(2^(n-1))} (Sum_{j=0..A007814(i)} A073346(n, j)) = (1/(2^(n-2))) * Sum_{i=1..(2^(n-1))} A073346(n, A007814(i)) - 1 = (1/2^n) * Sum_{i=0..n} (2^(n-i))*A073346(n, i) = Sum_{i=0..n} A074079(n, i)

A074080 Triangle T(n,k) (listed in order T(1,0), T(2,0), T(2,1), T(3,0), T(3,1), T(3,2), T(4,0), etc.) giving the number of 2^k-cycles that occur in the n-th sub-permutation of A069767/A069768 (i.e., in the range [A014137(n-1)..A014138(n-1)] inclusive).

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 2, 2, 1, 0, 0, 3, 5, 3, 1, 1, 0, 3, 10, 9, 4, 1, 0, 1, 3, 17, 24, 14, 5, 1, 0, 1, 3, 28, 57, 44, 20, 6, 1, 0, 0, 5, 41, 128, 128, 71, 27, 7, 1, 0, 1, 4, 60, 271, 354, 234, 106, 35, 8, 1, 0, 0, 5, 81, 549, 937, 738, 384, 150, 44, 9, 1, 0, 0, 5, 106, 1061
Offset: 0

Views

Author

Antti Karttunen, Aug 19 2002

Keywords

Examples

			If we take the fifth such sub-permutation, i.e., the subsequence A069767[23..64]: [45,46,48,49,50,54,55,57,58,59,61,62,63,64,44,47,53,56,60,43,52,40,31,32,41,34,35,36,42,51,39,30,33,38,29,26,27,37,28,25,24,23], subtract 22 from each term and convert the resulting permutation of [1..42] to disjoint cycle notation, we get:
(17,31),(20,21,30,29),(3,26,12,40),(6,32,8,35,7,33,11,39),(15,22,18,34,16,25,19,38),(1,23,9,36,4,27,13,41,2,24,10,37,5,28,14,42)
which implies that T(5,0) = 0 (no fixed elements), T(5,1) = 1 (one transposition), T(5,2) = 2 (two 4-cycles), T(5,3) = 2 (two 8-cycles), T(5,4) = 1 (and one 16-cycle). It is guaranteed that only cycles whose length is a power of 2 occur in A069767/A069768.
		

Crossrefs

Upper triangular region of the square array A074079 (actually, only the area above its main diagonal, excluding also the leftmost column). T(n, k) = A073430(n, k)/(2^k) [with the rightmost edge of A073430 discarded]. Row sums: A073431. A000108(n) = Sum_{i=0..n-1} 2^i * T(n, i). Cf. A073346, A003056, A002262.

Programs

A074079 Square array A(row,col) (listed in order A(0,0), A(0,1), A(1,0), A(0,2), A(1,1), A(2,0), A(0,3), etc.), giving essentially the same information as the triangle A074080 which shows only the upper triangular region.

Original entry on oeis.org

1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 2, 1, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 0, 0, 0, 1, 3, 5, 1, 0, 0, 0, 0, 0, 0, 1, 3, 10, 3, 0, 0, 0, 0, 0, 0, 0, 0, 3, 17, 9, 1, 0, 0, 0, 0, 0, 0, 0, 1, 5, 28, 24, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 41, 57, 14, 1, 0, 0, 0
Offset: 0

Views

Author

Antti Karttunen, Aug 19 2002

Keywords

Crossrefs

Obtained from the square array A073346 by dividing the entries on the k-th row by 2^k. Column sums: A073431. See A074080 for explanation. Cf. also A025581, A002262.

Programs

Formula

A074079(n, k) = A073346(n, k)/(2^k)

A073774 Number of plane binary trees of size n+3 and height n.

Original entry on oeis.org

0, 0, 0, 4, 68, 376, 1440, 4736, 14272, 40576, 110592, 291840, 750592, 1890304, 4677632, 11403264, 27443200, 65306624, 153878528, 359399424, 832831488, 1916272640, 4380950528, 9957277696, 22510829568, 50642026496, 113413980160
Offset: 0

Views

Author

Antti Karttunen, Aug 11 2002

Keywords

Crossrefs

Programs

Formula

a(n) = A073345(n+3, n).
a(n < 3) = 0, a(3) = 4, a(n) = 1/12 * 2^(n-1) * (2*n^3 + 9*n^2 - 23*n - 78) or a(n) = 2^(n-2) * |A073775(n-3)| from n >= 3 onward.

A084107 A014486-encoding of "Complete Binary Trees".

Original entry on oeis.org

0, 2, 50, 14642, 1016674610, 4489135110542145842, 83940259113354708787282267381662562610, 28755706180189132304920279902696353117047700481289459579932708798287463397682
Offset: 0

Views

Author

Antti Karttunen, May 13 2003

Keywords

Comments

"Complete" or "full binary tree" refers to a unique binary tree of (2^n)-1 nodes with its 2^(n-1) leaves all on the same height (or depth) n-1 (when the root is at height 0). These are depicted at A073346. This differs from "completely binary tree", with which some authors refer to trees more akin to the trees encoded by A080299.

Crossrefs

a(n) = A014486(A084108(n)). Subset of A083941.

A073773 Number of plane binary trees of size n+2 and height n.

Original entry on oeis.org

0, 0, 0, 6, 40, 152, 480, 1376, 3712, 9600, 24064, 58880, 141312, 333824, 778240, 1794048, 4096000, 9273344, 20840448, 46530560, 103284736, 228065280, 501219328, 1096810496, 2390753280, 5192548352, 11240734720, 24259854336
Offset: 0

Views

Author

Antti Karttunen, Aug 11 2002

Keywords

Examples

			a(3) = 6 because there exists only these six binary trees of size 5 and height 3:
_\/\/_______\/\/_\/_\/_____\/_\/_\/___\/___V_V___
__\/_\/___\/_\/___\/_\/___\/_\/___\/_\/___\/_\/__
___\./_____\./_____\./_____\./_____\./_____\./___
		

Crossrefs

Programs

  • Maple
    A073773 := n -> `if`((n < 3),0,((n^2 - 6)*2^(n-2)));

Formula

a(n) = A073345(n+2, n).
a(n < 3) = 0, a(n) = ((n^2 - 6)*2^(n-2)).
Showing 1-10 of 11 results. Next