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

A176211 Numbers of the form Product_{m_i >= 3} A000211(m_i), possibly repeated, in natural order.

Original entry on oeis.org

6, 9, 13, 20, 31, 36, 49, 54, 78, 78, 81, 117, 120, 125, 169, 180, 186, 201, 216, 260, 279, 294, 324, 324, 400, 403, 441, 468, 468, 486, 523, 620, 637, 702, 702, 720, 729, 750, 845, 961, 980, 1014, 1014, 1053, 1080, 1116, 1125, 1206, 1296, 1366, 1519, 1521, 1560, 1560, 1620, 1625, 1674, 1764, 1809, 1944, 1944, 2197, 2209
Offset: 1

Views

Author

Vladimir Shevelev, Apr 12 2010

Keywords

Comments

Values represented by more than one set of indices are listed once per set; otherwise A176212 results.
Each term is a permanent of a quadratic symmetric (0,1) matrix with 1's on the main diagonal and exactly three 1's in each row and column.
For fixed Sum m_i=n with m_i >= 3, Product A000211(m_i) >= 6(4/3)^(n-3) and max(Product A000211(m_i)) = 6^((n-h)/3)*floor((3/2)^h), where h is the remainder of n (mod 3).

Crossrefs

Programs

  • PARI
    f(n) = fibonacci(n+1) + fibonacci(n-1) + 2; \\ A000211
    lista(nn) = {my(v = vector(nn, k, f(k+2))); my(vmax = vecmax(v)); my(w =  vector(nn, k, [0, logint(vmax, v[k])])); my(list=List()); forvec(x = w, if (vecmax(x), my(y = prod(k=1, #v, v[k]^x[k])); if (y <= vmax, listput(list, y)););); Vec(vecsort(list));}
    lista(14) \\ Michel Marcus, Jan 06 2021

A001924 Apply partial sum operator twice to Fibonacci numbers.

Original entry on oeis.org

0, 1, 3, 7, 14, 26, 46, 79, 133, 221, 364, 596, 972, 1581, 2567, 4163, 6746, 10926, 17690, 28635, 46345, 75001, 121368, 196392, 317784, 514201, 832011, 1346239, 2178278, 3524546, 5702854, 9227431, 14930317, 24157781, 39088132, 63245948, 102334116, 165580101
Offset: 0

Views

Author

Keywords

Comments

Leading coefficients in certain rook polynomials (for n>=2; see p. 18 of the Riordan paper). - Emeric Deutsch, Mar 08 2004
(1, 3, 7, 14, ...) = row sums of triangle A141289. - Gary W. Adamson, Jun 22 2008
a(n) is the number of nonempty subsets of {1,2,...,n} such that the difference of successive elements is at most 2. See example below. Generally, the o.g.f. for the number of nonempty subsets of {1,2,...,n} such that the difference of successive elements is <= k is: x/((1-x)*(1-2*x+x^(k+1))). Cf. A000217 the case for k=1, A001477 the case for k=0 (counts singleton subsets). - Geoffrey Critzer, Feb 17 2012
-Fibonacci(n-2) = p(-1) where p(x) is the unique degree-n polynomial such that p(k) = a(k) for k = 0, 1, ..., n. - Michael Somos, Dec 31 2012
a(n) is the number of bit strings of length n+1 with the pattern 00 and without the pattern 011, see example. - John M. Campbell, Feb 10 2013
From Jianing Song, Apr 28 2025: (Start)
For n >= 2, a(n-2) is the number of subsets of {1,2,...,n} with 2 or more elements that contain no consecutive elements (i.e., such that the difference of successive elements is at least 2). Note that the number of such subsets with k elements is binomial(n+1-k,k), and Sum_{k=2..floor((n+1)/2)} binomial(n+1-k,k) = F(n+2) - binomial(n+1,0) - binomial(n,1) = F(n+2) - (n+1).
If subsets of {1,2,...,n} are required to contain no consecutive elements module n, then the result is A023548(n-3). (End)

Examples

			a(5) = 26 because there are 31 nonempty subsets of {1,2,3,4,5} but 5 of these have successive elements that differ by 3 or more: {1,4}, {1,5}, {2,5}, {1,2,5}, {1,4,5}. - _Geoffrey Critzer_, Feb 17 2012
From _John M. Campbell_, Feb 10 2013: (Start)
There are a(5) = 26 bit strings with the pattern 00 and without the pattern 011 of length 5+1:
   000000, 000001, 000010, 000100, 000101, 001000,
   001001, 001010, 010000, 010001, 010010, 010100,
   100000, 100001, 100010, 100100, 100101, 101000, 101001,
   110000, 110001, 110010, 110100, 111000, 111001, 111100.
(End)
		

References

  • J. Riordan, Discordant permutations, Scripta Math., 20 (1954), 14-23.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Right-hand column 4 of triangle A011794.
Cf. A065220.

Programs

  • GAP
    List([0..40], n-> Fibonacci(n+4) -n-3); # G. C. Greubel, Jul 08 2019
  • Haskell
    a001924 n = a001924_list !! n
    a001924_list = drop 3 $ zipWith (-) (tail a000045_list) [0..]
    -- Reinhard Zumkeller, Nov 17 2013
    
  • Magma
    [Fibonacci(n+4)-(n+3): n in [0..40]]; // Vincenzo Librandi, Jun 23 2016
    
  • Maple
    A001924:=-1/(z**2+z-1)/(z-1)**2; # Conjectured by Simon Plouffe in his 1992 dissertation.
    ##
    a:= n-> (<<0|1|0|0>, <0|0|1|0>, <0|0|0|1>, <1|-1|-2|3>>^n.
             <<0, 1, 3, 7>>)[1, 1]:
    seq(a(n), n=0..40);  # Alois P. Heinz, Oct 05 2012
  • Mathematica
    a[n_]:= Fibonacci[n+4] -3-n; Array[a, 40, 0]  (* Robert G. Wilson v *)
    LinearRecurrence[{3,-2,-1,1},{0,1,3,7},40] (* Harvey P. Dale, Jan 24 2015 *)
    Nest[Accumulate,Fibonacci[Range[0,40]],2] (* Harvey P. Dale, Jun 15 2016 *)
  • PARI
    a(n)=fibonacci(n+4)-n-3 \\ Charles R Greathouse IV, Feb 24 2011
    
  • Sage
    [fibonacci(n+4) -n-3 for n in (0..40)] # G. C. Greubel, Jul 08 2019
    

Formula

From Wolfdieter Lang: (Start)
G.f.: x/((1-x-x^2)*(1-x)^2).
Convolution of natural numbers n >= 1 with Fibonacci numbers F(k).
a(n) = Fibonacci(n+4) - (3+n). (End)
From Henry Bottomley, Jan 03 2003: (Start)
a(n) = a(n-1) + a(n-2) + n = a(n-1) + A000071(n+2).
a(n) = A001891(n) - a(n-1) = n + A001891(n-1).
a(n) = A065220(n+4) + 1 = A000126(n+1) - 1. (End)
a(n) = Sum_{k=0..n} Sum_{i=0..k} Fibonacci(i). - Benoit Cloitre, Jan 26 2003
a(n) = (sqrt(5)/2 + 1/2)^n*(7*sqrt(5)/10 + 3/2) + (3/2 - 7*sqrt(5)/10)*(sqrt(5)/2 - 1/2)^n*(-1)^n - n - 3. - Paul Barry, Mar 26 2003
a(n) = Sum_{k=0..n} Fibonacci(k)*(n-k). - Benoit Cloitre, Jun 07 2004
A107909(a(n)) = A000225(n) = 2^n - 1. - Reinhard Zumkeller, May 28 2005
a(n) - a(n-1) = A101220(1,1,n). - Ross La Haye, May 31 2006
F(n) + a(n-3) = A133640(n). - Gary W. Adamson, Sep 19 2007
a(n) = A077880(-3-n) = 2*a(n-1) - a(n-3) + 1. - Michael Somos, Dec 31 2012
INVERT transform is A122595. PSUM transform is A014162. PSUMSIGN transform is A129696. BINOMIAL transform of A039834 with 0,1 prepended is this sequence. - Michael Somos, Dec 31 2012
a(n) = A228074(n+1,3) for n > 1. - Reinhard Zumkeller, Aug 15 2013
a(n) = Sum_{k=0..n} Sum_{i=0..n} i * C(n-k,k-i). - Wesley Ivan Hurt, Sep 21 2017
E.g.f.: exp(x/2)*(15*cosh(sqrt(5)*x/2) + 7*sqrt(5)*sinh(sqrt(5)*x/2))/5 - exp(x)*(3 + x). - Stefano Spezia, Jun 25 2022

Extensions

Description improved by N. J. A. Sloane, Jan 01 1997

A005581 a(n) = (n-1)*n*(n+4)/6.

Original entry on oeis.org

0, 0, 2, 7, 16, 30, 50, 77, 112, 156, 210, 275, 352, 442, 546, 665, 800, 952, 1122, 1311, 1520, 1750, 2002, 2277, 2576, 2900, 3250, 3627, 4032, 4466, 4930, 5425, 5952, 6512, 7106, 7735, 8400, 9102, 9842, 10621, 11440, 12300, 13202, 14147, 15136, 16170
Offset: 0

Views

Author

Keywords

Comments

A class of Boolean functions of n variables and rank 2.
Also, number of inscribable triangles within a (n+4)-gon sharing with them its vertices but not its sides. - Lekraj Beedassy, Nov 14 2003
a(n) = A111808(n,3) for n > 2. - Reinhard Zumkeller, Aug 17 2005
If X is an n-set and Y a fixed 2-subset of X then a(n-2) is equal to the number of (n-3)-subsets of X intersecting Y. - Milan Janjic, Jul 30 2007
The sequence starting with offset 2 = binomial transform of [2, 5, 4, 1, 0, 0, 0, ...]. - Gary W. Adamson, Mar 20 2009
Let I=I_n be the n X n identity matrix and P=P_n be the incidence matrix of the cycle (1,2,3,...,n). Then, for n >= 4, a(n-4) is the number of (0,1) n X n matrices A <= P^(-1) + I + P having exactly two 1's in every row and column with perA=8. - Vladimir Shevelev, Apr 12 2010
Also arises as the number of triples of edges which can be chosen as the cut-points in the "three-opt" heuristic for a traveling salesman problem on (n+4) nodes. - James McDermott, Jul 10 2015
a(n) = risefac(n, 3)/3! - n is for n >= 1 also the number of independent components of a symmetric traceless tensor of rank 3 and dimension n. Here risefac is the rising factorial. - Wolfdieter Lang, Dec 10 2015
For n >= 2, a(n) is the number of characters in a word Q formed by concatenating all 'directed' ( left to right or vice versa), unrearranged subwords, from length 1 to (n-1), of a length (n-1) word q- allowing for the appearance of repeated subwords- and simply inserting an extra character for all subwords thus concatenated. - Christopher Hohl, May 30 2019

Examples

			In hexagon ABCDEF, the "interior" triangles are ACE and BDF, and a(6-4)=a(2)=2. - _Toby Gottfried_, Nov 12 2011
G.f. = 2*x^2 + 7*x^3 + 16*x^4 + 30*x^5 + 50*x^6 + 77*x^7 + 112*x^8 + ...
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), Table 22.7, p. 797.
  • Joseph D. Konhauser, Dan Velleman and Stan Wagon,, Which Way Did the Bicycle Go?, MAA, 1996, p. 177.
  • V. S. Shevelyov (Shevelev), Extension of the Moser class of four-line Latin rectangles, DAN Ukrainy, Vol. 3 (1992), pp. 15-19. - Vladimir Shevelev, Apr 12 2010
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • A. M. Yaglom and I. M. Yaglom, Challenging Mathematical Problems with Elementary Solutions. Vol. I. Combinatorial Analysis and Probability Theory. New York: Dover Publications, Inc., 1987, p. 13, #51 (the case k=3) (First published: San Francisco: Holden-Day, Inc., 1964).

Crossrefs

Programs

Formula

G.f.: (x^2)*(2-x)/(1-x)^4.
a(n) = binomial(n+1, n-2) + binomial(n, n-2).
a(n) = A027907(n, 3), n >= 0 (fourth column of trinomial coefficients). - N. J. A. Sloane, May 16 2003
Convolution of {1, 2, 3, ...} with {2, 3, 4, ...}. - Jon Perry, Jun 25 2003
a(n+2) = 2*te(n) - te(n-1), e.g., a(5) = 2*te(3) - te(2) = 2*20 - 10 = 30, where te(n) are the tetrahedral numbers A000292. - Jon Perry, Jul 23 2003
a(n) is the coefficient of x^3 in the expansion of (1+x+x^2)^n. For example, a(1)=0 since (1+x+x^2)^1=1+x+x^2. - Peter C. Heinig (algorithms(AT)gmx.de), Apr 09 2007
E.g.f.: (x^2 + x^3/6) * exp(x). - Michael Somos, Apr 13 2007
a(n) = - A005586(-4-n) for all n in Z. - Michael Somos, Apr 13 2007
a(n) = C(4+n,3)-(n+4)*(n+1), since C(4+n,3) = number of all triangles in (n+4)-gon, and (n+4)*(n+1)=number of triangles with at least one of the edges included. Example: n=0,in a square, all 4 possible triangles include some of the square's edges and C(4+n,3)-(n+4)*(n+1)=4-4*1=0 = number of other triangles = a(0). - Toby Gottfried, Nov 12 2011
a(n) = 2*binomial(n,2) + binomial(n,3). - Vladimir Shevelev and Peter J. C. Moses, Jun 22 2012
a(0)=0, a(1)=0, a(2)=2, a(3)=7, a(n)=4*a(n-1)-6*a(n-2)+4*a(n-3)-a(n-4). - Harvey P. Dale, Sep 22 2012
a(n) = A000292(n-1) + A000217(n-1) for all n in Z. - Michael Somos, Jul 29 2015
a(n+2) = -A127672(6+n, n), n >= 0, with A127672 giving the coefficients of Chebyshev's C polynomials. See the Abramowitz-Stegun reference. - Wolfdieter Lang, Dec 10 2015
a(n) = GegenbauerC(N, -n, -1/2) where N = 3 if 3Peter Luschny, May 10 2016
From Amiram Eldar, Jan 09 2022: (Start)
Sum_{n>=2} 1/a(n) = 163/200.
Sum_{n>=2} (-1)^n/a(n) = 12*log(2)/5 - 253/200. (End)

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Jun 01 2000

A008305 Triangle read by rows: a(n,k) = number of permutations of [n] allowing i->i+j (mod n), j=0..k-1.

Original entry on oeis.org

1, 1, 2, 1, 2, 6, 1, 2, 9, 24, 1, 2, 13, 44, 120, 1, 2, 20, 80, 265, 720, 1, 2, 31, 144, 579, 1854, 5040, 1, 2, 49, 264, 1265, 4738, 14833, 40320, 1, 2, 78, 484, 2783, 12072, 43387, 133496, 362880, 1, 2, 125, 888, 6208, 30818, 126565, 439792, 1334961, 3628800
Offset: 1

Views

Author

Keywords

Comments

The point is, we are counting permutations of [n] = {1,2,...,n} with the restriction that i cannot move by more than k places. Hence the phrase "permutations with restricted displacements". - N. J. A. Sloane, Mar 07 2014
The triangle could have been defined as an infinite square array by setting a(n,k) = n! for k >= n.

Examples

			a(4,3) = 9 because 9 permutations of {1,2,3,4} are allowed if each i can be placed on 3 positions i+0, i+1, i+2 (mod 4): 1234, 1423, 1432, 3124, 3214, 3412, 4123, 4132, 4213.
Triangle begins:
  1,
  1, 2,
  1, 2,   6,
  1, 2,   9,  24,
  1, 2,  13,  44,  120,
  1, 2,  20,  80,  265,   720,
  1, 2,  31, 144,  579,  1854,   5040,
  1, 2,  49, 264, 1265,  4738,  14833,  40320,
  1, 2,  78, 484, 2783, 12072,  43387, 133496,  362880,
  1, 2, 125, 888, 6208, 30818, 126565, 439792, 1334961, 3628800,
  ...
		

References

  • H. Minc, Permanents, Encyc. Math. #6, 1978, p. 48

Crossrefs

Diagonals (from the right): A000142, A000166, A000179, A000183, A004307, A189389, A184965.
Diagonals (from the left): A000211 or A048162, 4*A000382 or A004306 or A000803, A000804, A000805.
a(n,ceiling(n/2)) gives A306738.

Programs

  • Maple
    with(LinearAlgebra):
    a:= (n, k)-> Permanent(Matrix(n,
                 (i, j)-> `if`(0<=j-i and j-i
    				
  • Mathematica
    a[n_, k_] := Permanent[Table[If[0 <= j-i && j-i < k || j-i < k-n, 1, 0], {i, 1,n}, {j, 1, n}]]; Table[Table[a[n, k], {k, 1, n}], {n, 1, 10}] // Flatten (* Jean-François Alcover, Mar 10 2014, after Alois P. Heinz *)

Formula

a(n,k) = per(sum(P^j, j=0..k-1)), where P is n X n, P[ i, i+1 (mod n) ]=1, 0's otherwise.
a(n,n) - a(n,n-1) = A002467(n). - Alois P. Heinz, Mar 06 2019

Extensions

Comments and more terms from Len Smiley
More terms from Vladeta Jovovic, Oct 02 2003
Edited by Alois P. Heinz, Dec 18 2010

A000183 Number of discordant permutations of length n.

Original entry on oeis.org

0, 0, 0, 1, 2, 20, 144, 1265, 12072, 126565, 1445100, 17875140, 238282730, 3407118041, 52034548064, 845569542593, 14570246018686, 265397214435860, 5095853023109484, 102877234050493609, 2178674876680100744, 48296053720501168037, 1118480911876659396600
Offset: 1

Views

Author

Keywords

Comments

Ways to reseat n diners at circular table, none in or next to original chair.

Examples

			a(5) = 2: [ 1 2 3 4 5 ] -> [ 3 4 5 1 2 ] or [ 4 5 1 2 3 ].
Let n=7. Then, using the previous values of a(n), we have a(7) = -(4*7+31) + (7/6)*(8*20-2*20) - (14/5)*(4*2-13) + (7/4)*(2*1+2*9) + (7/3)*6 = -59+140+14+35+14 = 144. - _Vladimir Shevelev_, Apr 17 2011
		

References

  • J. Riordan, Discordant permutations, Scripta Math., 20 (1954), 14-23.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • R. P. Stanley, Enumerative Combinatorics I, Example 4.7.17.
  • K. Yamamoto, Structure polynomial of Latin rectangles and its application to a combinatorial problem, Memoirs of the Faculty of Science, Kyusyu University, Series A, 10 (1956), 1-13.

Crossrefs

Programs

  • Maple
    with(combinat): f:= n-> fibonacci(n-1) +fibonacci(n+1) +2:
    a:= proc(n) option remember; `if` (n<7, [0$3, 1, 2, 20][n], (-1)^n*(4*n+f(n)) +(n/(n-1))*((n+1)*a(n-1) +2*(-1)^n*f(n-1)) -((2*n)/(n-2))*((n-3)*a(n-2) +(-1)^n*f(n-2)) +(n/(n-3))*((n-5)*a(n-3) +2*(-1)^(n-1)*f(n-3)) +(n/(n-4))*(a(n-4) +(-1)^(n-1)*f(n-4))) end:
    seq(a(n), n=1..30);  # Alois P. Heinz, Apr 19 2011
  • Mathematica
    max = 22; f[x_, y_] := y*(1 + 3*x - 4*x^2*y - 3*x^2*y^2 - 3*x^3*y^2 + 4*x^4*y^3)/((1 - y - 2*x*y - x*y^2 + x^3*y^3)*(1 - x*y)); se = Series[f[x, y], {x, 0, max}, {y, 0, max}];coes = CoefficientList[se, {x, y}] ;t[n_, k_] := coes[[k, n]]; a[n_] := Sum[ (-1)^(k+1)*(n-k+1)!*t[n+1, k], {k, 1, n+1}]; a[1] = a[2] = a[3] = 0; Table[a[n], {n, 1, max}] (* Jean-François Alcover, Oct 24 2011 *)
    Flatten[{0,0,RecurrenceTable[{(382-1142 n+712 n^2-185 n^3+22 n^4-n^5) a[-7+n]+(-3776+11024 n-7689 n^2+2397 n^3-384 n^4+31 n^5-n^6) a[-6+n]+(7394-18064 n+12353 n^2-3937 n^3+661 n^4-57 n^5+2 n^6) a[-5+n]+(1452-10548 n+8254 n^2-2655 n^3+423 n^4-33 n^5+n^6) a[-4+n]+(-11046+26716 n-18588 n^2+6013 n^3-1015 n^4+87 n^5-3 n^6) a[-3+n]+(632+5546 n-3888 n^2+1007 n^3-116 n^4+5 n^5) a[-2+n]+(3966-4666 n+3655 n^2-1445 n^3+284 n^4-27 n^5+n^6) a[-1+n]+(2444-3214 n+1409 n^2-283 n^3+27 n^4-n^5) a[n]==0,a[8]==1265,a[9]==12072,a[3]==0,a[4]==1,a[5]==2,a[6]==20,a[7]==144},a,{n,3,20}]}] (* Vaclav Kotesovec, Aug 10 2013 *)

Formula

a(n) = Sum_{m=0..n} (-1)^m*(n-m)!*A061702(n, m), n>2.
From Vladimir Shevelev, Apr 17 2011: (Start)
Let f(n) = F(n-1) + F(n+1) + 2, where F(n) is the n-th Fibonacci number.
Then, for n>=7, we have the recursion:
a(n) = (-1)^n*(4*n+f(n)) + (n/(n-1))*((n+1)*a(n-1) + 2*(-1)^n*f(n-1)) - ((2*n)/(n-2))*((n-3)*a(n-2) + (-1)^n*f(n-2)) + (n/(n-3))*((n-5)*a(n-3) + 2*(-1)^(n-1)*f(n-3)) + (n/(n-4))*(a(n-4) + (-1)^(n-1)*f(n-4)).
This formula (in an equivalent form) is due to K. Yamamoto. (End)
a(n) ~ n!*exp(-3). - Vaclav Kotesovec, Aug 10 2013

Extensions

More terms from Vladeta Jovovic, Jun 18 2001

A351712 Numbers whose minimal (or greedy) Lucas representation (A130310) is palindromic.

Original entry on oeis.org

0, 2, 6, 9, 13, 20, 24, 31, 49, 56, 64, 78, 100, 125, 136, 150, 158, 169, 201, 237, 252, 324, 342, 364, 378, 396, 404, 422, 444, 523, 581, 606, 650, 708, 845, 874, 910, 932, 961, 975, 1004, 1040, 1048, 1077, 1113, 1135, 1164, 1366, 1460, 1500, 1572, 1666, 1692, 1786
Offset: 1

Views

Author

Amiram Eldar, Feb 17 2022

Keywords

Comments

A000211(n) = Lucas(n) + 2 is a term for all n > 2, since the representation of Lucas(n) + 2 is 10...01 with n-1 0's between the two 1's.

Examples

			The first 10 terms are:
   n  a(n) A130310(a(n))
   ---------------------
   1   0               0
   2   2               1
   3   6            1001
   4   9           10001
   5  13          100001
   6  20         1000001
   7  24         1001001
   8  31        10000001
   9  49       100000001
  10  56       100010001
		

Crossrefs

Subsequence of A054770.
Similar sequences: A002113, A006995, A014190, A094202, A331191, A351717.

Programs

  • Mathematica
    lucasPalQ[n_] := Module[{s = {}, m = n, k = 1}, While[m > 0, If[m == 1, k = 1; AppendTo[s, k]; m = 0, If[m == 2, k = 0; AppendTo[s, k]; m = 0, While[LucasL[k] <= m, k++]; k--; AppendTo[s, k]; m -= LucasL[k]; k = 1]]]; PalindromeQ[IntegerDigits[Total[2^s], 2]]]; Select[Range[0, 2000], lucasPalQ]

A005582 a(n) = n*(n+1)*(n+2)*(n+7)/24.

Original entry on oeis.org

0, 2, 9, 25, 55, 105, 182, 294, 450, 660, 935, 1287, 1729, 2275, 2940, 3740, 4692, 5814, 7125, 8645, 10395, 12397, 14674, 17250, 20150, 23400, 27027, 31059, 35525, 40455, 45880, 51832, 58344, 65450, 73185, 81585, 90687, 100529, 111150, 122590, 134890
Offset: 0

Views

Author

Keywords

Comments

a(n) = number of Dyck (n+2)-paths with exactly 2 rows of peaks. A row of peaks is a maximal sequence of peaks all at the same height and 2 units apart. For example, UDUDUD ( = /\/\/\ ) contains exactly one row of peaks, as does UUUDDD, but UDUUDDUD has three and a(1)=2 counts UDUUDD, UUDDUD. - David Callan, Mar 02 2005
If X is an n-set and Y a fixed 2-subset of X then a(n-4) is equal to the number of (n-4)-subsets of X intersecting Y. - Milan Janjic, Jul 30 2007
Let I=I_n be the n X n identity matrix and P=P_n be the incidence matrix of the cycle (1,2,3,...,n). Then, for n>=7, a(n-7) is the number of (0,1) n X n matrices A<=P^(-1)+I+P having exactly two 1's in every row and column with perA=16. - Vladimir Shevelev, Apr 12 2010
Row 2 of the convolution array A213550. - Clark Kimberling, Jun 20 2012
a(n-1) = risefac(n, 4)/4! - risefac(n, 2)/2! is for n >= 1 also the number of independent components of a symmetric traceless tensor of rank 4 and dimension n. Here risefac is the rising factorial. - Wolfdieter Lang, Dec 10 2015
Consider the array formed by the second polygonal numbers of increasing rank:
A000217(-1-n): 0, 1, 3, 6, 10, 15, ...
A000270(-1-n): 1, 4, 9, 16, 25, 36, ...
A000326(-1-n): 2, 7, 15, 26, 40, 57, ...
A000384(-1-n): 3, 10, 21, 36, 55, 78, ...
Then the antidiagonal sums yield this sequence. - Michael Somos, Nov 23 2021

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), Table 22.7, p. 797.
  • Vladimir S. Shevelyov (Shevelev), Extension of the Moser class of four-line Latin rectangles, DAN Ukrainy, 3(1992),15-19. [From Vladimir Shevelev, Apr 12 2010]
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • A. M. Yaglom and I. M. Yaglom: Challenging Mathematical Problems with Elementary Solutions. Vol. I. Combinatorial Analysis and Probability Theory. New York: Dover Publications, Inc., 1987, p. 13, #51 (the case k=4) (First published: San Francisco: Holden-Day, Inc., 1964)

Crossrefs

Partial sums of A005581.

Programs

  • Maple
    [seq(binomial(n,4)+2*binomial(n,3), n=2..43)]; # Zerinvary Lajos, Jul 26 2006
    seq((n+4)*binomial(n,4)/n, n=3..43); # Zerinvary Lajos, Feb 28 2007
    A005582:=(-2+z)/(z-1)**5; # conjectured by Simon Plouffe in his 1992 dissertation
  • Mathematica
    Table[n(n+1)(n+2)(n+7)/24,{n,0,40}] (* Harvey P. Dale, Jun 01 2012 *)
  • PARI
    concat(0, Vec(x*(2-x)/(1-x)^5 + O(x^100))) \\ Altug Alkan, Dec 10 2015

Formula

a(n) = binomial(n+3, n-1) + binomial(n+2, n-1).
a(n) = binomial(n,4) + 2*binomial(n,3), n>=2. - Zerinvary Lajos, Jul 26 2006
From Colin Barker, Jan 28 2012: (Start)
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5).
G.f.: x*(2-x)/(1-x)^5. (End)
a(n) = Sum_{k=1..n} ( Sum_{i=1..k} i(n-k+2) ). - Wesley Ivan Hurt, Sep 26 2013
a(n+1) = A127672(8+n, n), n >= 0, with the Chebyshev C-polynomial coefficients A127672(n, k). See the Abramowitz-Stegun reference. - Wolfdieter Lang, Dec 10 2015
E.g.f.: (1/24)*x*(48 + 60*x + 16*x^2 + x^3)*exp(x). - G. C. Greubel, Jul 01 2017
Sum_{n>=1} 1/a(n) = 853/1225. - Amiram Eldar, Jan 02 2021
a(n) = A005587(-7-n) for all n in Z. - Michael Somos, Nov 23 2021

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Jun 01 2000

A176222 a(n) = (n^2 - 3*n + 1 + (-1)^n)/2.

Original entry on oeis.org

0, 3, 5, 10, 14, 21, 27, 36, 44, 55, 65, 78, 90, 105, 119, 136, 152, 171, 189, 210, 230, 253, 275, 300, 324, 351, 377, 406, 434, 465, 495, 528, 560, 595, 629, 666, 702, 741, 779, 820, 860, 903, 945, 990, 1034, 1081, 1127, 1176, 1224, 1275, 1325, 1378, 1430
Offset: 3

Views

Author

Vladimir Shevelev, Apr 12 2010

Keywords

Comments

Let I = I_n be the n X n identity matrix and P = P_n be the incidence matrix of the cycle (1,2,3,...,n).
Let T = P^(-1)+I+P.
11000...01
11100....0
01110.....
00111.....
..........
00.....111
10.....011
Then a(n) is the number of (0,1) n X n matrices A <= T (i.e., an element of A can be 1 only if T has a 1 at this place) having exactly two 1's in every row and column with per(A) = 4.
a(n) is the maximum number m such that m white kings and m black kings can coexist on an n+1 X n+1 chessboard without attacking each other. - Aaron Khan, Jul 05 2022

Examples

			For n=5 the reference matrix is:
  11001
  11100
  01110
  00111
  10011
There are 2^(3*n) = 32768 0-1 matrices obtained from removing one or more 1's in it.
There are 305 such matrices with permanent 4 and there are 13 such matrices with exactly two 1's in every column and every row.
There are 5 matrices having both properties. One of them is:
  10001
  01100
  01100
  00011
  10010
From _Aaron Khan_, Jul 05 2022: (Start)
Examples of the sequence when used for kings on a chessboard:
.
A solution illustrating a(2)=3:
  +-------+
  | B B B |
  | . . . |
  | W W W |
  +-------+
.
A solution illustrating a(3)=5:
  +---------+
  | B B B B |
  | B . . . |
  | . . . W |
  | W W W W |
  +---------+
(End)
		

References

  • V. S. Shevelyov (Shevelev), Extension of the Moser class of four-line Latin rectangles, DAN Ukrainy, 3 (1992), 15-19.

Crossrefs

Cf. A000211, A052928, A128209, A250000 (queens on a chessboard), A002620 (rooks on a chessboard), A355509 (knights on a chessboard).

Programs

  • Magma
    [(n^2-3*n+1+(-1)^n)/2: n in [3..100]]; // Vincenzo Librandi, Mar 24 2011
    
  • Maple
    A176222:=n->(n^2-3*n+1+(-1)^n)/2: seq(A176222(n), n=3..100); # Wesley Ivan Hurt, May 25 2015
  • Mathematica
    Table[(n^2 - 3*n + 1 + (-1)^n)/2, {n, 3, 100}] (* or *) CoefficientList[Series[x (x - 3)/((1 + x)*(x - 1)^3), {x, 0, 30}], x] (* Wesley Ivan Hurt, May 25 2015 *)
    LinearRecurrence[{2,0,-2,1},{0,3,5,10},90] (* Harvey P. Dale, Jan 14 2024 *)
  • PARI
    a(n)=(n^2-3*n+1+(-1)^n)/2 \\ Charles R Greathouse IV, Oct 16 2015
    
  • Sage
    [n*(n-3)/2 + ((n+1)%2) for n in (3..60)] # G. C. Greubel, Mar 22 2022

Formula

a(n) = (n - t(n))*(n - 3 + t(n))/2, where t(n) = 1-(n mod 2).
G.f.: x^4*(3-x)/( (1+x)*(1-x)^3 ). - R. J. Mathar, Mar 06 2011
From Bruno Berselli, Sep 13 2011: (Start)
a(n) + a(n+1) = A005563(n-2).
a(-n) = A084265(n). (End)
a(n) = 1 -2*n +floor(n/2) +floor(n^2/2). - Wesley Ivan Hurt, Jun 14 2013
From Wesley Ivan Hurt, May 25 2015: (Start)
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4), n>4.
a(n) = Sum_{i=(-1)^n..n-2} i. (End)
a(n) = A174239(n-2) * A174239(n-1). - Paul Curtz, Jul 17 2017
With offset 0, this is ceiling(n/2)*(2*floor(n/2)+3). - N. J. A. Sloane, Jan 16 2020
E.g.f.: (1/2)*((1-x)*exp(x/2) - exp(-x/2))^2. - G. C. Greubel, Mar 22 2022

Extensions

Matrix class definition checked, edited and illustrated by Olivier Gérard, Mar 26 2011

A000388 Number of permutations of an n-sequence discordant with three given permutations (see reference) in n-2 places.

Original entry on oeis.org

6, 20, 180, 1106, 9292, 82980, 831545, 9139482, 109595496, 1423490744, 19911182207, 298408841160, 4770598226296, 81037124739588, 1457607971046492, 27675791180024802, 553166885187641670, 11609691036091870428, 255273744004170486155, 5868308906885934514178
Offset: 4

Views

Author

Keywords

References

  • J. Riordan, Discordant permutations, Scripta Math., 20 (1954), 14-23.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Maple
    seq(f(n,2), n=5..30); # code for f(n,k) is given in A000440 - Barbara Haas Margolius (margolius(AT)math.csuohio.edu), Feb 17 2001
  • Mathematica
    sigma[t_, u_] = (1 - 2 t^2 (u^2) - 2 t^2 (1 + t) u^3 + 3 t^4 (u^4)) (1 - t* u)^(-1) (1 - (1 + 2 t) u - t *u^2 + t^3 (u^3))^(-1); ds[t_, n_] := D[sigma[t, u], {u, n}] /. u -> 0; su[n_] := su[n] = Sum[ Coefficient[ds[t, n]/n!, t, j]*(n - j)!*(y - 1)^j, {j, 0, n}]; f[n_, k_] := Coefficient[su[n], y, k]; Table[f[n, 2], {n, 4, 23}] (* Jean-François Alcover, Sep 01 2011, after Maple prog. *)

Formula

a(n) = coefficient of y^2 in sum_0^n sigma_{n, k}(n - k)!(y - 1)^k on y where the sigma_{n, k} have generating function sigma(t, u) = (1 - 2t^2(u^2) - 2t^2(1 + t)u^3 + 3t^4(u^4))(1 - tu)^(-1)(1 - (1 + 2t)u - tu^2 + t^3(u^3))^(-1). - Barbara Haas Margolius (margolius(AT)math.csuohio.edu), Feb 17 2001

Extensions

More terms from Barbara Haas Margolius (margolius(AT)math.csuohio.edu), Feb 17 2001

A000380 Number of permutations of an n-sequence discordant with three given permutations (see reference) in n-3 places.

Original entry on oeis.org

6, 8, 40, 176, 1421, 10352, 93114, 912920, 9929997, 117970704, 1521176826, 21150414880, 315400444070, 5020920314016, 84979755347122, 1523710321272384, 28851091193764023, 575253584489378040, 12047084261153160394, 264377395040950523112, 6066972656940255290199
Offset: 3

Views

Author

Keywords

References

  • J. Riordan, Discordant permutations, Scripta Math., 20 (1954), 14-23.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Maple
    seq(f(n,3), n=3..30); # code for f(n,k) is given in A000440 - Barbara Haas Margolius (margolius(AT)math.csuohio.edu), Feb 17 2001
  • Mathematica
    sigma[t_, u_] = (1 - 2 t^2 (u^2) - 2 t^2 (1 + t) u^3 + 3 t^4 (u^4)) (1 - t* u)^(-1) (1 - (1 + 2 t) u - t *u^2 + t^3 (u^3))^(-1); ds[t_, n_] := D[sigma[t, u], {u, n}] /. u -> 0; su[n_] := su[n] = Sum[ Coefficient[ds[t, n]/n!, t, j]*(n - j)!*(y - 1)^j, {j, 0, n}]; f[n_, k_] := Coefficient[su[n], y, k]; Table[f[n, 3], {n, 3, 23}] (* Jean-François Alcover, Sep 01 2011, after Maple prog. *)

Formula

a(n) = coefficient of y^3 in sum_0^n sigma_{n, k}(n - k)!(y - 1)^k on y where the sigma_{n, k} have generating function sigma(t, u) = (1 - 2t^2(u^2) - 2t^2(1 + t)u^3 + 3t^4(u^4))(1 - tu)^(-1)(1 - (1 + 2t)u - tu^2 + t^3(u^3))^(-1). - Barbara Haas Margolius (margolius(AT)math.csuohio.edu), Feb 17 2001

Extensions

More terms from Barbara Haas Margolius (margolius(AT)math.csuohio.edu), Feb 17 2001
Showing 1-10 of 27 results. Next