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

A293984 a(n) = A293857(n)/A010551(n).

Original entry on oeis.org

1, 1, 1, 2, 3, 3, 4, 10, 16, 23, 35, 85, 142, 229, 369, 895, 1522, 2614, 4348, 10467, 18038, 32160, 54488, 130148, 226594, 414130, 710880, 1685496, 2958666, 5503780, 9544629, 22476690, 39724867, 74884360, 130949625, 306457174, 544777361, 1037587152, 1827129712
Offset: 0

Views

Author

Vladimir Shevelev, Oct 21 2017

Keywords

Comments

Or row sums of the compressed triangle in A293783.
Conjecture: all terms are positive integers.
From David A. Corneth (with participation of Vladimir Shevelev), Oct 24 2017: (Start)
Conjecture is true. Proof.
1) Let C={c_1..c_n} be a permutation of {1..n}, d(C) be alternating sum c_1 - c_2 + ... +(-1)^(n-1)*c_n. Then max_{C in S_n}d(C) = A008794(n+1). Indeed, if n = 2*m, then evidently the maximum is reached on a C={2*m,1,2*m-1,2,...,m+1,m}; if n=2*m - 1, then the maximum is reached on a C={2*m-1,1,2*m-2,2,...,m-1,m}. In both cases max_{C in S_n}d(C) = m^2 = A008794(n+1). The number of distinct reaches of the maximum is, evidently, floor(n/2)!*floor((n+1)/2)! which is also Avi Peretz's representation (2001) of A010551(n). So, A293857(n) >= A010551(n) and a(n)>=1.
2) Consider two cases: a) there are no C in S_n for which d(C) = k^2 < A008794(n+1). Then A293857(n) = A010551(n) and a(n) = 1; b) there is C for which d(C) = k^2 < A008794(n+1). Then, as in 1) to reach k^2 in case n=2*m consider all (n/2)! permutations of {c_1,c_3,...,c_n} and all (n/2)! permutations of {c_2, c_4, ... , c_(n+1)}, or in case n = 2*m-1, all ((n+1)/2)! permutations of {c_1,c_3,...,c_(2*m-1)} and ((n-1)/2)! permutations of {c_2,c_4,...,c_(2*m-2)}. So we again have A010551(n) distinct reaches. If the same k^2 could be reached by another permutation C_1 (other than above permutations of C), then we again obtain A010551 distinct reaches, etc. So, A293857(n) is always divisible by A010551(n). (End)

Crossrefs

Programs

  • Maple
    b:= proc(p, m, s) option remember; (n-> `if`(n=0, `if`(issqr(s), 1, 0),
          `if`(p>0, b(p-1, m, s+n), 0)+`if`(m>0, b(p, m-1, s-n), 0)))(p+m)
        end:
    a:= n-> (t-> b(n-t, t, 0))(iquo(n, 2)):
    seq(a(n), n=0..40);  # Alois P. Heinz, Sep 17 2020
  • Mathematica
    a293984=Table[
    possibleSums=Range[1/2-(-1)^n/2-Floor[n/2]^2,Floor[(n+1)/2]^2];
    filteredSums=Select[possibleSums,IntegerQ[Sqrt[#]]&];
    positions=Map[Flatten[{#,Position[possibleSums,#,1]-1}]&,filteredSums];
    Total[Map[SeriesCoefficient[QBinomial[n,Floor[(n+1)/2],q],{q,0,#[[2]]/2}]&,positions]],{n,20}] (* Peter J. C. Moses, Nov 05 2017 *)

Extensions

a(13)-a(30) from David A. Corneth, Oct 21 2017; a(31)-a(38) from Peter J. C. Moses, Nov 02 2017
a(0)=1 prepended by Alois P. Heinz, Sep 17 2020

A294811 Let b(n) be the number of permutations {c_1..c_n} of {1..n} for which c_1 - c_2 + ... + (-1)^(n-1)*c_n are triangular numbers (A000217). Then a(n) = b(n)/A010551(n).

Original entry on oeis.org

1, 1, 1, 1, 2, 4, 6, 11, 16, 30, 48, 97, 157, 322, 524, 1077, 1777, 3684, 6157, 12876, 21684, 45520, 77212, 162533, 277608, 585993, 1006784, 2129433, 3677453, 7788711, 13514487, 28654668, 49933938, 105964856, 185377690, 393631445, 691101516, 1468137470
Offset: 0

Views

Author

Keywords

Comments

All terms are positive integers (for a proof, cf. comment in A293984). Note that a(1), a(2), a(3), a(4) remain the same if in the definition the triangular numbers are replaced by k-gonal numbers for k >= 5.

Examples

			Let n=3. For a permutation C={c_1,c_2,c_3}, set s = s(C) = c_1 - c_2 + c_3. We have the permutations:
1,2,3; s=2
1,3,2; s=0
2,1,3; s=4
2,3,1; s=0
3,1,2; s=4
3,2,1; s=2
Here there are 2 permutations for which {s} are triangular numbers (when s = 0). Further, since A010551(3) = 2, then a(3) = 1.
Let n=4. For a permutation C={c_1,c_2,c_3,c_4}, set s = s(C) = c_1 - c_2 + c_3 - c_4. We have the permutations:
1,2,3,4; s=-2
1,3,2,4; s=-4
2,1,3,4; s=0
2,3,1,4; s=-4
3,1,2,4; s=0
3,2,1,4; s=-2
1,2,4,3; s=0
1,3,4,2; s=0
2,1,4,3; s=2
2,3,4,1; s=2
3,1,4,2; s=4
3,2,4,1; s=4
1,4,2,3; s=-4
1,4,3,2; s=-2
2,4,1,3; s=-4
2,4,3,1; s=0
3,4,1,2; s=-2
3,4,2,1; s=0
4,1,2,3; s=2
4,1,3,2; s=4
4,2,1,3; s=0
4,2,3,1; s=4
4,3,1,2; s=0
4,3,2,1; s=2
Here there are 8 permutations for which {s} are triangular numbers (when s = 0). Further, since A010551(4) = 4, then a(4) = 8/4 = 2.
		

Crossrefs

Programs

  • Maple
    b:= proc(p, m, s) option remember; (n-> `if`(n=0, `if`(issqr(8*s+1), 1, 0),
          `if`(p>0, b(p-1, m, s+n), 0)+`if`(m>0, b(p, m-1, s-n), 0)))(p+m)
        end:
    a:= n-> (t-> b(n-t, t, 0))(iquo(n, 2)):
    seq(a(n), n=0..40);  # Alois P. Heinz, Sep 17 2020
  • Mathematica
    polyQ[order_,n_]:=If[n==0,True,IntegerQ[(#-4+Sqrt[(#-4)^2+8 n (#-2)])/(2 (#-2))]&[order]];(*is a number polygonal?*)
    Map[Total,Table[
    possibleSums=Range[1/2-(-1)^n/2-Floor[n/2]^2,Floor[(n+1)/2]^2];
    filteredSums=Select[possibleSums,polyQ[3,#]&&#>-1&];
    positions=Map[Flatten[{#,Position[possibleSums,#,1]-1}]&,filteredSums];
    Map[SeriesCoefficient[QBinomial[n,Floor[(n+1)/2],q],{q,0,#[[2]]/2}]&,positions],{n,25}]] (* Peter J. C. Moses, Jan 02 2018 *)

Extensions

a(0)=1 prepended by Alois P. Heinz, Sep 17 2020

A294812 Let b(n) be the number of permutations {c_1..c_n} of {1..n} for which c_1 - c_2 + ... + (-1)^(n-1)*c_n are pentagonal numbers (A000326). Then a(n) = b(n)/A010551(n).

Original entry on oeis.org

1, 1, 1, 2, 4, 5, 6, 10, 23, 38, 70, 110, 196, 346, 759, 1250, 2313, 3982, 8433, 14520, 29437, 50466, 102830, 179587, 376439, 654374, 1343540, 2352149, 4916286, 8654120, 18065200, 31783592, 66233160, 117371504, 246610521, 436972949, 913862320, 1626523783
Offset: 1

Views

Author

Keywords

Comments

All terms are positive integers (for a proof, cf. comment in A293984).
Note that a(1), a(2), a(3), a(4) remain the same, if in the definition the pentagonal numbers are replaced by k-gonal numbers for k >= 3 other than k=4.

Crossrefs

Programs

  • Mathematica
    polyQ[order_,n_]:=If[n==0,True,IntegerQ[(#-4+Sqrt[(#-4)^2+8 n (#-2)])/(2 (#-2))]&[order]];(*is a number polygonal?*)
    Map[Total,Table[
    possibleSums=Range[1/2-(-1)^n/2-Floor[n/2]^2,Floor[(n+1)/2]^2];
    filteredSums=Select[possibleSums,polyQ[5,#]&&#>-1&];
    positions=Map[Flatten[{#,Position[possibleSums,#,1]-1}]&,filteredSums];
    Map[SeriesCoefficient[QBinomial[n,Floor[(n+1)/2],q],{q,0,#[[2]]/2}]&,positions],{n,25}]] (* Peter J. C. Moses, Jan 02 2018 *)

A008619 Positive integers repeated.

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 30, 30, 31, 31, 32, 32, 33, 33, 34, 34, 35, 35, 36, 36, 37, 37, 38
Offset: 0

Views

Author

Keywords

Comments

The floor of the arithmetic mean of the first n+1 positive integers. - Cino Hilliard, Sep 06 2003
Number of partitions of n into powers of 2 where no power is used more than three times, or 4th binary partition function (see A072170).
Number of partitions of n in which the greatest part is at most 2. - Robert G. Wilson v, Jan 11 2002
Number of partitions of n into at most 2 parts. - Jon Perry, Jun 16 2003
a(n) = #{k=0..n: k+n is even}. - Paul Barry, Sep 13 2003
Number of symmetric Dyck paths of semilength n+2 and having two peaks. E.g., a(6)=4 because we have UUUUUUU*DU*DDDDDDD, UUUUUU*DDUU*DDDDDD, UUUUU*DDDUUU*DDDDD and UUUU*DDDDUUUU*DDDD, where U=(1,1), D=(1,-1) and * indicates a peak. - Emeric Deutsch, Jan 12 2004
Smallest positive integer whose harmonic mean with another positive integer is n (for n > 0). For example, a(6)=4 is already given (as 4 is the smallest positive integer such that the harmonic mean of 4 (with 12) is 6) - but the harmonic mean of 2 (with -6) is also 6 and 2 < 4, so the two positive integer restrictions need to be imposed to rule out both 2 and -6.
Second outermost diagonal of Losanitsch's triangle (A034851). - Alonso del Arte, Mar 12 2006
Arithmetic mean of n-th row of A080511. - Amarnath Murthy, Mar 20 2003
a(n) is the number of ways to pay n euros (or dollars) with coins of one and two euros (respectively dollars). - Richard Choulet and Robert G. Wilson v, Dec 31 2007
Inverse binomial transform of A045623. - Philippe Deléham, Dec 30 2008
Coefficient of q^n in the expansion of (m choose 2)_q as m goes to infinity. - Y. Kelly Itakura (yitkr(AT)mta.ca), Aug 21 2002
Binomial transform of (-1)^n*A034008(n) = [1,0,1,-2,4,-8,16,-32,...]. - Philippe Deléham, Nov 15 2009
From Jon Perry_, Nov 16 2010: (Start)
Column sums of:
1 1 1 1 1 1...
1 1 1 1...
1 1...
..............
--------------
1 1 2 2 3 3... (End)
This sequence is also the half-convolution of the powers of 1 sequence A000012 with itself. For the definition of half-convolution see a comment on A201204, where also the rule for the o.g.f. is given. - Wolfdieter Lang, Jan 09 2012
a(n) is also the number of roots of the n-th Bernoulli polynomial in the right half-plane for n>0. - Michel Lagneau, Nov 08 2012
a(n) is the number of symmetry-allowed, linearly-independent terms at n-th order in the series expansion of the Exe vibronic perturbation matrix, H(Q) (cf. Viel & Eisfeld). - Bradley Klee, Jul 21 2015
a(n) is the number of distinct integers in the n-th row of Pascal's triangle. - Melvin Peralta, Feb 03 2016
a(n+1) for n >= 3 is the diameter of the Generalized Petersen Graph G(n, 1). - Nick Mayers, Jun 06 2016
The arithmetic function v_1(n,2) as defined in A289198. - Robert Price, Aug 22 2017
Also, this sequence is the second column in the triangle of the coefficients of the sum of two consecutive Fibonacci polynomials F(n+1, x) and F(n, x) (n>=0) in ascending powers of x. - Mohammad K. Azarian, Jul 18 2018
a(n+2) is the least k such that given any k integers, there exist two of them whose sum or difference is divisible by n. - Pablo Hueso Merino, May 09 2020
Column k = 2 of A051159. - John Keith, Jun 28 2021

References

  • D. J. Benson, Polynomial Invariants of Finite Groups, Cambridge, 1993, p. 100.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 109, Eq. [6c]; p. 116, P(n,2).
  • D. Parisse, 'The tower of Hanoi and the Stern-Brocot Array', Thesis, Munich 1997

Crossrefs

Essentially same as A004526.
Harmonic mean of a(n) and A056136 is n.
a(n)=A010766(n+2, 2).
Cf. A010551 (partial products).
Cf. A263997 (a block spiral).
Cf. A289187.
Column 2 of A235791.

Programs

  • Haskell
    a008619 = (+ 1) . (`div` 2)
    a008619_list = concatMap (\x -> [x,x]) [1..]
    -- Reinhard Zumkeller, Apr 02 2012
    
  • Magma
    I:=[1,1,2]; [n le 3 select I[n] else Self(n-1)+Self(n-2)-Self(n-3): n in [1..100]]; // Vincenzo Librandi, Feb 04 2015
    
  • Maple
    a:= n-> iquo(n+2, 2): seq(a(n), n=0..75);
  • Mathematica
    Flatten[Table[{n,n},{n,35}]] (* Harvey P. Dale, Sep 20 2011 *)
    With[{c=Range[40]},Riffle[c,c]] (* Harvey P. Dale, Feb 23 2013 *)
    CoefficientList[Series[1/(1 - x - x^2 + x^3), {x, 0, 75}], x] (* Robert G. Wilson v, Feb 05 2015 *)
    LinearRecurrence[{1, 1, -1}, {1, 1, 2}, 75] (* Robert G. Wilson v, Feb 05 2015 *)
    Table[QBinomial[n, 2, -1], {n, 2, 75}] (* John Keith, Jun 28 2021 *)
  • PARI
    a(n)=n\2+1
    
  • Python
    def A008619(n): return (n>>1)+1 # Chai Wah Wu, Jul 07 2022
  • Sage
    a = lambda n: 1 if n==0 else a(n-1)+1 if 2.divides(n) else a(n-1) # Peter Luschny, Feb 05 2015
    
  • Scala
    (2 to 99).map( / 2) // _Alonso del Arte, May 09 2020
    

Formula

Euler transform of [1, 1].
a(n) = 1 + floor(n/2).
G.f.: 1/((1-x)(1-x^2)).
E.g.f.: ((3+2*x)*exp(x) + exp(-x))/4.
a(n) = a(n-1) + a(n-2) - a(n-3) = -a(-3-n).
a(0) = a(1) = 1 and a(n) = floor( (a(n-1) + a(n-2))/2 + 1 ).
a(n) = (2*n + 3 + (-1)^n)/4. - Paul Barry, May 27 2003
a(n) = Sum_{k=0..n} Sum_{j=0..k} Sum_{i=0..j} binomial(j, i)*(-2)^i. - Paul Barry, Aug 26 2003
E.g.f.: ((1+x)*exp(x) + cosh(x))/2. - Paul Barry, Sep 13 2003
a(n) = A108299(n-1,n)*(-1)^floor(n/2) for n > 0. - Reinhard Zumkeller, Jun 01 2005
a(n) = A108561(n+2,n) for n > 0. - Reinhard Zumkeller, Jun 10 2005
a(n) = A125291(A125293(n)) for n>0. - Reinhard Zumkeller, Nov 26 2006
a(n) = ceiling(n/2), n >= 1. - Mohammad K. Azarian, May 22 2007
INVERT transformation yields A006054 without leading zeros. INVERTi transformation yields negative of A124745 with the first 5 terms there dropped. - R. J. Mathar, Sep 11 2008
a(n) = A026820(n,2) for n > 1. - Reinhard Zumkeller, Jan 21 2010
a(n) = n - a(n-1) + 1 (with a(0)=1). - Vincenzo Librandi, Nov 19 2010
a(n) = A000217(n) / A110654(n). - Reinhard Zumkeller, Aug 24 2011
a(n+1) = A181971(n,n). - Reinhard Zumkeller, Jul 09 2012
1/(1+2/(2+3/(3+4/(4+5/(5+...(continued fraction))))) = 1/(e-1), see A073333. - Philippe Deléham, Mar 09 2013
a(n) = floor(A000217(n)/n), n > 0. - L. Edson Jeffery, Jul 26 2013
a(n) = n*a(n-1) mod (n+1) = -a(n-1) mod (n+1), the least positive residue modulo n+1 for each expression for n > 0, with a(0) = 1 (basically restatements of Vincenzo Librandi's formula). - Rick L. Shepherd, Apr 02 2014
a(n) = (a(0) + a(1) + ... + a(n-1))/a(n-1), where a(0) = 1. - Melvin Peralta, Jun 16 2015
a(n) = Sum_{k=0..n} (-1)^(n-k) * (k+1). - Rick L. Shepherd, Sep 18 2020
a(n) = a(n-2) + 1 for n >= 2. - Vladimír Modrák, Sep 29 2020
a(n) = A004526(n)+1. - Chai Wah Wu, Jul 07 2022

Extensions

Additional remarks from Daniele Parisse
Edited by N. J. A. Sloane, Sep 06 2009
Partially edited by Joerg Arndt, Mar 11 2010

A001057 Canonical enumeration of integers: interleaved positive and negative integers with zero prepended.

Original entry on oeis.org

0, 1, -1, 2, -2, 3, -3, 4, -4, 5, -5, 6, -6, 7, -7, 8, -8, 9, -9, 10, -10, 11, -11, 12, -12, 13, -13, 14, -14, 15, -15, 16, -16, 17, -17, 18, -18, 19, -19, 20, -20, 21, -21, 22, -22, 23, -23, 24, -24, 25, -25, 26, -26, 27, -27, 28, -28, 29, -29, 30, -30, 31, -31
Offset: 0

Views

Author

Keywords

Comments

Go forwards and backwards with increasing step sizes. - Daniele Parisse and Franco Virga, Jun 06 2005
The partial sums of the divergent series 1 - 2 + 3 - 4 + ... give this sequence. Euler summed it to 1/4 which was one of the first examples of summing divergent series. - Michael Somos, May 22 2007
From Peter Luschny, Jul 12 2009: (Start)
The general formula for alternating sums of powers is in terms of the Swiss-Knife polynomials P(n,x) A153641 2^(-n-1)(P(n,1)-(-1)^k P(n,2k+1)). Thus
a(k) = 2^(-2)(P(1,1)-(-1)^k P(1,2k+1)). (End)
Let A be the Hessenberg matrix of order n, defined by: A[1,j]=1, A[i,i]:=-1, A[i,i-1]=-1, and A[i,j]=0 otherwise. Then, for n>=4, a(n-3)=(-1)^(n-1)*coeff(charpoly(A,x),x). - Milan Janjic, Jan 26 2010
Cantor ordering of the integers producing a 1-1 and onto correspondence between the natural numbers and the integers showing that the set Z of integers has the same cardinality as the set N of natural numbers. The cardinal of N is the first transfinite cardinal aleph_null (or aleph_naught), which is the cardinality of a given infinite set if and only if it is countably infinite (denumerable), i.e., it can be put in 1-1 and onto correspondence (with a proper Cantor ordering) with the natural numbers. - Daniel Forgues, Jan 23 2010
a(n) is the determinant of the (n+2) X (n+2) (0,1)-Toeplitz matrix M satisfying: M(i,j)=0 iff i=j or i=j-1. The matrix M arises in the variation of ménage problem where not a round table, but one side of a rectangular table is considered (see comments of Vladimir Shevelev in A000271). Namely M(i,j) defines the class of permutations p of 1,2,...,n+2 such that p(i)<>i and p(i)<>i+1 for i=1,2,...,n+1, and p(n+2)<>n+2. And a(n) is also the difference between the number of even and odd such permutations. - Dmitry Efimov, Mar 02 2017

Examples

			G.f. = x - x^2 + 2*x^3 - 2*x^4 + 3*x^5 - 3*x^6 + 4*x^7 - 4*x^8 + 5*x^9 - 5*x^10 + ...
		

Crossrefs

Cf. A008619, A004526, A166711, A166871, A130472 (negation), A142150 (partial sums), A010551 (partial products for n > 0).
Alternating row sums of A104578 are a(n+1), for n >= 0.

Programs

  • Haskell
    a001057 n = (n' + m) * (-1) ^ (1 - m) where (n',m) = divMod n 2
    a001057_list = 0 : concatMap (\x -> [x,-x]) [1..]
    -- Reinhard Zumkeller, Apr 02 2012
    
  • Maple
    a := n -> (1-(-1)^n*(2*n+1))/4; # Peter Luschny, Jul 12 2009
  • Mathematica
    Join[{0},Riffle[Range[35],-Range[35]]] (* Harvey P. Dale, Sep 21 2011 *)
    a[ n_] := -(-1)^n Ceiling[n/2]; (* Michael Somos, Jun 05 2013 *)
    LinearRecurrence[{-1, 1, 1}, {0, 1, -1}, 63] (* Jean-François Alcover, Jan 07 2019 *)
  • PARI
    {a(n) = if( n%2, n\2 + 1, -n/2)}; /* Michael Somos, Jul 20 1999 */
    
  • Python
    def a(n): return n//2 + 1 if n%2 else -n//2
    print([a(n) for n in range(63)]) # Michael S. Branicky, Jul 14 2022

Formula

Euler transform of [-1, 2] is sequence a(n+1). - Michael Somos, Jun 11 2003
G.f.: x / ((1 + x) * (1 - x^2)). - Michael Somos, Jul 20 1999
E.g.f.: (exp(x) - (1 - 2*x) * exp(-x)) / 4. - Michael Somos, Jun 11 2003
a(n) = 1 - 2*a(n-1) -a(n-2); a(2*n) = -n, a(2*n+1) = n+1. - Michael Somos, Jul 20 1999
|a(n+1)| = A008619(n). |a(n-1)| = A004526(n). - Michael Somos, Jul 20 1999
a(n) = -a(n-1) + a(n-2) + a(n-3). a(n) = (-1)^(n+1) * floor((n+1) / 2). - Michael Somos, Jun 11 2003
a(1) = 1, a(n) = a(n-1)+n or a(n-1)-n whichever is closer to 0 on the number line. Or abs(a(n)) = min{abs(a(n-1)+n), abs(a(n-1)-n)}. - Amarnath Murthy, Jul 01 2003
a(n) = Sum_{k=0..n} k*(-1)^(k+1). - Paul Barry, Aug 20 2003
a(n) = (1-(2n+1)*(-1)^n)/4. - Paul Barry, Feb 02 2004
a(0) = 0; a(n) = (-1)^(n-1) * (n-|a(n-1)|) for n >= 1. - Rick L. Shepherd, Jul 14 2004
a(n) = a(n-1)-n*(-1)^n, a(0)=0; or a(n) = -a(n-1)+(1-(-1)^n)/2, a(0)=0. - Daniele Parisse and Franco Virga, Jun 06 2005
a(n) = ceiling(n/2) * (-1)^(n+1), n >= 0. - Franklin T. Adams-Watters, Nov 25 2011 (corrected by Daniel Forgues, Jul 21 2012)
a(n) = a(-1-n) for all n in Z. - Michael Somos, Jun 05 2013
Sum_{n>=1} 1/a(n) = 0. - Jaume Oliver Lafont, Jul 14 2017

Extensions

Thanks to Michael Somos for helpful comments.
Name edited by Franklin T. Adams-Watters, Jan 30 2012

A374848 Obverse convolution A000045**A000045; see Comments.

Original entry on oeis.org

0, 1, 2, 16, 162, 3600, 147456, 12320100, 2058386904, 701841817600, 488286500625000, 696425232679321600, 2038348954317776486400, 12259459134020160144810000, 151596002479762016373851690400, 3855806813438155578522841251840000
Offset: 0

Views

Author

Clark Kimberling, Jul 31 2024

Keywords

Comments

The obverse convolution of sequences
s = (s(0), s(1), ...) and t = (t(0), t(1), ...)
is introduced here as the sequence s**t given by
s**t(n) = (s(0)+t(n)) * (s(1)+t(n-1)) * ... * (s(n)+t(0)).
Swapping * and + in the representation s(0)*t(n) + s(1)*t(n-1) + ... + s(n)*t(0)
of ordinary convolution yields s**t.
If x is an indeterminate or real (or complex) variable, then for every sequence t of real (or complex) numbers, s**t is a sequence of polynomials p(n) in x, and the zeros of p(n) are the numbers -t(0), -t(1), ..., -t(n).
Following are abbreviations in the guide below for triples (s, t, s**t):
F = (0,1,1,2,3,5,...) = A000045, Fibonacci numbers
L = (2,1,3,4,7,11,...) = A000032, Lucas numbers
P = (2,3,5,7,11,...) = A000040, primes
T = (1,3,6,10,15,...) = A000217, triangular numbers
C = (1,2,6,20,70, ...) = A000984, central binomial coefficients
LW = (1,3,4,6,8,9,...) = A000201, lower Wythoff sequence
UW = (2,5,7,10,13,...) = A001950, upper Wythoff sequence
[ ] = floor
In the guide below, sequences s**t are identified with index numbers Axxxxxx; in some cases, s**t and Axxxxxx differ in one or two initial terms.
Table 1. s = A000012 = (1,1,1,1...) = (1);
t = A000012; 1 s**t = A000079; 2^(n+1)
t = A000027; n s**t = A000142; (n+1)!
t = A000040, P s**t = A054640
t = A000040, P (1/3) s**t = A374852
t = A000079, 2^n s**t = A028361
t = A000079, 2^n (1/3) s**t = A028362
t = A000045, F s**t = A082480
t = A000032, L s**t = A374890
t = A000201, LW s**t = A374860
t = A001950, UW s**t = A374864
t = A005408, 2*n+1 s**t = A000165, 2^n*n!
t = A016777, 3*n+1 s**t = A008544
t = A016789, 3*n+2 s**t = A032031
t = A000142, n! s**t = A217757
t = A000051, 2^n+1 s**t = A139486
t = A000225, 2^n-1 s**t = A006125
t = A032766, [3*n/2] s**t = A111394
t = A034472, 3^n+1 s**t = A153280
t = A024023, 3^n-1 s**t = A047656
t = A000217, T s**t = A128814
t = A000984, C s**t = A374891
t = A279019, n^2-n s**t = A130032
t = A004526, 1+[n/2] s**t = A010551
t = A002264, 1+[n/3] s**t = A264557
t = A002265, 1+[n/4] s**t = A264635
Sequences (c)**L, for c=2..4: A374656 to A374661
Sequences (c)**F, for c=2..6: A374662, A374662, A374982 to A374855
The obverse convolutions listed in Table 1 are, trivially, divisibility sequences. Likewise, if s = (-1,-1,-1,...) instead of s = (1,1,1,...), then s**t is a divisibility sequence for every choice of t; e.g. if s = (-1,-1,-1,...) and t = A279019, then s**t = A130031.
Table 2. s = A000027 = (0,1,2,3,4,5,...) = (n);
t = A000027, n s**t = A007778, n^(n+1)
t = A000290, n^2 s**t = A374881
t = A000040, P s**t = A374853
t = A000045, F s**t = A374857
t = A000032, L s**t = A374858
t = A000079, 2^n s**t = A374859
t = A000201, LW s**t = A374861
t = A005408, 2*n+1 s**t = A000407, (2*n+1)! / n!
t = A016777, 3*n+1 s**t = A113551
t = A016789, 3*n+2 s**t = A374866
t = A000142, n! s**t = A374871
t = A032766, [3*n/2] s**t = A374879
t = A000217, T s**t = A374892
t = A000984, C s**t = A374893
t = A038608, n*(-1)^n s**t = A374894
Table 3. s = A000290 = (0,1,4,9,16,...) = (n^2);
t = A000290, n^2 s**t = A323540
t = A002522, n^2+1 s**t = A374884
t = A000217, T s**t = A374885
t = A000578, n^3 s**t = A374886
t = A000079, 2^n s**t = A374887
t = A000225, 2^n-1 s**t = A374888
t = A005408, 2*n+1 s**t = A374889
t = A000045, F s**t = A374890
Table 4. s = t;
s = t = A000012, 1 s**s = A000079; 2^(n+1)
s = t = A000027, n s**s = A007778, n^(n+1)
s = t = A000290, n^2 s**s = A323540
s = t = A000045, F s**s = this sequence
s = t = A000032, L s**s = A374850
s = t = A000079, 2^n s**s = A369673
s = t = A000244, 3^n s**s = A369674
s = t = A000040, P s**s = A374851
s = t = A000201, LW s**s = A374862
s = t = A005408, 2*n+1 s**s = A062971
s = t = A016777, 3*n+1 s**s = A374877
s = t = A016789, 3*n+2 s**s = A374878
s = t = A032766, [3*n/2] s**s = A374880
s = t = A000217, T s**s = A375050
s = t = A005563, n^2-1 s**s = A375051
s = t = A279019, n^2-n s**s = A375056
s = t = A002398, n^2+n s**s = A375058
s = t = A002061, n^2+n+1 s**s = A375059
If n = 2*k+1, then s**s(n) is a square; specifically,
s**s(n) = ((s(0)+s(n))*(s(1)+s(n-1))*...*(s(k)+s(k+1)))^2.
If n = 2*k, then s**s(n) has the form 2*s(k)*m^2, where m is an integer.
Table 5. Others
s = A000201, LW t = A001950, UW s**t = A374863
s = A000045, F t = A000032, L s**t = A374865
s = A005843, 2*n t = A005408, 2*n+1 s**t = A085528, (2*n+1)^(n+1)
s = A016777, 3*n+1 t = A016789, 3*n+2 s**t = A091482
s = A005408, 2*n+1 t = A000045, F s**t = A374867
s = A005408, 2*n+1 t = A000032, L s**t = A374868
s = A005408, 2*n+1 t = A000079, 2^n s**t = A374869
s = A000027, n t = A000142, n! s**t = A374871
s = A005408, 2*n+1 t = A000142, n! s**t = A374872
s = A000079, 2^n t = A000142, n! s**t = A374874
s = A000142, n! t = A000045, F s**t = A374875
s = A000142, n! t = A000032, L s**t = A374876
s = A005408, 2*n+1 t = A016777, 3*n+1 s**t = A352601
s = A005408, 2*n+1 t = A016789, 3*n+2 s**t = A064352
Table 6. Arrays of coefficients of s(x)**t(x), where s(x) and t(x) are polynomials
s(x) t(x) s(x)**t(x)
n x A132393
n^2 x A269944
x+1 x+1 A038220
x+2 x+2 A038244
x x+3 A038220
nx x+1 A094638
1 x^2+x+1 A336996
n^2 x x+1 A375041
n^2 x 2x+1 A375042
n^2 x x+2 A375043
2^n x x+1 A375044
2^n 2x+1 A375045
2^n x+2 A375046
x+1 F(n) A375047
x+1 x+F(n) A375048
x+F(n) x+F(n) A375049

Examples

			a(0) = 0 + 0 = 0
a(1) = (0+1) * (1+0) = 1
a(2) = (0+1) * (1+1) * (1+0) = 2
a(3) = (0+2) * (1+1) * (1+1) * (2+0) = 16
As noted above, a(2*k+1) is a square for k>=0. The first 5 squares are 1, 16, 3600, 12320100, 701841817600, with corresponding square roots 1, 4, 60, 3510, 837760.
If n = 2*k, then s**s(n) has the form 2*F(k)*m^2, where m is an integer and F(k) is the k-th Fibonacci number; e.g., a(6) = 2*F(3)*(192)^2.
		

Crossrefs

Programs

  • Maple
    a:= n-> (F-> mul(F(n-j)+F(j), j=0..n))(combinat[fibonacci]):
    seq(a(n), n=0..15);  # Alois P. Heinz, Aug 02 2024
  • Mathematica
    s[n_] := Fibonacci[n]; t[n_] := Fibonacci[n];
    u[n_] := Product[s[k] + t[n - k], {k, 0, n}];
    Table[u[n], {n, 0, 20}]
  • PARI
    a(n)=prod(k=0, n, fibonacci(k) + fibonacci(n-k)) \\ Andrew Howroyd, Jul 31 2024

Formula

a(n) ~ c * phi^(3*n^2/4 + n) / 5^((n+1)/2), where c = QPochhammer(-1, 1/phi^2)^2/2 if n is even and c = phi^(1/4) * QPochhammer(-phi, 1/phi^2)^2 / (phi + 1)^2 if n is odd, and phi = A001622 is the golden ratio. - Vaclav Kotesovec, Aug 01 2024

A275062 Number A(n,k) of permutations p of [n] such that p(i)-i is a multiple of k for all i in [n]; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 6, 1, 1, 1, 1, 2, 24, 1, 1, 1, 1, 1, 4, 120, 1, 1, 1, 1, 1, 2, 12, 720, 1, 1, 1, 1, 1, 1, 4, 36, 5040, 1, 1, 1, 1, 1, 1, 2, 8, 144, 40320, 1, 1, 1, 1, 1, 1, 1, 4, 24, 576, 362880, 1, 1, 1, 1, 1, 1, 1, 2, 8, 72, 2880, 3628800, 1
Offset: 0

Views

Author

Alois P. Heinz, Jul 15 2016

Keywords

Examples

			A(5,0) = A(5,5) = 1: 12345.
A(5,1) = 5! = 120: all permutations of {1,2,3,4,5}.
A(5,2) = 12: 12345, 12543, 14325, 14523, 32145, 32541, 34125, 34521, 52143, 52341, 54123, 54321.
A(5,3) = 4: 12345, 15342, 42315, 45312.
A(5,4) = 2: 12345, 52341.
A(7,4) = 8: 1234567, 1274563, 1634527, 1674523, 5234167, 5274163, 5634127, 5674123.
Square array A(n,k) begins:
  1,       1,     1,   1,   1,  1,  1, 1, 1, 1, 1, ...
  1,       1,     1,   1,   1,  1,  1, 1, 1, 1, 1, ...
  1,       2,     1,   1,   1,  1,  1, 1, 1, 1, 1, ...
  1,       6,     2,   1,   1,  1,  1, 1, 1, 1, 1, ...
  1,      24,     4,   2,   1,  1,  1, 1, 1, 1, 1, ...
  1,     120,    12,   4,   2,  1,  1, 1, 1, 1, 1, ...
  1,     720,    36,   8,   4,  2,  1, 1, 1, 1, 1, ...
  1,    5040,   144,  24,   8,  4,  2, 1, 1, 1, 1, ...
  1,   40320,   576,  72,  16,  8,  4, 2, 1, 1, 1, ...
  1,  362880,  2880, 216,  48, 16,  8, 4, 2, 1, 1, ...
  1, 3628800, 14400, 864, 144, 32, 16, 8, 4, 2, 1, ...
		

Crossrefs

A(k*n,n) for k=1..4 give: A000012, A000079, A000400, A009968.
Cf. A225816.

Programs

  • Maple
    A:= (n, k)-> mul(floor((n+i)/k)!, i=0..k-1):
    seq(seq(A(n, d-n), n=0..d), d=0..14);
  • Mathematica
    A[n_, k_] := Product[Floor[(n+i)/k]!, {i, 0, k-1}];
    Table[A[n, d-n], {d, 0, 14}, {n, 0, d}] // Flatten (* Jean-François Alcover, May 26 2019, from Maple *)

Formula

A(n,k) = Product_{i=0..k-1} floor((n+i)/k)!.
A(k*n,k) = (n!)^k = A225816(k,n).
For k > 0, A(n, k) ~ (2*Pi*n)^((k - 1)/2) * n! / k^(n + k/2). - Vaclav Kotesovec, Oct 02 2018

A246117 Number of parity preserving permutations of the set {1,2,...,n} with exactly k cycles.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 2, 1, 0, 2, 5, 4, 1, 0, 4, 12, 13, 6, 1, 0, 12, 40, 51, 31, 9, 1, 0, 36, 132, 193, 144, 58, 12, 1, 0, 144, 564, 904, 769, 376, 106, 16, 1, 0, 576, 2400, 4180, 3980, 2273, 800, 170, 20, 1, 0, 2880, 12576, 23300, 24080, 15345, 6273, 1650, 270, 25, 1
Offset: 1

Views

Author

Peter Bala, Aug 14 2014

Keywords

Comments

An analog of the Stirling numbers of the first kind, A008275.
A permutation p of the set {1,2,...,n} is called a parity-preserving permutation if p(i) = i (mod 2) for i = 1,2,...,n. The set of all such permutations forms a subgroup of order A010551 of the symmetric group on n letters. This triangle gives the number of parity preserving permutations of the set {1,2,...,n} with exactly k cycles. An example is given below.
If we write a parity-preserving permutation p in one line notation as ( p(1) p(2) p(3)... p(n) ) then the first entry p(1) is odd and thereafter the entries alternate in parity. Thus the permutation p belongs to the set of parity-alternate permutations studied by Tanimoto.
The row generating polynomials form the polynomial sequence x, x^2, x^2*(x + 1), x^2*(x + 1)^2, x^2*(x + 1)^2*(x + 2), x^2*(x + 1)^2*(x + 2)^2, .... Except for differences in offset, this triangle is the Galton array G(floor(n/2),1) in the notation of Neuwirth with inverse array G(-floor(k/2),1). See A246118 for the unsigned version of the inverse array.
From Peter Bala, Apr 12 2018: (Start)
In the cycle decomposition of a parity preserving permutation, the entries in a given cycle are either all even or all odd. Define T(n,k,i), 1 <= i <= k-1, (a refinement of the table number T(n,k)) to be the number of parity preserving permutations of the set {1,2,...,n} with exactly k cycles and with i of the cycles having all even entries. Clearly, T(n,k) = Sum_{i = 1..k-1} T(n,k,i).
A simple combinatorial argument (cf. Dzhumadil'daev and Yeliussizov, Proposition 5.3) gives the recurrences
T(2*n,k,i) = T(2n-1,k-1,i-1) + (n-1)*T(2*n-1,k,i) and
T(2*n+1,k,i) = T(2*n,k-1,i) + n*T(2*n,k,i).
The solution to these recurrences for n >= 1 is T(2*n,k,i) = S1(n,i)*S1(n,k-i) and T(2*n+1,k,i) = S1(n,i)*S1(n+1,k-i), where S1(n,k) = |A008275(n,k)| denotes the (unsigned) Stirling cycle numbers of the first kind. Kotesovec's formula for T(n,k) below follows immediately from this. Cf. A274310. (End)
Triangle of allowable Stirling numbers of the first kind (with a different offset). See Cai and Readdy, Table 4. - Peter Bala, Apr 14 2018

Examples

			Triangle begins
n\k| 1   2    3    4    5   6   7   8
= = = = = = = = = = = = = = = = = = =
1  | 1
2  | 0   1
3  | 0   1    1
4  | 0   1    2    1
5  | 0   2    5    4    1
6  | 0   4   12   13    6   1
7  | 0  12   40   51   31   9   1
8  | 0  36  132  193  144  58  12  1
...
n = 5: The 12 parity-preserving permutations of S_5 and their cycle structure are shown in the table below.
= = = = = = = = = = = = = = = = = = = = = = = = = =
Parity-preserving      Cycle structure     # cycles
permutation
= = = = = = = = = = = = = = = = = = = = = = = = = =
54123                   (153)(24)              2
34521                   (135)(24)              2
34125                   (13)(24)(5)            3
14523                   (1)(24)(35)            3
32541                   (135)(2)(4)            3
52143                   (153)(2)(4)            3
54321                   (15)(24)(3)            3
32145                   (13)(2)(4)(5)          4
14325                   (1)(24)(3)(5)          4
12543                   (1)(2)(35)(4)          4
52341                   (15)(2)(3)(4)          4
12345                   (1)(2)(3)(4)(5)        5
= = = = = = = = = = = = = = = = = = = = = = = = = =
This gives row 5 as [2, 5, 4, 1] with generating function 2*x^2 + 5*x^3 + 4*x^4 + x^5 = ( x*(x + 1) )^2 * (x + 2).
		

Crossrefs

A002620 (1st subdiagonal), A008275, A010551 (row sums and column k = 2), A125300, A203151 (column k = 3), A203246 (2nd subdiagonal), A246118 (unsigned matrix inverse).

Programs

  • Maple
    A246117 := proc(n,k)
        if n = k then
            1;
        elif k <= 1 or k > n then
            0;
        else
            floor((n-1)/2)*procname(n-1,k)+procname(n-1,k-1) ;
        end if;
    end proc:
    seq(seq(A246117(n,k),k=1..n),n=1..8) ; # R. J. Mathar, Oct 01 2016
  • Mathematica
    Flatten[{1,Rest[Table[Table[(-1)^(n-k) * Sum[StirlingS1[Floor[(n+1)/2],j] * StirlingS1[Floor[n/2],k-j],{j,1,k-1}],{k,1,n}],{n,1,12}]]}] (* Vaclav Kotesovec, Feb 09 2015 *)

Formula

Recurrence equations: T(1,1) = 1, T(n,1) = 0 for n >= 2; T(n,k) = 0 for k > n; otherwise T(n+1,k) = floor(n/2)*T(n,k) + T(n,k-1).
Row generating polynomials R(n,x): R(2*n,x) = ( x*(x + 1)*...*(x + n - 1) )^2; R(2*n + 1,x) = R(2*n,x)*(x + n) with the convention R(0,x) = 1.
Row sums: A010551; Column 3: A203151;
First subdiagonal: A002620; 2nd subdiagonal: A203246.
T(n,k) = (-1)^(n-k) * Sum_{j=1..k-1} Stirling1(floor((n+1)/2),j) * Stirling1(floor(n/2),k-j), for k>1. - Vaclav Kotesovec, Feb 09 2015

A051237 Lexicographically earliest prime pyramid, read by rows.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Row n begins with 1, ends with n and sum of any two adjacent entries is prime.
From Daniel Forgues, May 17 2011 and May 18 2011: (Start)
Since the sum of any two adjacent entries is at least 3, the sum is an odd prime, which implies that any two consecutive entries have opposite parity.
Since the first and last entries of row n are fixed at 1 and n, we have to find n-2 entries, where ceiling((n-2)/2) of them are even and floor((n-2)/2) are odd, so for row n the number of possible arrangements is
(ceiling((n-2)/2))! * (floor((n-2)/2))! (Cf. A010551(n-2), n >= 2.)
The number of ways of arranging row n to get a prime pyramid is given by A036440. List them in lexicographic order and pick the first (earliest) to get row n of lexicographically earliest prime pyramid.
Prime pyramids are also (more fittingly?) called prime triangles. (End)
It appears that the limit of the rows of the lexicographically earliest prime pyramid is A055265 (see comment in that sequence).
Assuming Dickson's conjecture (or the later Hardy-Littlewood Conjecture B), no backtracking is needed: if the first n-2 elements in each row are chosen greedily, a penultimate member can be chosen such that its sums are prime. - Charles R Greathouse IV, May 18 2011

Examples

			Triangle begins:
1;
1, 2;
1, 2, 3;
1, 2, 3, 4;
1, 4, 3, 2, 5;
1, 4, 3, 2, 5, 6;
1, 4, 3, 2, 5, 6, 7;
1, 2, 3, 4, 7, 6, 5, 8;
1, 2, 3, 4, 7, 6, 5, 8, 9;
1, 2, 3, 4, 7, 6, 5, 8, 9, 10;
1, 2, 3, 4, 7, 10, 9, 8, 5, 6, 11;
1, 2, 3, 4, 7, 10, 9, 8, 5, 6, 11, 12;
1, 2, 3, 4, 7, 6, 5, 12, 11, 8, 9, 10, 13;
		

References

  • R. K. Guy, Unsolved Problems Number Theory, Section C1.

Crossrefs

See A187869 for the concatenation of the numbers for each row.

Programs

  • Mathematica
    (* first do *) Needs["Combinatorica`"] (* then *) f[n_] := Block[{r = Range@ n}, While[ Union[ PrimeQ[ Plus @@@ Partition[r, 2, 1]]][[1]] == False, r = NextPermutation@ r]; r]; f[1] = 1; Array[f, 13] // Flatten (* Robert G. Wilson v *)

Extensions

More terms from Jud McCranie

A214906 T(n,k)=Number of nXnXn triangular 0..k arrays with every horizontal row nondecreasing and having the same average value.

Original entry on oeis.org

2, 3, 2, 4, 4, 2, 5, 6, 6, 2, 6, 9, 14, 14, 2, 7, 12, 29, 50, 38, 2, 8, 16, 50, 182, 242, 146, 2, 9, 20, 88, 458, 1802, 1682, 578, 2, 10, 25, 136, 1184, 7550, 29162, 13442, 2882, 2, 11, 30, 209, 2490, 31412, 210914, 657722, 134402, 14402, 2, 12, 36, 302, 5213, 100350
Offset: 1

Views

Author

R. H. Hardin Jul 29 2012

Keywords

Comments

Table starts
.2..3...4....5....6.....7......8......9.....10......11......12.......13
.2..4...6....9...12....16.....20.....25.....30......36......42.......49
.2..6..14...29...50....88....136....209....302.....430.....584......793
.2.14..50..182..458..1184...2490...5213...9722...17864...30284....51088
.2.38.242.1802.7550.31412.100350.310079.811472.2065406.4695974.10458806

Examples

			Some solutions for n=4 k=4
.....3........2........2........3........2........2........2........2
....2.4......2.2......1.3......2.4......1.3......2.2......1.3......1.3
...2.3.4....0.3.3....0.3.3....1.4.4....1.1.4....2.2.2....0.3.3....1.2.3
..2.3.3.4..1.2.2.3..0.2.3.3..3.3.3.3..0.0.4.4..1.1.2.4..2.2.2.2..0.2.2.4
		

Crossrefs

Column 2 is A010551(n+1)+2
Row 2 is A002620(n+2)

Formula

Empirical for row n:
n=1: a(k)=2*a(k-1)-a(k-2)
n=2: a(k)=2*a(k-1)-2*a(k-3)+a(k-4)
n=3: a(k)=2*a(k-2)+2*a(k-3)-4*a(k-5)-3*a(k-6)+3*a(k-8)+4*a(k-9)-2*a(k-11)-2*a(k-12)+a(k-14)
n=4: (order 62 symmetric)
Showing 1-10 of 32 results. Next