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 26 results. Next

A124758 Product of the parts of the compositions in standard order.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

The standard order of compositions is given by A066099.
A composition of n is a finite sequence of positive integers summing to n. The k-th composition in standard order (row k of A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. - Gus Wiseman, Apr 03 2020

Examples

			Composition number 11 is 2,1,1; 2*1*1 = 2, so a(11) = 2.
The table starts:
  1
  1
  2 1
  3 2 2 1
  4 3 4 2 3 2 2 1
  5 4 6 3 6 4 4 2 4 3 4 2 3 2 2 1
The 146-th composition in standard order is (3,3,2), with product 18, so a(146) = 18. - _Gus Wiseman_, Apr 03 2020
		

Crossrefs

Cf. A066099, A118851, A011782 (row lengths), A001906 (row sums).
The lengths of standard compositions are given by A000120.
The version for prime indices is A003963.
The version for binary indices is A096111.
Taking the sum instead of product gives A070939.
The sum of binary indices is A029931.
The sum of prime indices is A056239.
Taking GCD instead of product gives A326674.
Positions of first appearances are A331579.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Table[Times@@stc[n],{n,0,100}] (* Gus Wiseman, Apr 03 2020 *)

Formula

For a composition b(1),...,b(k), a(n) = Product_{i=1}^k b(i).
a(A164894(n)) = a(A246534(n)) = n!. - Gus Wiseman, Apr 03 2020
a(A233249(n)) = a(A333220(n)) = A003963(n). - Gus Wiseman, Apr 03 2020
From Mikhail Kurkov, Jul 11 2021: (Start)
Some conjectures:
a(2n+1) = a(n) for n >= 0.
a(2n) = (1 + 1/A001511(n))*a(n) = 2*a(n) + a(n - 2^f(n)) - a(2n - 2^f(n)) for n > 0 with a(0)=1 where f(n) = A007814(n).
From the 1st formula for a(2n) we get a(4n+2) = 2*a(n), a(4n) = 2*a(2n) - a(n).
Sum_{k=0..2^n - 1} a(k) = A001519(n+1) for n >= 0.
a((4^n - 1)/3) = A011782(n) for n >= 0.
a(2^m*(2^n - 1)) = m + 1 for n > 0, m >= 0. (End)

A036044 BCR(n): write in binary, complement, reverse.

Original entry on oeis.org

1, 0, 2, 0, 6, 2, 4, 0, 14, 6, 10, 2, 12, 4, 8, 0, 30, 14, 22, 6, 26, 10, 18, 2, 28, 12, 20, 4, 24, 8, 16, 0, 62, 30, 46, 14, 54, 22, 38, 6, 58, 26, 42, 10, 50, 18, 34, 2, 60, 28, 44, 12, 52, 20, 36, 4, 56, 24, 40, 8, 48, 16, 32, 0, 126, 62, 94, 30, 110, 46, 78, 14, 118, 54, 86
Offset: 0

Views

Author

Keywords

Comments

a(0) could be considered to be 0 if the binary representation of zero were chosen to be the empty string. - Jason Kimberley, Sep 19 2011
From Bernard Schott, Jun 15 2021: (Start)
Except for a(0) = 1, every term is even.
For each q >= 0, there is one and only one odd number h such that a(n) = 2*q iff n = h*2^m-1 for m >= 1 when q = 0, and for m >= 0 when q >= 1 (see A345401 and some examples below).
a(n) = 0 iff n = 2^m-1 for m >= 1 (Mersenne numbers) (A000225).
a(n) = 2 iff n = 3*2^m-1 for m >= 0 (A153893).
a(n) = 4 iff n = 7*2^m-1 for m >= 0 (A086224).
a(n) = 6 iff n = 5*2^m-1 for m >= 0 (A153894).
a(n) = 8 iff n = 15*2^m-1 for m >= 0 (A196305).
a(n) = 10 iff n = 11*2^m-1 for m >= 0 (A086225).
a(n) = 12 iff n = 13*2^m-1 for m >= 0 (A198274).
For k >= 1, a(n) = 2^k iff n = (2^(k+1)-1)*2^m - 1 for m >= 0.
Explanation for a(n) = 2:
For m >= 0, A153893(m) = 3*2^m-1 -> 1011...11 -> 0100...00 -> 10 -> 2 where 1011...11_2 is 10 followed by m 1's. (End)

Examples

			4 -> 100 -> 011 -> 110 -> 6.
		

Crossrefs

Cf. A035928 (fixed points), A195063, A195064, A195065, A195066.
Indices of terms 0, 2, 4, 6, 8, 10, 12, 14, 18, 22, 26, 30: A000225 \ {0}, A153893, A086224, A153894, A196305, A086225, A198274, A052996\{1,3}, A291557, A198276, A171389, A198275.

Programs

  • Haskell
    import Data.List (unfoldr)
    a036044 0 = 1
    a036044 n = foldl (\v d -> 2 * v + d) 0 (unfoldr bc n) where
       bc 0 = Nothing
       bc x = Just (1 - m, x') where (x',m) = divMod x 2
    -- Reinhard Zumkeller, Sep 16 2011
    
  • Magma
    A036044:=func; // Jason Kimberley, Sep 19 2011
    
  • Maple
    A036044 := proc(n)
        local bcr ;
        if n = 0 then
            return 1;
        end if;
        convert(n,base,2) ;
        bcr := [seq(1-i,i=%)] ;
        add(op(-k,bcr)*2^(k-1),k=1..nops(bcr)) ;
    end proc:
    seq(A036044(n),n=0..200) ; # R. J. Mathar, Nov 06 2017
  • Mathematica
    dtn[ L_ ] := Fold[ 2#1+#2&, 0, L ]; f[ n_ ] := dtn[ Reverse[ 1-IntegerDigits[ n, 2 ] ] ]; Table[ f[ n ], {n, 0, 100} ]
    Table[FromDigits[Reverse[IntegerDigits[n,2]/.{1->0,0->1}],2],{n,0,80}] (* Harvey P. Dale, Mar 08 2015 *)
  • PARI
    a(n)=fromdigits(Vecrev(apply(n->1-n,binary(n))),2) \\ Charles R Greathouse IV, Apr 22 2015
    
  • Python
    def comp(s): z, o = ord('0'), ord('1'); return s.translate({z:o, o:z})
    def BCR(n): return int(comp(bin(n)[2:])[::-1], 2)
    print([BCR(n) for n in range(75)]) # Michael S. Branicky, Jun 14 2021
    
  • Python
    def A036044(n): return -int((s:=bin(n)[-1:1:-1]),2)-1+2**len(s) # Chai Wah Wu, Feb 04 2022

Formula

a(2n) = 2*A059894(n), a(2n+1) = a(2n) - 2^floor(log_2(n)+1). - Ralf Stephan, Aug 21 2003
Conjecture: a(n) = (-1)^A023416(n)*b(n) for n > 0 with a(0) = 1 where b(2^m) = (-1)^m*(2^(m+1) - 2) for m >= 0, b(2n+1) = b(n) for n > 0, b(2n) = b(n) + b(n - 2^f(n)) + b(2n - 2^f(n)) for n > 0 and where f(n) = A007814(n) (see A329369). - Mikhail Kurkov, Dec 13 2024

A284005 a(0) = 1, and for n > 1, a(n) = (1 + A000120(n))*a(floor(n/2)); also a(n) = A000005(A283477(n)).

Original entry on oeis.org

1, 2, 4, 6, 8, 12, 18, 24, 16, 24, 36, 48, 54, 72, 96, 120, 32, 48, 72, 96, 108, 144, 192, 240, 162, 216, 288, 360, 384, 480, 600, 720, 64, 96, 144, 192, 216, 288, 384, 480, 324, 432, 576, 720, 768, 960, 1200, 1440, 486, 648, 864, 1080, 1152, 1440, 1800, 2160, 1536, 1920, 2400, 2880, 3000
Offset: 0

Views

Author

Antti Karttunen, Mar 18 2017

Keywords

Crossrefs

Similar recurrences: A124758, A243499, A329369, A341392.

Programs

  • Mathematica
    Table[DivisorSigma[0, #] &@ Apply[Times, Map[#1^#2 & @@ # &, FactorInteger[#] /. {p_, e_} /; e == 1 :> {Times @@ Prime@ Range@ PrimePi@ p, e}]] &[Times @@ Prime@ Flatten@ Position[#, 1] &@ Reverse@ IntegerDigits[n, 2]], {n, 0, 71}] (* Michael De Vlieger, Mar 18 2017 *)
  • PARI
    A284005(n) = numdiv(A283477(n)); \\ edited by Michel Marcus, May 01 2019, M. F. Hasler, Nov 10 2019
    
  • PARI
    a(n) = my(k=if(n,logint(n,2)),s=1); prod(i=0,k, s+=bittest(n,k-i)); \\ Kevin Ryde, Jan 20 2021
  • Scheme
    (define (A284005 n) (A000005 (A283477 n)))
    

Formula

a(n) = A000005(A283477(n)).
Conjecture: a(n) = 2*a(f(n)) + Sum_{k=0..floor(log_2(n))-1} a(f(n) + 2^k*(1 - T(n,k))) for n > 1 with a(0) = 1, a(1) = 2, f(n) = A053645(n), T(n,k) = floor(n/2^k) mod 2. - Mikhail Kurkov, Nov 10 2019
From Mikhail Kurkov, Aug 23 2021: (Start)
a(2n+1) = a(n) + a(2n) for n >= 0.
a(2n) = a(n) + a(2n - 2^A007814(n)) for n > 0 with a(0) = 1. (End)
Conjecture: a(n) = Sum_{k=0..n} (binomial(n, k) mod 2)*A329369(k). In other words, this sequence is modulo 2 binomial transform of A329369. - Mikhail Kurkov, Mar 10 2023
Conjecture: a(2^m*(2n+1)) = Sum_{k=0..m+1} binomial(m+1, k)*a(2^k*n) for m >= 0, n >= 0 with a(0) = 1. - Mikhail Kurkov, Apr 24 2023

Extensions

Made Mikhail Kurkov's Nov 10 2019 formula the new primary name of this sequence - Antti Karttunen, Dec 30 2020

A243499 Product of parts of integer partitions as enumerated in the table A125106.

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 4, 1, 4, 3, 6, 2, 9, 4, 8, 1, 5, 4, 8, 3, 12, 6, 12, 2, 16, 9, 18, 4, 27, 8, 16, 1, 6, 5, 10, 4, 15, 8, 16, 3, 20, 12, 24, 6, 36, 12, 24, 2, 25, 16, 32, 9, 48, 18, 36, 4, 64, 27, 54, 8, 81, 16, 32, 1, 7, 6, 12, 5, 18, 10, 20, 4, 24, 15, 30, 8, 45, 16, 32, 3
Offset: 0

Views

Author

Antti Karttunen, Jun 28 2014

Keywords

Comments

This sequence and A341392 have the same set of values on intervals from 2^m to 2^(m+1) - 1 for m >= 0. - Mikhail Kurkov, Jun 18 2021 [verification needed]

Crossrefs

Cf. A125106, A161511 (gives the corresponding sums), A227184, A003963, A243504, A006068, A005940, A163511, A000110, A007814, A023416, A053645, A329369 (similar recurrence), A341392.

Programs

  • Scheme
    (define (A243499 n) (let loop ((n n) (i 1) (p 1)) (cond ((zero? n) p) ((even? n) (loop (/ n 2) (+ i 1) p)) (else (loop (/ (- n 1) 2) i (* p i))))))

Formula

Can also be obtained by mapping with an appropriate permutation from the products of parts of each partition computed for other enumerations similar to A125106:
a(n) = A227184(A006068(n)).
a(n) = A003963(A005940(n+1)).
a(n) = A243504(A163511(n)).
From Mikhail Kurkov, Jul 11 2021: (Start)
a(n) = (1 + A023416(n))*a(A053645(n)) for n > 0 with a(0) = 1.
a(2n+1) = a(n) for n >= 0.
a(2n) = A341392(2*A059894(n)) = a(n - 2^f(n)) + a(2n - 2^f(n)) = (2 + f(n))*a(n - 2^f(n)) for n > 0 with a(0)=1 where f(n) = A007814(n).
Sum_{k=0..2^n - 1} a(k) = A000110(n+1) for n >= 0.
a((4^n - 1)/3) = n! for n >= 0.
a(2^m*(2^n - 1)) = (m+1)^n for n >= 0, m >= 0. (End) [verification needed]

A341392 a(n) = A284005(n) / (1 + A000120(n))!.

Original entry on oeis.org

1, 1, 2, 1, 4, 2, 3, 1, 8, 4, 6, 2, 9, 3, 4, 1, 16, 8, 12, 4, 18, 6, 8, 2, 27, 9, 12, 3, 16, 4, 5, 1, 32, 16, 24, 8, 36, 12, 16, 4, 54, 18, 24, 6, 32, 8, 10, 2, 81, 27, 36, 9, 48, 12, 15, 3, 64, 16, 20, 4, 25, 5, 6, 1, 64, 32, 48, 16, 72, 24, 32, 8, 108, 36, 48, 12, 64, 16, 20, 4, 162, 54, 72, 18, 96, 24, 30, 6, 128
Offset: 0

Views

Author

Mikhail Kurkov, Feb 10 2021 [verification needed]

Keywords

Comments

From Antti Karttunen, Feb 10 2021: (Start)
This sequence can be represented as a binary tree. Each child to the left is obtained by multiplying its parent with (1+{binary weight of its breadth-first-wise index in the tree}), while each child to the right is just a clone of its parent:
1
|
...................1...................
2 1
4......../ \........2 3......../ \........1
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
8 4 6 2 9 3 4 1
16 8 12 4 18 6 8 2 27 9 12 3 16 4 5 1
etc.
(End)
This sequence and A243499 have the same set of values on intervals from 2^m to 2^(m+1) - 1 for m >= 0. - Mikhail Kurkov, Jun 18 2021 [verification needed]
FindStat provides a sequence of mappings between this sequence and A000110 starting from collection [Set partitions] (see Links section for illustration). - Mikhail Kurkov, May 20 2023 [verification needed]

Crossrefs

Cf. A000120, A000142, A007814, A036987, A053645, A243499, A284005, A329369 (similar recurrence).

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 1,
          a(iquo(n, 2, 'd'))*`if`(d=1, 1, add(i, i=Bits[Split](n+1))))
        end:
    seq(a(n), n=0..120);  # Alois P. Heinz, Jun 23 2021
  • Mathematica
    Array[DivisorSigma[0, Apply[Times, Map[#1^#2 & @@ # &, FactorInteger[#1] /. {p_, e_} /; e == 1 :> {Times @@ Prime@ Range@ PrimePi@ p, e}]]]/#2 & @@ {Times @@ Prime@ Flatten@ Position[#, 1] &@ Reverse@ #, (1 + Count[#, 1])!} &@ IntegerDigits[#, 2] &, 89, 0] (* Michael De Vlieger, Feb 24 2021 *)
  • PARI
    A284005(n) = { my(k=if(n, logint(n, 2)), s=1); prod(i=0, k, s+=bittest(n, k-i)); }; \\ From A284005
    A341392(n) = (A284005(n)/((1 + hammingweight(n))!)); \\ Antti Karttunen, Feb 10 2021
    
  • PARI
    A341392(n) = if(!n,1,if(n%2, A341392((n-1)/2), (1+hammingweight(n))*A341392(n/2))); \\ Antti Karttunen, Feb 10 2021

Formula

a(n) = A284005(n) / (1 + A000120(n))! = A284005(n) / A000142(1 + A000120(n)).
a(2n+1) = a(n) for n >= 0.
a(2n) = (1 + A000120(n))*a(n) = A243499(2*A059894(n)) = a(n) + a(2n - 2^A007814(n)) for n > 0 with a(0) = 1.
[2*a(n) - 1 = A329369(n)] = A036987(A053645(n)).
From Mikhail Kurkov, Apr 24 2023: (Start)
a(2^m*(2n+1)) = Sum_{k=0..m} binomial(m, k)*a(2^k*n) for m >= 0, n >= 0 with a(0) = 1.
a(n) = a(f(n)) + Sum_{k=0..floor(log_2(n))-1} (1 - T(n, k))*a(f(n) + 2^k*(1 - T(n, k))) for n > 1 with a(0) = 1, a(1) = 1, where f(n) = A053645(n) and where T(n, k) = floor(n/2^k) mod 2. (End) [verification needed]

A111528 Square table, read by antidiagonals, where the g.f. for row n+1 is generated by: x*R_{n+1}(x) = (1+n*x - 1/R_n(x))/(n+1) with R_0(x) = Sum_{n>=0} n!*x^n.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 3, 6, 1, 1, 4, 13, 24, 1, 1, 5, 22, 71, 120, 1, 1, 6, 33, 148, 461, 720, 1, 1, 7, 46, 261, 1156, 3447, 5040, 1, 1, 8, 61, 416, 2361, 10192, 29093, 40320, 1, 1, 9, 78, 619, 4256, 23805, 99688, 273343, 362880, 1, 1, 10, 97, 876, 7045, 48096, 263313
Offset: 0

Views

Author

Paul D. Hanna, Aug 06 2005

Keywords

Examples

			Table begins:
  1, 1,  2,   6,   24,   120,    720,    5040,     40320, ...
  1, 1,  3,  13,   71,   461,   3447,   29093,    273343, ...
  1, 1,  4,  22,  148,  1156,  10192,   99688,   1069168, ...
  1, 1,  5,  33,  261,  2361,  23805,  263313,   3161781, ...
  1, 1,  6,  46,  416,  4256,  48096,  591536,   7840576, ...
  1, 1,  7,  61,  619,  7045,  87955, 1187845,  17192275, ...
  1, 1,  8,  78,  876, 10956, 149472, 2195208,  34398288, ...
  1, 1,  9,  97, 1193, 16241, 240057, 3804353,  64092553, ...
  1, 1, 10, 118, 1576, 23176, 368560, 6262768, 112784896, ...
Rows are generated by logarithms of factorial series:
log(1 + x + 2*x^2 + 6*x^3 + 24*x^4 + ... n!*x^n + ...) = x + (3/2)*x^2 + (13/3)*x^3 + (71/4)*x^4 + (461/5)*x^5 + ...
(1/2)*log(1 + 2*x + 6*x^2 + ... + ((n+1)!/1!)*x^n + ...) = x + (4/2)*x^2 + (22/3)*x^3 + (148/4)*x^4 + (1156/5)*x^5 + ...
(1/3)*log(1 + 3*x + 12*x^2 + 60*x^3 + ... + ((n+2)!/2!)*x^n + ...) = x + (5/2)*x^2 + (33/3)*x^3 + (261/4)*x^4 + (2361/5)*x^5 +...
G.f. of row n may be expressed by the continued fraction:
R_n(x) = 1/(1+n*x - (n+1)*x/(1+(n+1)*x - (n+2)*x/(1+(n+2)*x -...
or recursively by: R_n(x) = 1/(1+n*x - (n+1)*x*R_{n+1}(x)).
		

Crossrefs

Cf: A003319 (row 1), A111529 (row 2), A111530 (row 3), A111531 (row 4), A111532 (row 5), A111533 (row 6), A111534 (diagonal).
Similar recurrences: A124758, A243499, A284005, A329369, A341392.

Programs

  • Maple
    T := (n, k) -> coeff(series(hypergeom([n+1, 1], [], x)/hypergeom([n, 1], [], x), x, 21), x, k):
    #display as a sequence
    seq(seq(T(n-k, k), k = 0..n), n = 0..10);
    # display as a square array
    seq(print(seq(T(n, k), k = 0..10)), n = 0..10); # Peter Bala, Jul 16 2022
  • Mathematica
    T[n_, k_] := T[n, k] = Which[n < 0 || k < 0, 0, k == 0 || k == 1, 1, n == 0, k!, True, (T[n - 1, k + 1] - T[n - 1, k])/n - Sum[T[n, j]*T[n - 1, k - j], {j, 1, k - 1}]]; Table[T[n - k, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Feb 18 2018 *)
  • PARI
    {T(n,k)=if(n<0||k<0,0,if(k==0||k==1,1,if(n==0,k!, (T(n-1,k+1)-T(n-1,k))/n-sum(j=1,k-1,T(n,j)*T(n-1,k-j)))))}
    for(n=0,10,for(k=0,10,print1(T(n,k),", ")); print(""))
    
  • PARI
    {T(n,k)=if(n<0||k<0,0,if(k==0,1,if(n==0,k!, k/n*polcoeff(log(sum(m=0,k,(n-1+m)!/(n-1)!*x^m)),k))))}
    for(n=0,10,for(k=0,10,print1(T(n,k),", ")); print(""))

Formula

T(n, 0) = 1, T(0, k) = k!, otherwise for n>=1 and k>=1:
T(n, k) = (T(n-1, k+1) - T(n-1, k))/n - Sum_{j=1..k-1} T(n, j)*T(n-1, k-j).
T(n, k) = (k/n)*[x^k] log(Sum_{m=0..k} (n-1+m)!/(n-1)!*x^m).
T(n, k) = Sum_{j = 0..k} A089949(k, j)*n^(k-j). - Philippe Deléham, Aug 08 2005
R_n(x) = -((n-1)!/n)/Sum_{i>=1} (i+n-2)!*x^i, n > 0. - Vladeta Jovovic, May 06 2006
G.f. of row R may be expressed by the continued fraction: W(0), where W(k) = 1 - x*(k+1)/( x*(k+1) - 1/(1 - x*(k+1+R)/( x*(k+1+R) - 1/W(k+1) ))). - Sergei N. Gladkovskii, Aug 26 2013
Conjecture: T(n, k) = b(2^(k-1) - 1, n) for k > 0 with T(n, 0) = 1 where b(n, m) = b(floor(n/2), m) + b(floor((2n - 2^A007814(n))/2), m) + m*b(A025480(n-1), m) for n > 0 with b(0, m) = 1. - Mikhail Kurkov, Dec 16 2021
From Peter Bala, Jul 11 2022: (Start)
O.g.f. for row n, n >= 1: R(n,x) = ( Sum_{k >= 0} (n+k)!/n!*x^k )/( Sum_{k >= 0} (n-1+k)!/(n-1)!*x^k ).
R(n,x)/(1 - n*x*R(n,x)) = Sum_{k >= 0} (n+k)!/n!*x^k.
For n >= 0, R(n,x) satisfies the Riccati equation x^2*d/dx(R(n,x)) + n*x*R(n,x)^2 - (1 + (n-1)*x)*R(n,x) + 1 = 0 with R(n,0) = 1.
Apply Stokes 1982 to find that for n >= 0, R(n,x) = 1/(1 - x/(1 - (n+1)*x/(1 - 2*x/(1 - (n+2)*x/(1 - 3*x/(1 - (n+3)*x/(1 - 4*x/(1 - (n+4)*x/(1 - ...))))))))), a continued fraction of Stieltjes type. (End)

A011965 Second differences of Bell numbers.

Original entry on oeis.org

1, 2, 7, 27, 114, 523, 2589, 13744, 77821, 467767, 2972432, 19895813, 139824045, 1028804338, 7905124379, 63287544055, 526827208698, 4551453462543, 40740750631417, 377254241891064, 3608700264369193, 35613444194346451, 362161573323083920, 3790824599495473121
Offset: 0

Views

Author

Keywords

Comments

Number of partitions of n+3 with at least one singleton and with the smallest element in a singleton equal to 3. Alternatively, number of partitions of n+3 with at least one singleton and with the largest element in a singleton equal to n+1. - Olivier GERARD, Oct 29 2007
Out of the A005493(n) set partitions with a specific two elements clustered separately, number that have a different set of two elements clustered separately. - Andrey Goder (andy.goder(AT)gmail.com), Dec 17 2007

References

  • Olivier Gérard and Karol A. Penson, A budget of set partition statistics, in preparation, unpublished as of Sep 22 2011.

Crossrefs

Programs

  • Magma
    [Bell(n+2) -2*Bell(n+1) + Bell(n): n in [0..40]]; // G. C. Greubel, Jan 07 2025
    
  • Maple
    a:= n-> add((-1)^k*binomial(2,k)*combinat['bell'](n+k), k=0..2): seq(a(n), n=0..20);  # Alois P. Heinz, Sep 05 2008
  • Mathematica
    Differences[BellB[Range[0, 30]], 2] (* Vladimir Joseph Stephan Orlovsky, May 25 2011 *)
  • Python
    # requires python 3.2 or higher. Otherwise use def'n of accumulate in python docs.
    from itertools import accumulate
    A011965_list, blist, b = [1], [1, 2], 2
    for _ in range(1000):
        blist = list(accumulate([b]+blist))
        b = blist[-1]
        A011965_list.append(blist[-3])
    # Chai Wah Wu, Sep 02 2014
    
  • Python
    # or Sagemath
    b=bell_number
    print([b(n+2) -2*b(n+1) +b(n) for n in range(41)]) # G. C. Greubel, Jan 07 2025

Formula

a(n) = A005493(n) - A005493(n-1).
E.g.f.: exp(exp(x)-1)*(exp(2*x)-exp(x)+1). - Vladeta Jovovic, Feb 11 2003
a(n) = A000110(n) - 2*A000110(n-1) + A000110(n-2). - Andrey Goder (andy.goder(AT)gmail.com), Dec 17 2007
G.f.: G(0) where G(k) = 1 - 2*x*(k+1)/((2*k+1)*(2*x*k+2*x-1) - x*(2*k+1)*(2*k+3)*(2*x*k+2*x-1)/(x*(2*k+3) - 2*(k+1)*(2*x*k+3*x-1)/G(k+1) )); (recursively defined continued fraction). - Sergei N. Gladkovskii, Dec 19 2012
G.f.: 1 - G(0) where G(k) = 1 - 1/(1-k*x-2*x)/(1-x/(x-1/G(k+1) )); (recursively defined continued fraction). - Sergei N. Gladkovskii, Jan 17 2013
G.f.: 1 - 1/x + (1-x)^2/x/(G(0)-x) where G(k) = 1 - x*(k+1)/(1 - x/G(k+1) ); (recursively defined continued fraction). - Sergei N. Gladkovskii, Jan 26 2013
G.f.: G(0)*(1-1/x) where G(k) = 1 - 1/(1-x*(k+1))/(1-x/(x-1/G(k+1) )); (recursively defined continued fraction). - Sergei N. Gladkovskii, Feb 07 2013
a(n) ~ n^2 * Bell(n) / LambertW(n)^2 * (1 - 2*LambertW(n)/n). - Vaclav Kotesovec, Jul 28 2021
Conjecture: a(n) = Sum_{k=0..2^n - 1} b(k) for n >= 0 where b(2n+1) = b(n) + b(A025480(n-1)), b(2n) = b(n - 2^f(n)) + b(2n - 2^f(n)) + b(A025480(n-1)) for n > 0 with b(0) = b(1) = 1 and where f(n) = A007814(n). Also b((4^n - 1)/3) = A141154(n+1). - Mikhail Kurkov, Jan 27 2022

A136126 Triangle read by rows: T(n,k) is the number of permutations of {1,2,...,k+n} having excedance set {1,2,...,k} (the empty set for k=0), 0 <= k <= n-1.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 7, 7, 1, 1, 15, 31, 15, 1, 1, 31, 115, 115, 31, 1, 1, 63, 391, 675, 391, 63, 1, 1, 127, 1267, 3451, 3451, 1267, 127, 1, 1, 255, 3991, 16275, 25231, 16275, 3991, 255, 1, 1, 511, 12355, 72955, 164731, 164731, 72955, 12355, 511, 1
Offset: 1

Views

Author

Emeric Deutsch, Jan 17 2008

Keywords

Comments

The excedance set of a permutation p in S_n is the set of indices i such that p(i) > i.
Columns 1,2,3,4 yield A000225, A091344, A091347, A091348, respectively. Row sums yield A136127.
T(a+b-1,b-1)*(-1)^(a+b-1) = Sum_{k=0..} F(a,b,k)*(-1)^k where F(a,b,k) is the number of connected subgraphs of K(a,b) (the complete bipartite graph) with k edges. F(n,n,k) is A255192(n,k). - Thomas Dybdahl Ahle, Feb 18 2015 [The sum starts with k=0, and F(n,n,k) is A255192(n,k), but there seems to be no A255192(n,0). Is there no upper k-summation limit? - Wolfdieter Lang, Mar 15 2015]
Comment from Don Knuth, Aug 25 2020, added by N. J. A. Sloane, Sep 07 2020: (Start)
This array also arises from a problem about {0,1}-matrices. Symmetric array read by antidiagonals: A(n,k) (n >= 1, k >= 0) = number of n X k matrices of 0's and 1's satisfying two conditions: (i) no column is entirely 0; (ii) no 0 has simultaneously a 1 above it and another 1 to its left.
Equivalently (see the Steingrímsson-Williams reference) A(n,k) is the number of permutations p_1...p_{n+k} on {1,...,n+k} for which p_1 >= 1, ..., p_n >= n, p_{n+1} < n+1,..., p_{n+k} < n+k. Then A(n,k) = A(k+1,n-1), for n >= 1 and k >= 0.
For example, the seven 2 X 2 matrices satisfying (i) and (ii) are
00 01 10 10 11 11 11
11 11 01 11 00 01 11
and the seven permutations of {1, 2, 3, 4} satisfying the other definition are
1423, 2413, 3412, 3421, 4213, 4312, 4321.
(End)

Examples

			T(4,2) = 7 because 3412, 4312, 2413, 2314, 2431, 3421 and 4321 are the only permutations of {1,2,3,4} with excedance set {1,2}.
Triangle starts:
  1;
  1,   1;
  1,   3,    1;
  1,   7,    7,     1;
  1,  15,   31,    15,     1;
  1,  31,  115,   115,    31,     1;
  1,  63,  391,   675,   391,    63,    1;
  1, 127, 1267,  3451,  3451,  1267,  127,   1;
  1, 255, 3991, 16275, 25231, 16275, 3991, 255, 1;
  ...
Formatted as a square array A(n,k) with 0 <= k <= n:
  1,   1,    1,     1,      1,        1,         1,          1, ... [A000012]
  1,   3,    7,    15,     31,       63,       127,        255, ... [A000225]
  1,   7,   31,   115,    391,     1267,      3991,      12355, ... [A091344]
  1,  15,  115,   675,   3451,    16275,     72955,     316275, ... [A091347]
  1,  31,  391,  3451,  25231,   164731,    999391,    5767051, ... [A091348]
  1,  63, 1267, 16275, 164731,  1441923,  11467387,   85314915, ...
  1, 127, 3991, 72955, 999391, 11467387, 116914351, 1096832395, ...
		

Crossrefs

Programs

  • Maple
    with(combinat): T:=proc(n,k) if k < n then add((-1)^(k+1-i)*factorial(i)*i^(n-1-k)* stirling2(k+1,i),i=1..k+1) else 0 end if end proc: for n to 10 do seq(T(n,k),k=0..n-1) end do; # yields sequence in triangular form
    # Alternatively as a square array:
    A := (n, k) -> add((-1)^(k-j)*j!*Stirling2(k+1,j+1)*(j+1)^(n+1), j=0..k);
    seq(print(seq(A(n, k), k=0..7)), n=0..6); # Peter Luschny, Mar 14 2018
    # Using the exponential generating function as given by Arakawa & Kaneko:
    gf := polylog(-t, 1-exp(-x))/(exp(x)-1):
    ser := series(gf, x, 12): c := n -> n!*coeff(ser, x, n):
    seq(lprint(seq(subs(t=k, c(n)), n=0..8)), k=0..8); # Peter Luschny, Apr 29 2021
    # Using recurrence relations:
    A := proc(n, k) option remember; local j; if n = 0 then return k^n fi;
    add(binomial(k+1, j+1)*A(n-1, k-j), j = 0..k) end:
    for n from 0 to 7 do lprint(seq(A(n, k), k=0..8)) od;  # Peter Luschny, Apr 19 2024
  • Mathematica
    T[n_, k_] := Sum[(-1)^(k + 1 - i)*i!*i^(n - 1 - k)*StirlingS2[k + 1, i], {i, 1, k + 1}];
    Table[T[n, k], {n, 1, 10}, {k, 0, n - 1}] // Flatten (* Jean-François Alcover, Nov 16 2017 *)
  • PARI
    {T(n,k)=polcoeff(polcoeff( x*y*sum(m=0, n, m!*x^m*prod(k=1, m, (1+y+k*x*y)/(1+(1+y)*k*x+k^2*x^2*y +x*O(x^n))) ), n,x),k,y)} \\ Paul D. Hanna, Feb 01 2013
    for(n=1, 10,for(k=1,n, print1(T(n,k), ", "));print(""))
    
  • PARI
    tabl(nn) = {default(seriesprecision, nn+1); pol = log(1/(1-(exp(x)-1)*(exp(y)-1))) + O(x^nn); for (n=1, nn-1, poly = n!*polcoeff(pol, n, x); for (k=1, n, print1(k!*polcoeff(poly, k, y), ", ");); print(););} \\ Michel Marcus, Apr 17 2015

Formula

T(n,k) = Sum_{i=1..k+1} (-1)^(k+1-i)*i!*i^(n-1-k)*Stirling2(k+1,i) (0 <= k <= n-1).
G.f.: A(x,y) = x*y*Sum_{n>=1} n! * x^n*Product_{k=1..n} (1 + y + k*x*y) / (1 + (1+y)*k*x + k^2*x^2*y). - Paul D. Hanna, Feb 01 2013
Central terms of triangle equals A092552. - Paul D. Hanna, Feb 01 2013
T(n,k-1) = Sum_{i=0..k, m=0..i} binomial(i,m)*(-1)^(k-m)*i^(n-k)*m^k (1 <= k <= n). - Thomas Dybdahl Ahle, Feb 18 2015
E.g.f.: log(1/(1-(exp(x)-1)*(exp(y)-1))). - Vladimir Kruchinin, Apr 17 2015
Let W(n,k) = k!*Stirling2(n+1, k+1) denote the Worpitzky numbers, then A(n,k) = Sum_{j=0..k} (-1)^(k-j)*W(k,j)*(j+1)^(n+1) enumerates the square array. - Peter Luschny, Mar 14 2018
Assume the missing first row (1,0,0,...) of the array which Ayyer and Bényi call the 'poly-Bernoulli numbers of type C'. Then T(n, k) = p_{n}(k) where p_{n}(x) = Sum_{k=0..n} (-1)^(n-k)*(k+1)^x*Sum_{j=0..n} E1(n,j)*binomial(n-j, n-k), and E1(n, k) are the Eulerian numbers of first order. This reflects the Worpitzky approach to the Bernoulli numbers. This formula can alternatively be written as: T(n, k) = Sum_{j=0..k} (-1)^(k-j)*(j+1)^n*A028246(k+1, j+1). - Peter Luschny, Apr 29 2021

Extensions

Definition corrected. Changed "T(n,k) is the number of permutations of {1,2,...,n}..." to "T(n,k) is the number of permutations of {1,2,...,k+n}..." - Karel Casteels (kcasteel(AT)sfu.ca), Feb 17 2010

A217924 a(n) = n! * [x^n] exp(2*exp(x) - x - 2). Row sums of triangle A217537.

Original entry on oeis.org

1, 1, 3, 9, 35, 153, 755, 4105, 24323, 155513, 1064851, 7760745, 59895203, 487397849, 4166564147, 37298443977, 348667014723, 3395240969785, 34365336725715, 360837080222761, 3923531021460707, 44108832866004121, 511948390801374835, 6126363766802713481
Offset: 0

Views

Author

Peter Luschny, Oct 15 2012

Keywords

Comments

The inverse binomial transform of a(n) is A194689.
A087981(n) = Sum_{k=0..n} (-1)^k*s(n+1,k+1)*a(k);
|A000023(n)| = |Sum_{k=0..n} (-1)^(n-k)*s(n,k)*a(k)|
where s(n,k) are the unsigned Stirling numbers of first kind.
a(n) is the number of inequivalent set partitions of {1,2,...,n} where two blocks are considered equivalent when one can be obtained from the other by an alternating (even) permutation. - Geoffrey Critzer, Mar 17 2013

Examples

			a(3)=9 because we have: {1,2,3}; {1,3,2}; {1}{2,3}; {1}{3,2}; {2}{1,3}; {2}{3,1}; {3}{1,2}; {3}{2,1}; {1}{2}{3}. - _Geoffrey Critzer_, Mar 17 2013
		

Crossrefs

Similar recurrences: A124758, A243499, A284005, A329369, A341392, A372205.

Programs

  • Magma
    R:=PowerSeriesRing(Rationals(), 30);
    Coefficients(R!(Laplace( Exp(2*Exp(x) -x-2) ))); // G. C. Greubel, Jan 09 2025
  • Maple
    egf := exp(2*exp(x) - x - 2): ser := series(egf, x, 25):
    seq(n!*coeff(ser, x, n), n = 0..23);  # Peter Luschny, Apr 22 2024
  • Mathematica
    nn=23;Range[0,nn]!CoefficientList[Series[Exp[2 Exp[x]-x-2],{x,0,nn}],x]  (* Geoffrey Critzer, Mar 17 2013 *)
    nmax = 25; CoefficientList[Series[1/(1 - x + ContinuedFractionK[-2*k*x^2 , 1 - (k + 1)*x, {k, 1, nmax}]), {x, 0, nmax}], x] (* Vaclav Kotesovec, Sep 25 2017 *)
  • Maxima
    a(n):=sum(sum(binomial(n,k-j)*2^j*(-1)^(k-j)*stirling2(n-k+j,j),j,0,k),k,0,n); /* Vladimir Kruchinin, Feb 28 2015 */
    
  • Sage
    def A217924_list(n):
        T = A217537_triangle(n)
        return [add(T.row(n)) for n in range(n)]
    A217924_list(24)
    
  • SageMath
    def A217924_list(prec):
        P. = PowerSeriesRing(QQ, prec)
        return P( exp(2*exp(x)-x-2) ).egf_to_ogf().list()
    print(A217924_list(40)) # G. C. Greubel, Jan 09 2025
    

Formula

G.f.: 1/Q(0) where Q(k) = 1 + x*k - x/(1 - 2*x*(k+1)/Q(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Mar 06 2013
E.g.f.: exp(2*exp(x) - x - 2). - Geoffrey Critzer, Mar 17 2013
G.f.: 1/Q(0), where Q(k) = 1 - (k+1)*x - 2*(k+1)*x^2/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, May 03 2013
G.f.: T(0)/(1-x), where T(k) = 1 - 2*x^2*(k+1)/( 2*x^2*(k+1) - (1-x-x*k)*(1-2*x-x*k)/T(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Oct 19 2013
a(n) = Sum_{k=0..n} Sum_{j=0..k} binomial(n,k-j)*2^j*(-1)^(k-j)*Stirling2(n-k+j,j). - Vladimir Kruchinin, Feb 28 2015
a(n) = exp(-2) * Sum_{k>=0} 2^k * (k - 1)^n / k!. - Ilya Gutkovskiy, Jun 27 2020
Conjecture: a(n) = Sum_{k=0..2^n-1} A372205(k). - Mikhail Kurkov, Nov 21 2021 [Rewritten by Peter Luschny, Apr 22 2024]
a(n) ~ 2 * n^(n-1) * exp(n/LambertW(n/2) - n - 2) / (sqrt(1 + LambertW(n/2)) * LambertW(n/2)^(n-1)). - Vaclav Kotesovec, Jun 26 2022

Extensions

Name extended by a formula of Geoffrey Critzer by Peter Luschny, Apr 22 2024

A347205 a(2n+1) = a(n) for n >= 0, a(2n) = a(n) + a(n - 2^A007814(n)) for n > 0 with a(0) = 1.

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 3, 1, 4, 3, 5, 2, 6, 3, 4, 1, 5, 4, 7, 3, 9, 5, 7, 2, 10, 6, 9, 3, 10, 4, 5, 1, 6, 5, 9, 4, 12, 7, 10, 3, 14, 9, 14, 5, 16, 7, 9, 2, 15, 10, 16, 6, 19, 9, 12, 3, 20, 10, 14, 4, 15, 5, 6, 1, 7, 6, 11, 5, 15, 9, 13, 4, 18, 12, 19, 7, 22, 10, 13
Offset: 0

Views

Author

Mikhail Kurkov, Aug 23 2021

Keywords

Comments

Scatter plot might be called "Cypress forest on a windy day". - Antti Karttunen, Nov 30 2021

Crossrefs

Programs

  • Mathematica
    a[0] = 1; a[n_] := a[n] = If[OddQ[n], a[(n - 1)/2], a[n/2] + a[n/2 - 2^IntegerExponent[n/2, 2]]]; Array[a, 100, 0] (* Amiram Eldar, Sep 06 2021 *)
  • PARI
    a(n) = if (n==0, 1, if (n%2, a(n\2), a(n/2) + a(n/2 - 2^valuation(n/2, 2)))); \\ Michel Marcus, Sep 09 2021

Formula

a(2n+1) = a(n) for n >= 0.
a(2n) = a(n) + a(n - 2^A007814(n)) = a(2*A059894(n)) for n > 0 with a(0) = 1.
Sum_{k=0..2^n - 1} a(k) = A000108(n+1) for n >= 0.
a((4^n - 1)/3) = A000108(n) for n >= 0.
a(2^m*(2^n - 1)) = binomial(n + m, n) for n >= 0, m >= 0.
Generalization:
b(2n+1, p, q) = b(n, p, q) for n >= 0.
b(2n, p, q) = p*b(n, p, q) + q*b(n - 2^A007814(n), p, q) = for n > 0 with b(0, p, q) = 1.
Conjectured formulas: (Start)
Sum_{k=0..2^n - 1} b(k, 2, 1) = A006318(n) for n >= 0.
Sum_{k=0..2^n - 1} b(k, 2, 2) = A115197(n) for n >= 0.
Sum_{k=0..2^n - 1} b(k, 3, 1) = A108524(n+1) for n >= 0.
Sum_{k=0..2^n - 1} b(k, 3, 3) = A116867(n) for n >= 0.
b((4^n - 1)/3, p, q) is generalized Catalan number C(p, q; n). (End)
Conjecture: a(n) = T(n, wt(n)+1), a(2n) = Sum_{k=1..wt(n)+1} T(n, k) where T(2n+1, k) = T(n, k) for 1 <= k <= wt(n)+1, T(2n+1, wt(n)+2) = T(n, wt(n)+1), T(2n, k) = Sum_{i=1..k} T(n, i) for 1 <= k <= wt(n)+1 with T(0, 1) = 1. - Mikhail Kurkov, Dec 13 2024
Showing 1-10 of 26 results. Next