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.

Previous Showing 11-20 of 34 results. Next

A230176 T(n,k)=Number of nXk 0..2 arrays x(i,j) with each element horizontally, vertically, diagonally or antidiagonally next to at least one element with value 2-x(i,j).

Original entry on oeis.org

0, 3, 3, 3, 27, 3, 9, 193, 193, 9, 15, 1407, 3787, 1407, 15, 33, 10211, 78849, 78849, 10211, 33, 63, 73417, 1637019, 4722977, 1637019, 73417, 63, 129, 530771, 33908253, 284444079, 284444079, 33908253, 530771, 129, 255, 3841171, 704822331
Offset: 1

Views

Author

R. H. Hardin, Oct 11 2013

Keywords

Comments

Table starts
...0.......3...........3..............9.................15
...3......27.........193...........1407..............10211
...3.....193........3787..........78849............1637019
...9....1407.......78849........4722977..........284444079
..15...10211.....1637019......284444079........49754476927
..33...73417....33908253....17072965263......8666440899433
..63..530771...704822331..1027868078181...1514677019365483
.129.3841171.14643857893.61861526624839.264644708761844781

Examples

			Some solutions for n=3 k=4
..1..1..0..1....0..2..1..1....2..1..2..0....2..0..1..2....1..1..2..0
..0..0..1..2....0..0..2..1....0..0..1..0....1..1..0..1....0..1..1..2
..2..1..1..0....0..2..0..0....2..0..1..1....0..2..1..1....1..2..1..1
		

Crossrefs

Column 1 is A062510(n-1)

Formula

Empirical for column k:
k=1: a(n) = a(n-1) +2*a(n-2)
k=2: a(n) = 6*a(n-1) -2*a(n-2) +67*a(n-3) +62*a(n-4) +160*a(n-5) +40*a(n-6) +16*a(n-7)
k=3: [order 26] for n>27
k=4: [order 81] for n>82

A229934 T(n,k) = Number of n X k 0..2 arrays x(i,j) with each element horizontally, vertically or antidiagonally next to at least one element with value 2-x(i,j).

Original entry on oeis.org

0, 3, 3, 3, 19, 3, 9, 115, 115, 9, 15, 739, 1889, 739, 15, 33, 4679, 33119, 33119, 4679, 33, 63, 29569, 575757, 1622763, 575757, 29569, 63, 129, 187211, 10015447, 78416265, 78416265, 10015447, 187211, 129, 255, 1185283, 174306687, 3788842363
Offset: 1

Views

Author

R. H. Hardin, Oct 04 2013

Keywords

Comments

Table starts
...0.......3..........3.............9................15...................33
...3......19........115...........739..............4679................29569
...3.....115.......1889.........33119............575757.............10015447
...9.....739......33119.......1622763..........78416265...........3788842363
..15....4679.....575757......78416265.......10521395805........1411363459757
..33...29569...10015447....3788842363.....1411363459757......525542853634783
..63..187211..174306687..183213209145...189537122520529...195955071996200947
.129.1185283.3033162257.8859387292449.25452175156264451.73057913024557581941

Examples

			Some solutions for n=3, k=4
..0..2..2..0....2..2..0..2....2..0..0..0....2..0..2..1....0..2..1..1
..2..0..0..2....0..0..0..1....2..2..2..0....2..1..1..1....2..1..0..2
..0..1..1..1....2..0..1..1....0..2..2..0....0..2..2..0....1..0..2..0
		

Crossrefs

Column 1 is A062510(n-1).

Formula

Empirical for column k:
k=1: a(n) = a(n-1) +2*a(n-2);
k=2: [order 13];
k=3: [order 49] for n>50.

A230652 T(n,k)=Number of nXk 0..2 white square subarrays x(i,j) with each element diagonally or antidiagonally next to at least one element with value 2-x(i,j).

Original entry on oeis.org

0, 0, 0, 0, 3, 0, 0, 3, 3, 0, 0, 9, 3, 9, 0, 0, 15, 21, 21, 15, 0, 0, 33, 27, 123, 27, 33, 0, 0, 63, 177, 531, 531, 177, 63, 0, 0, 129, 231, 2547, 1635, 2547, 231, 129, 0, 0, 255, 1509, 11745, 28161, 28161, 11745, 1509, 255, 0, 0, 513, 1971, 54957, 90393, 337977, 90393
Offset: 1

Views

Author

R. H. Hardin, Oct 27 2013

Keywords

Comments

Table starts
.0...0....0.....0.......0........0..........0...........0.............0
.0...3....3.....9......15.......33.........63.........129...........255
.0...3....3....21......27......177........231........1509..........1971
.0...9...21...123.....531.....2547......11745.......54957........255753
.0..15...27...531....1635....28161......90393.....1539207.......4956927
.0..33..177..2547...28161...337977....3951657....46564959.....547445439
.0..63..231.11745...90393..3951657...31908483..1374288243...11150938215
.0.129.1509.54957.1539207.46564959.1374288243.40860127671.1212230763441

Examples

			Some solutions for n=5 k=4
..2..x..2..x....0..x..0..x....1..x..0..x....0..x..0..x....1..x..0..x
..x..0..x..0....x..2..x..2....x..1..x..2....x..2..x..2....x..1..x..2
..0..x..2..x....0..x..1..x....1..x..1..x....0..x..0..x....1..x..0..x
..x..2..x..2....x..0..x..1....x..2..x..0....x..1..x..0....x..1..x..2
..0..x..0..x....2..x..2..x....0..x..2..x....1..x..2..x....1..x..1..x
		

Crossrefs

Column 2 is A062510(n-1)

Formula

Empirical for column k:
k=1: a(n) = a(n-1)
k=2: a(n) = a(n-1) +2*a(n-2)
k=3: a(n) = 9*a(n-2) -4*a(n-4)
k=4: a(n) = 3*a(n-1) +8*a(n-2) -a(n-3) -a(n-4) for n>5
k=5: a(n) = 59*a(n-2) -230*a(n-4) -2*a(n-6) +32*a(n-8) for n>11
k=6: [order 23] for n>24
k=7: [order 46] for n>47

A052531 If n is even then 2^n+1 otherwise 2^n.

Original entry on oeis.org

2, 2, 5, 8, 17, 32, 65, 128, 257, 512, 1025, 2048, 4097, 8192, 16385, 32768, 65537, 131072, 262145, 524288, 1048577, 2097152, 4194305, 8388608, 16777217, 33554432, 67108865, 134217728, 268435457, 536870912, 1073741825, 2147483648
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Crossrefs

Programs

  • GAP
    a:=[2,2,5];; for n in [4..40] do a[n]:=2*a[n-1]+a[n-2]-2*a[n-3]; od; a; # G. C. Greubel, May 09 2019
  • Magma
    [2^n + (1+(-1)^n)/2: n in [0..30]]; // G. C. Greubel, May 09 2019
    
  • Maple
    spec:= [S,{S=Union(Sequence(Union(Z,Z)),Sequence(Prod(Z,Z)))},unlabeled]: seq(combstruct[count](spec,size=n), n=0..20);
    seq(2^n + (1+(-1)^n)/2, n=0..30); # G. C. Greubel, Oct 17 2019
  • Mathematica
    2^# + (1 - Mod[#, 2]) & /@ Range[0, 40] (* Peter Pein, Jan 11 2008 *)
    Table[If[EvenQ[n], 2^n + 1, 2^n], {n, 0, 40}] (* Vladimir Joseph Stephan Orlovsky, Feb 07 2010, modified by G. C. Greubel, May 09 2019 *)
    Table[2^n + Boole[EvenQ[n]], {n, 0, 31}] (* Alonso del Arte, May 09 2019 *)
  • PARI
    my(x='x+O('x^40)); Vec((2-2*x-x^2)/((1-x^2)*(1-2*x))) \\ G. C. Greubel, May 09 2019
    
  • PARI
    a(n) = 1<David A. Corneth, Oct 18 2019
    
  • Sage
    [2^n + (1+(-1)^n)/2 for n in (0..30)] # G. C. Greubel, May 09 2019
    

Formula

G.f.: (2 - 2*x - x^2)/( (1-x^2)*(1-2*x) ).
a(n) = a(n-1) + 2*a(n-2) - 1, with a(0) = 2, a(1) = 2, a(2) = 5.
a(n) = 2^n + Sum_{alpha = RootOf(-1+x^2)} alpha^(-n)/2.
a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3), with a(0) = 2, a(1) = 2, a(2) = 5. - G. C. Greubel, May 09 2019
a(n) = 2^n + (1 + (-1)^n)/2. - G. C. Greubel, Oct 17 2019
E.g.f.: exp(2*x) + cosh(x). - Stefano Spezia, Oct 18 2019

Extensions

More terms from James Sellers, Jun 05 2000
Better definition from Peter Pein (petsie(AT)dordos.net), Jan 11 2008

A230661 T(n,k)=Number of nXk 0..2 black square subarrays x(i,j) with each element diagonally or antidiagonally next to at least one element with value 2-x(i,j).

Original entry on oeis.org

1, 0, 0, 0, 3, 0, 0, 3, 3, 0, 0, 9, 15, 9, 0, 0, 15, 21, 21, 15, 0, 0, 33, 135, 123, 135, 33, 0, 0, 63, 177, 531, 531, 177, 63, 0, 0, 129, 1155, 2547, 8613, 2547, 1155, 129, 0, 0, 255, 1509, 11745, 28161, 28161, 11745, 1509, 255, 0, 0, 513, 9855, 54957, 477279, 337977
Offset: 1

Views

Author

R. H. Hardin, Oct 27 2013

Keywords

Comments

Table starts
.1...0....0.....0.......0........0..........0...........0.............0
.0...3....3.....9......15.......33.........63.........129...........255
.0...3...15....21.....135......177.......1155........1509..........9855
.0...9...21...123.....531.....2547......11745.......54957........255753
.0..15..135...531....8613....28161.....477279.....1539207......26178201
.0..33..177..2547...28161...337977....3951657....46564959.....547445439
.0..63.1155.11745..477279..3951657..169006665..1374288243...59075291211
.0.129.1509.54957.1539207.46564959.1374288243.40860127671.1212230763441

Examples

			Some solutions for n=5 k=4
..x..0..x..1....x..1..x..0....x..2..x..2....x..2..x..1....x..2..x..2
..2..x..1..x....1..x..2..x....2..x..0..x....0..x..1..x....0..x..0..x
..x..2..x..1....x..0..x..0....x..0..x..0....x..0..x..2....x..1..x..0
..0..x..0..x....2..x..0..x....0..x..2..x....2..x..0..x....1..x..2..x
..x..2..x..2....x..0..x..2....x..2..x..0....x..0..x..2....x..1..x..0
		

Crossrefs

Column 2 is A062510(n-1)
Column 4 is A230648
Column 6 is A230650

Formula

Empirical for column k:
k=1: a(n) = a(n-1) for n>1
k=2: a(n) = a(n-1) +2*a(n-2)
k=3: a(n) = 9*a(n-2) -4*a(n-4)
k=4: a(n) = 3*a(n-1) +8*a(n-2) -a(n-3) -a(n-4) for n>5
k=5: a(n) = 59*a(n-2) -230*a(n-4) -2*a(n-6) +32*a(n-8) for n>10
k=6: [order 23] for n>24
k=7: [order 46] for n>47

A140360 Inverse binomial transform of A140359.

Original entry on oeis.org

1, 0, 5, -5, 15, -25, 55, -105, 215, -425, 855, -1705, 3415, -6825, 13655, -27305, 54615, -109225, 218455, -436905, 873815, -1747625, 3495255, -6990505, 13981015, -27962025, 55924055, -111848105, 223696215, -447392425, 894784855, -1789569705, 3579139415
Offset: 0

Views

Author

Paul Curtz, Jun 24 2008

Keywords

Comments

For p*Jacobsthal numbers A001045, p=2: A078008 (A001045 differences, they are companions) or 1, 2*A001045(n), also in A133494; p=3: A062510; p=4: see A097073; p=6: A092297.

Programs

  • Maple
    a:= n-> `if`(n=0, 1, (<<0|1>, <2|-1>>^(n-1). <<0,5>>)[1,1]):
    seq(a(n), n=0..30);  # Alois P. Heinz, Dec 28 2010
  • Mathematica
    {1}~Join~Table[(-5 (-1 + (-2)^(n - 1)))/3, {n, 32}] (* or *)
    CoefficientList[Series[(-3 x^2 - x - 1)/(2 x^2 - x - 1), {x, 0, 32}], x] (* Michael De Vlieger, Apr 15 2016 *)

Formula

G.f.: (-3*x^2-x-1) / (2*x^2-x-1).
a(n) = (-5*(-1 + (-2)^(n-1)))/3, for n>0. - Andres Cicuttin, Apr 15 2016
a(n) = 5 - 2*a(n-1), for n>2. - Andres Cicuttin, Apr 15 2016

Extensions

More terms from Alois P. Heinz, Dec 28 2010

A141023 a(n) = 2^n - (3-(-1)^n)/2.

Original entry on oeis.org

0, 0, 3, 6, 15, 30, 63, 126, 255, 510, 1023, 2046, 4095, 8190, 16383, 32766, 65535, 131070, 262143, 524286, 1048575, 2097150, 4194303, 8388606, 16777215, 33554430, 67108863, 134217726, 268435455, 536870910, 1073741823, 2147483646, 4294967295, 8589934590, 17179869183
Offset: 0

Views

Author

Paul Curtz, Jul 29 2008

Keywords

Crossrefs

Cf. A062510 (first differences).

Programs

  • Magma
    [2^n -(3-(-1)^n)/2: n in [0..40]]; // Vincenzo Librandi, Aug 08 2011
    
  • Mathematica
    Range[0,20]! CoefficientList[Series[D[(Cosh[x]-1)(Exp[x]-1), x], {x,0,20}], x]  (* Geoffrey Critzer, Dec 03 2011 *)
    LinearRecurrence[{2, 1, -2}, {0, 0, 3}, 60] (* Vladimir Joseph Stephan Orlovsky, Feb 14 2012 *)
    Table[2^n - (3 - (-1)^n)/2, {n, 0, 34}] (* Alonso del Arte, Feb 14 2012 *)
  • PARI
    x='x+O('x^50); concat([0,0], Vec(3*x^2/((x-1)*(2*x-1)*(1+x)))) \\ G. C. Greubel, Oct 10 2017

Formula

a(n) = A000079(n) - A000034(n).
a(n) = 3*A000975(n-1).
G.f.: 3*x^2/( (x-1)*(2*x-1)*(1+x) ). - R. J. Mathar, Jul 07 2011

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

Original entry on oeis.org

0, 3, 6, 36, 120, 528, 2016, 8256, 32640, 131328, 523776, 2098176, 8386560, 33558528, 134209536, 536887296, 2147450880, 8590000128, 34359607296, 137439215616, 549755289600, 2199024304128, 8796090925056
Offset: 0

Views

Author

Keywords

References

  • M. Gardner, Riddles of the Sphinx, New Mathematical Library, M.A.A., 1987, p. 145. Math. Rev. 89i:00015.

Crossrefs

Cf. A001045, A003683 (one-third), A062510, A071930.

Programs

  • Magma
    [(4^n -(-2)^n)/2: n in [0..40]]; // G. C. Greubel, Feb 17 2023
    
  • Mathematica
    Table[(4^n-(-2)^n)/2, {n,0,40}] (* G. C. Greubel, Feb 17 2023 *)
  • PARI
    a(n)=if(n<0,0,2^(n-1)*(2^n-(-1)^n))
    
  • SageMath
    [(4^n-(-2)^n)/2 for n in range(41)] # G. C. Greubel, Feb 17 2023

Formula

G.f.: 3*x/((1+2*x)*(1-4*x)).
a(n) = 3*A003683(n).
Given the 2 X 2 matrix M = [1,3; 3,1], a(n) = term (1,2) in M^n, n>0. - Gary W. Adamson, Aug 06 2010
From G. C. Greubel, Feb 17 2023: (Start)
a(n) = 2*a(n-1) + 8*a(n-2).
a(n) = 3*2^(n-1)*A001045(n).
a(n) = 2^(n-1)*A062510(n).
a(n) = (1/2)*A071930(n+1).
E.g.f.: (1/2)*(exp(4*x) - exp(-2*x)). (End)

A085903 Expansion of (1 + 2*x^2)/((1 + x)*(1 - 2*x)*(1 - 2*x^2)).

Original entry on oeis.org

1, 1, 7, 9, 31, 49, 127, 225, 511, 961, 2047, 3969, 8191, 16129, 32767, 65025, 131071, 261121, 524287, 1046529, 2097151, 4190209, 8388607, 16769025, 33554431, 67092481, 134217727, 268402689, 536870911, 1073676289, 2147483647
Offset: 1

Views

Author

Yuval Dekel (dekelyuval(AT)hotmail.com), Aug 16 2003

Keywords

Comments

Resultant of the polynomial x^n - 1 and the Chebyshev polynomial of the first kind T_2(x).
This sequence is the case P1 = 1, P2 = 0, Q = -2 of the 3 parameter family of 4th-order linear divisibility sequences found by Williams and Guy. - Peter Bala, Apr 27 2014

Crossrefs

Programs

  • Magma
    [Round((Sqrt(2)^n - 1)*(Sqrt(2)^n - (-1)^n)): n in [1..40]]; // Vincenzo Librandi, Apr 28 2014
    
  • Maple
    seq(simplify((sqrt(2)^n - 1)*(sqrt(2)^n - (-1)^n)), n = 1..30); # Peter Bala, Apr 27 2014
  • Mathematica
    CoefficientList[ Series[(1 + 2x^2)/(1 - x - 4x^2 + 2x^3 + 4x^4), {x, 0, 30}], x] (* Robert G. Wilson v, May 04 2013 *)
    LinearRecurrence[{1,4,-2,-4},{1,1,7,9},40] (* Harvey P. Dale, Jul 25 2016 *)
  • PARI
    a(n) = polresultant(x^n - 1, 2*x^2 - 1) \\ David Wasserman, Feb 10 2005
    
  • Python
    def A085903(n): return (1<>1))-1)**2 # Chai Wah Wu, Jun 19 2024

Formula

a(2*n) = 2*4^n - 1, a(2*n + 1) = (2^n - 1)^2; interlaces A083420 with A060867 (squares of Mersenne numbers A000225). - Creighton Dement, May 19 2005
A107663(2*n) = a(2*n) = A083420(n). - Creighton Dement, May 19 2005
From Peter Bala, Apr 27 2014: (Start)
a(n) = (sqrt(2)^n - 1)*(sqrt(2)^n - (-1)^n).
a(n) = Product_{k = 1..n} ( 2 - exp(4*k*Pi*i/n) ). (End)
E.g.f.: exp(-x) + exp(2*x) - 2*cosh(sqrt(2)*x). - Ilya Gutkovskiy, Jun 16 2016

Extensions

More terms from David Wasserman, Feb 10 2005
Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, Jun 15 2007

A111277 Number of permutations avoiding the patterns {2413,4213,2431,4231,4321}; also number of permutations avoiding the patterns {3142,3412,3421,4312,4321}; number of weak sorting class based on 2413 or 3142.

Original entry on oeis.org

1, 1, 2, 6, 19, 59, 180, 544, 1637, 4917, 14758, 44282, 132855, 398575, 1195736, 3587220, 10761673, 32285033, 96855114, 290565358, 871696091, 2615088291, 7845264892, 23535794696, 70607384109, 211822152349, 635466457070
Offset: 0

Views

Author

Len Smiley, Nov 01 2005

Keywords

Comments

a(n) = number of permutation tableaux of size n (A000142) for which each row is constant (all 1's, all 0's, or empty). For example, a(4)=19 counts all 4! permutation tableaux of size 4 except the following five: {{0, 1}, {1}}, {{1, 1}, {0, 1}}, {{0, 1}, {1, 1}}, {{1, 0}, {0, 1}}, {{1, 0}, {1, 1}}. - David Callan, Oct 06 2006
a(n) = number of distinct excedance specifications taken over all permutations on [n]. The excedance specification for a permutation (p_1, p_2, ..., p_n) is the sequence (a_1, a_2, ..., a_n) defined by a_i = 1, 0, or -1 according as p_i is greater than, equal to, or less than i. If all permutations with a given excedance specification are arranged in lex (dictionary) order, then the first--and only the first--avoids the pattern set {3142,3412,3421,4312,4321}. - David Callan, Jul 25 2008
a(n) = number of (-1,0,1)-sequences of length n such that the first nonzero entry is 1 and the last nonzero entry is -1 because these sequences are the valid excedance specifications. Example: a(3)=6 counts (1,1,-1), (1,0,-1), (1,-1,0), (1,-1,-1), (0,1,-1), (0,0,0). - David Callan, Jul 25 2008
Inverse binomial transformation leads to 0,1,0,3,3,9,... (offset 0), essentially to A062510. - R. J. Mathar, Jun 25 2011
A128308 is defined as A007318 * A128307; since A007318 is the Riordan array (1/(1-x), x/(1-x)) and A128307 is the Riordan array ((1-x)^2/(1-2x), x), the first column of A128308 has g.f. (1-2x)^2/((1-3x)(1-x)^2), which coincides with the g.f. of this sequence. - Peter J. Taylor, Jul 24 2014
Number of permutations of length n>0 avoiding the partially ordered pattern (POP) {1>2, 1>3, 4>3} of length 4. That is, number of length n permutations having no subsequences of length 4 in which the first element is larger than the second and third elements, and the fourth element is larger than the third element. - Sergey Kitaev, Dec 09 2020

Crossrefs

First column of A128308.

Programs

Formula

a(n) = (3^n-2*n+3)/4.
a(n) = +5*a(n-1) -7*a(n-2) +3*a(n-3). - R. J. Mathar, Jun 25 2011
a(n+1) = sum of row 1 terms of M^n, an infinite bidiagonal matrix with all 1's in the superdiagonal and (1,3,0,0,0,...) in the main diagonal, and the rest zeros. Example: a(5) = 59 = (sum of row 1 terms of M^4) = (1 + 40 + 13 + 4 + 1). - Gary W. Adamson, Jun 23 2011
G.f.: (1-2*x)^2/((1-3*x)*(1-x)^2). - R. J. Mathar, Jun 25 2011

Extensions

a(0) and crossref to A128308 added by Peter J. Taylor, Jul 23 2014
Previous Showing 11-20 of 34 results. Next