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

A268630 a(n)^2 + a(n+1) is prime; lexicographically earliest sequence of nonnegative integers with this property and containing no duplicates.

Original entry on oeis.org

0, 2, 1, 4, 3, 8, 7, 10, 9, 16, 13, 12, 5, 6, 11, 18, 23, 28, 25, 22, 15, 14, 27, 32, 37, 30, 19, 36, 31, 48, 29, 40, 21, 20, 33, 34, 45, 38, 39, 46, 63, 44, 43, 24, 17, 42, 47, 58, 49, 66, 35, 52, 73, 64, 57, 50, 51, 56, 55, 54, 41, 60, 59, 76, 67, 72, 53, 70, 69, 26, 75, 68, 79, 82, 99, 86, 61, 100, 91, 88, 85, 84, 65, 102, 83, 78, 89, 90, 71, 106, 81
Offset: 0

Views

Author

Eric Angelini and M. F. Hasler, Feb 09 2016

Keywords

Comments

Conjectured to be a permutation of the nonnegative integers.
Terms are of alternating parity.
The sequence cannot have a fixed point other than a(0)=0 because for n>0, the terms are of parity opposite to that of their indices.
The number of distinct m-digit primes arising from the sequence appears to be bounded by the entries of A030186. The counts here for m=1 to 9 are 2,7,21,69,216,684,2162,6801,21623 compared to A030186's 2,7,22,71,228,733,2356,7573,24342. - Bill McEachen, Feb 15 2016

Crossrefs

Cf. A268494, A268495, A268496, A268497 for records and late birds.

Programs

  • Mathematica
    s = {0, 2, 1, 4}; a = 4; Do[b = Mod[a, 2] + 3; While[MemberQ[s, b] || ! PrimeQ[a^2 + b], b = b + 2]; AppendTo[s, b]; a = b, {1000}]; s (* Zak Seidov, Feb 09 2016 *)
  • PARI
    {u=[a=0]; for(n=1, 99, for(k=1, 9e9, setsearch(u,k)&&next; isprime(a*a+k)||next; print1(k","); u=setunion(u,[a=k]); break))}

A088132 a(n) equals the square of the n-th partial sum added to twice the n-th partial sum of the squares, divided by a(n-1), for all n>1, with a(0)=1, a(1)=3.

Original entry on oeis.org

1, 3, 12, 47, 185, 728, 2865, 11275, 44372, 174623, 687217, 2704496, 10643361, 41886227, 164840412, 648718287, 2552986921, 10047107272, 39539710801, 155605856283, 612376317860, 2409965560639, 9484256386273, 37324649227232
Offset: 0

Views

Author

Paul D. Hanna, Sep 19 2003

Keywords

Crossrefs

Programs

  • GAP
    a:=[1,3,12];; for n in [4..30] do a[n]:=34a[n-1]-a[n-3]; od; a; # G. C. Greubel, Oct 26 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1-x)/(1-4*x+x^3) )); // G. C. Greubel, Oct 26 2019
    
  • Maple
    seq(coeff(series((1-x)/(1-4*x+x^3), x, n+1), x, n), n = 0..30); # G. C. Greubel, Oct 26 2019
  • Mathematica
    LinearRecurrence[{4,0,-1}, {1,3,12}, 30] (* or *) CoefficientList[Series[ (1-x)/(1-4x+x^3), {x,0,30}], x] (* Harvey P. Dale, Jun 24 2011 *)
  • PARI
    {a(n)=if(n==0,1, if(n==1,3, (sum(k=0, n-1, a(k))^2 + 2*sum(k=0, n-1, a(k)^2))/a(n-1)))}
    for(n=0,20,print1(a(n),", ")) \\ Paul D. Hanna, Feb 20 2014
    
  • PARI
    Vec( (1-x)/(1-4*x+x^3) + O(x^66) ) \\ Joerg Arndt, Feb 16 2014
    
  • Sage
    def A088132_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P((1-x)/(1-4*x+x^3)).list()
    A088132_list(30) # G. C. Greubel, Oct 26 2019
    

Formula

a(n) = 4*a(n-1) - a(n-3) for n>3.
G.f.: (1-x)/(1-4*x+x^3).
G.f.: 1/(x - x^2*Sum_{n>=0} A030186(n)*x^n) - 1/x.

A353878 Number of tilings of a 3 X n rectangle using right trominoes, dominoes and 1 X 1 tiles.

Original entry on oeis.org

1, 3, 44, 369, 3633, 34002, 323293, 3058623, 28982628, 274494621, 2600148629, 24628666626, 233286962601, 2209723174731, 20930806288252, 198259418947833, 1877940242218857, 17788105074906162, 168491350295593637, 1595972975308532199, 15117273008425964916
Offset: 0

Views

Author

Gerhard Kirchner, May 09 2022

Keywords

Comments

Tiling algorithm see A351322.

Examples

			a(2)=44
The number of tilings (mirroring included) using r trominoes
      ___   ___        ___
r=1: |  _| | |_| r=2: |  _| r=0: 22 = A030186(3)
     |_|3| |___|      |_| |
     |___| |_2_|      |___|
      4*3 + 4*2   +    2*1   +   22 = 44
Legend:
   ___              ___      ___
  |_2_| stands for |___| or |_|_|
     _                _        _        _
   _|3|             _| |     _|_|     _|_|
  |___| stands for |_|_| or |___| or |_|_|
		

Crossrefs

Programs

Formula

G.f.: (1-3*x-7*x^2+3*x^3-2*x^4) / (1-6*x-33*x^2-3*x^3+40*x^4-15*x^5).
a(n) = 6*a(n-1) + 33*a(n-2) + 3*a(n-3) - 40*a(n-4) + 15*a(n-5).

A030236 Cycle-path coverings of a family of digraphs.

Original entry on oeis.org

1, 2, 7, 18, 49, 136, 377, 1044, 2891, 8006, 22171, 61398, 170029, 470860, 1303949, 3611016, 9999959, 27692810, 76689487, 212375610, 588130153, 1628704336, 4510358465, 12490501212, 34589849507, 95789405774, 265268869027
Offset: 0

Views

Author

Ottavio D'Antona (dantona(AT)dsi.unimi.it) and Emanuele Munarini

Keywords

Crossrefs

Cf. A030186.

Programs

  • GAP
    a:=[2,7,18];; for n in [4..40] do a[n]:=3*a[n-1]-a[n-2]+a[n-3]; od; Concatenation([1],a); # G. C. Greubel, Oct 27 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (1-x+2*x^2-2*x^3)/(1-3*x+x^2-x^3) )); // G. C. Greubel, Oct 27 2019
    
  • Maple
    seq(coeff(series((1-x+2*x^2-2*x^3)/(1-3*x+x^2-x^3), x, n+1), x, n), n = 0 .. 40); # G. C. Greubel, Oct 27 2019
  • Mathematica
    LinearRecurrence[{3,-1,1}, {1,2,7,18}, 40] (* G. C. Greubel, Oct 27 2019 *)
  • Maxima
    makelist(sum(binomial(n+k+1,3*k+1)*2^k, k,0,n) + 2*sum(2^k* binomial(n+k-1,3*k+1), k,0,n-1), n,0,60); /* Emanuele Munarini, Dec 03 2012 */
    
  • PARI
    my(x='x+O('x^40)); Vec((1-x+2*x^2-2*x^3)/(1-3*x+x^2-x^3)) \\ G. C. Greubel, Oct 27 2019
    
  • Sage
    def A030236_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( (1-x+2*x^2-2*x^3)/(1-3*x+x^2-x^3) ).list()
    A030236_list(40) # G. C. Greubel, Oct 27 2019
    

Formula

a(n+4) = 3*a(n+3) - a(n+2) + a(n+1), n >= 0.
a(n+3) = 2*a(n+2) + a(n+1) + 2*Sum_{k=0..n} a(k), n >= 0.
G.f.: (1-x+2*x^2-2*x^3)/(1-3*x+x^2-x^3).
a(n) = Sum_{k=0..n} binomial(n+k+1,3*k+1)*2^k + 2*Sum_{j=0..n-1} binomial(n+j-1,3*j+1)*2^j. - Emanuele Munarini, Dec 03 2012

A088016 To obtain a(n+1), add the square of the n-th partial sum to the n-th partial sum of the squares, then divide this result by a(n), for all n >= 0, with a(0)=1.

Original entry on oeis.org

1, 1, 6, 17, 56, 179, 576, 1851, 5950, 19125, 61474, 197597, 635140, 2041543, 6562172, 21092919, 67799386, 217928905, 700493182, 2251609065, 7237391472, 23263290299, 74775653304, 240352858739, 772570939222, 2483290023101
Offset: 0

Views

Author

Paul D. Hanna, Sep 18 2003

Keywords

Examples

			G.f.: A(x) = 1 + x + 6*x^2 + 17*x^3 + 56*x^4 + 179*x^5 + 576*x^6 + ...
where A(x) * (1 - 3*x - x^2 + x^3) = 1 - 2*x + 2*x^2 - x^3.
Illustration of the initial terms: set a(0) = a(1) = 1, then
a(2) = ((1+1)^2 + (1^2 + 1^2))/1 = 6;
a(3) = ((1+1+6)^2 + (1^2 + 1^2 + 6^2))/6 = 17;
a(4) = ((1+1+6+17)^2 + (1^2 + 1^2 + 6^2 + 17^2))/17 = 56;
a(5) = ((1+1+6+17+56)^2 + (1^2 + 1^2 + 6^2 + 17^2 + 56^2))/56 = 179; ...
		

Crossrefs

Programs

  • GAP
    a:=[1,6,17];; for n in [4..40] do a[n]:=3*a[n-1]+a[n-2]-a[n-3]; od; Concatenation([1], a); # G. C. Greubel, Oct 27 2019
  • Magma
    I:=[1,6,17]; [1] cat [n le 3 select I[n] else 3*Self(n-1) +Self(n-2) -Self(n-3): n in [1..30]]; // G. C. Greubel, Oct 27 2019
    
  • Maple
    seq(coeff(series((1-2*x+2*x^2-x^3)/(1-3*x-x^2+x^3), x, n+1), x, n), n = 0 .. 40); # G. C. Greubel, Oct 27 2019
  • Mathematica
    LinearRecurrence[{3,1,-1},{1,1,6,17},40] (* Harvey P. Dale, Nov 06 2012 *)
  • PARI
    a(n)=(sum(k=0,n-1,a(k))^2+sum(k=0,n-1,a(k)^2))/a(n-1)
    
  • PARI
    my(x='x+O('x^40)); Vec((1-2*x+2*x^2-x^3)/(1-3*x-x^2+x^3)) \\ G. C. Greubel, Oct 27 2019
    
  • Sage
    def A088016_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P((1-2*x+2*x^2-x^3)/(1-3*x-x^2+x^3)).list()
    A088016_list(40) # G. C. Greubel, Oct 27 2019
    

Formula

a(n) = 3*a(n-1) + a(n-2) - a(n-3) for n>3.
G.f.: (1-2*x+2*x^2-x^3) / (1-3*x-x^2+x^3).
G.f.: A(x) = A030186(x) * (1-x+x^2), where A030186(x) = gf of A030186.

A125693 Riordan array ((1-x)/(1-3*x), x*(1-x)/(1-3*x)).

Original entry on oeis.org

1, 2, 1, 6, 4, 1, 18, 16, 6, 1, 54, 60, 30, 8, 1, 162, 216, 134, 48, 10, 1, 486, 756, 558, 248, 70, 12, 1, 1458, 2592, 2214, 1168, 410, 96, 14, 1, 4374, 8748, 8478, 5160, 2150, 628, 126, 16, 1, 13122, 29160, 31590, 21744, 10442, 3624, 910, 160, 18, 1
Offset: 0

Views

Author

Paul Barry, Nov 30 2006

Keywords

Comments

Row sums are A001835(n+1). Diagonal sums are A030186. Inverse is A125694. Equal to product of A007318 and A073370.

Examples

			Triangle begins
    1;
    2,   1;
    6,   4,   1;
   18,  16,   6,  1;
   54,  60,  30,  8,  1;
  162, 216, 134, 48, 10, 1;
		

Programs

  • GAP
    Flat(List([0..10], n-> List([0..n], k-> Sum([0..n], j->
    (-1)^j*3^(n-k-j)*Binomial(k+1,j)*Binomial(n-j, n-k-j) )))); # G. C. Greubel, Oct 28 2019
  • Magma
    T:= func< n,k | &+[(-1)^j*3^(n-k-j)*Binomial(k+1,j)*Binomial(n-j, n-k-j): j in [0..n]] >;
    [T(n,k): k in [0..n], n in [0..10]]; // G. C. Greubel, Oct 28 2019
    
  • Maple
    seq(seq( add( (-1)^j*3^(n-k-j)*binomial(k+1,j)*binomial(n-j, n-k-j), j=0..n), k=0..n), n=0..10); # G. C. Greubel, Oct 28 2019
  • Mathematica
    T[0, 0]=1; T[1, 0]=2; T[1, 1]=1; T[n_, k_]/; 0<=k<=n:= T[n, k]= 3T[n-1, k] + T[n-1, k-1] - T[n-2, k-1]; T[, ]=0; Table[T[n, k], {n, 0, 9}, {k, 0, n}] (* Jean-François Alcover, Jun 13 2019 *)
    T[n_, k_]:= Sum[(-1)^j*3^(n-k-j)*Binomial[k+1,j]*Binomial[n-j,n-k-j], {j, 0, n}]; Table[T[n, k], {n,0,10}, {k,0,n}]//Flatten (* G. C. Greubel, Oct 28 2019 *)
  • PARI
    T(n,k) = sum(j=0,n, (-1)^j*3^(n-k-j)*binomial(k+1,j)*binomial(n-j, n-k-j));
    for(n=0,10, for(k=0,n, print1(T(n,k), ", "))) \\ G. C. Greubel, Oct 28 2019
    
  • Sage
    [[sum( (-1)^j*3^(n-k-j)*binomial(k+1,j)*binomial(n-j, n-k-j) for j in (0..n) ) for k in (0..n)] for n in (0..10)] # G. C. Greubel, Oct 28 2019
    

Formula

Number triangle T(n,k) = Sum_{j=0..k+1} C(k+1,j)*C(n-j,n-k-j)* (-1)^j * 3^(n-k-j).
T(n,k) = 3*T(n-1,k) + T(n-1,k-1) - T(n-2,k-1), T(0,0)=1, T(1,0)=2, T(1,1)=1, T(n,k)=0 if k>n or if kPhilippe Deléham, Jan 08 2013

A159616 Expansion of (1-x)/(1-5*x-2*x^2+8*x^3).

Original entry on oeis.org

1, 4, 22, 110, 562, 2854, 14514, 73782, 375106, 1906982, 9694866, 49287446, 250571106, 1273871494, 6476200114, 32924174710, 167382301826, 850950257638, 4326122494162, 21993454571478, 111811915784610, 568437508112710
Offset: 0

Views

Author

R. J. Mathar, Apr 17 2009

Keywords

Comments

Number of tilings of a 2 X n board with squares of 1 color and dominoes of 2 colors if n > 2. The number of tilings is 3 if n=1, and 17 if n=2.
a(n) = element(1,2) in A^n, where A is the 7 X 7 matrix defined by A(1,i) = A(7,i) = A(i,1) = A(i,7) = A(i,i) = A(i,7-i+1) = 1, and A(i,j) = 0 otherwise. - Lechoslaw Ratajczak, Jan 02 2017

Crossrefs

Programs

  • GAP
    a:=[1,4,22];; for n in [4..40] do a[n]:=5*a[n-1]+2*a[n-2]-8*a[n-3]; od; a; # G. C. Greubel, Oct 27 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (1-x)/(1-5*x-2*x^2+8*x^3) )); // G. C. Greubel, Oct 27 2019
    
  • Maple
    seq(coeff(series((1-x)/(1-5*x-2*x^2+8*x^3), x, n+1), x, n), n=0..40); # G. C. Greubel, Oct 27 2019~
  • Mathematica
    CoefficientList[Series[(1-x)/(1-5*x-2*x^2+8*x^3), {x, 0, 40}], x] (* Vincenzo Librandi, Dec 11 2012 *)
    LinearRecurrence[{5,2,-8}, {1,4,22}, 30] (* Harvey P. Dale, Dec 22 2013 *)
  • PARI
    my(x='x+O('x^40)); Vec((1-x)/(1-5*x-2*x^2+8*x^3)) \\ G. C. Greubel, Oct 27 2019
    
  • Sage
    def A159616_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P((1-x)/(1-5*x-2*x^2+8*x^3)).list()
    A159616_list(40) # G. C. Greubel, Oct 27 2019
    

Formula

G.f.: (1-x)/(1-5*x-2*x^2+8*x^3).
a(n) = 5*a(n-1) + 2*a(n-2) - 8*a(n-3) for n > 2 with a(0)=1, a(1)=4, a(2)=22. - Harvey P. Dale, Dec 22 2013

A159617 G.f.: (1-x)/(1-8*x-8*x^2+8*x^3).

Original entry on oeis.org

1, 7, 64, 560, 4936, 43456, 382656, 3369408, 29668864, 261244928, 2300355072, 20255449088, 178356473856, 1570492542976, 13828748541952, 121767076888576, 1072202663100416, 9441127931576320, 83132508142305280, 732011467286249472
Offset: 0

Views

Author

R. J. Mathar, Apr 17 2009

Keywords

Comments

Number of tilings of a 2xn board with squares of 2 colors and dominoes of 2 colors if n>2. The number of tilings is 6 if n=1, and 56 if n=2.

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(1 - x)/(1 - 8 x - 8 x^2 + 8 x^3), {x, 0, 40}], x] (* Vincenzo Librandi, Dec 11 2012 *)
  • PARI
    Vec((1 - x) / (1 - 8*x - 8*x^2 + 8*x^3) + O(x^25)) \\ Colin Barker, Jul 05 2020

Formula

a(n) = 8*a(n-1) + 8*a(n-2) - 8*a(n-3) for n>2. - Colin Barker, Jul 05 2020

A253265 The number of tilings of 2 X n boards with squares of 2 colors and dominoes of 3 colors.

Original entry on oeis.org

1, 7, 82, 877, 9565, 103960, 1130701, 12296275, 133724242, 1454268793, 15815379409, 171994465072, 1870463946217, 20341557798991, 221217294787570, 2405769114915733, 26163076626035413, 284527128680078536, 3094272440210485525, 33650646877362841531, 365955505581792121138
Offset: 0

Views

Author

R. J. Mathar, Sep 30 2015

Keywords

Comments

The numerator in Formula (3) in the JIS article should be 1-b*x, not 1-x.

Crossrefs

Cf. A030186 (pieces of a single color), A102436.

Programs

  • GAP
    a:=[1,7,82];; for n in [4..30] do a[n]:=10*a[n-1]+12*a[n-2] -27*a[n-3]; od; a; # G. C. Greubel, Oct 28 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1-3*x)/(1-10*x-12*x^2+27*x^3) )); // G. C. Greubel, Oct 28 2019
    
  • Maple
    seq(coeff(series((1-3*x)/(1-10*x-12*x^2+27*x^3), x, n+1), x, n), n = 0..30); # G. C. Greubel, Oct 28 2019
  • Mathematica
    CoefficientList[Series[(1-3x)/(1-10x-12x^2+27x^3), {x, 0, 20}], x] (* Michael De Vlieger, Sep 30 2015 *)
    LinearRecurrence[{10,12,-27},{1,7,82},30] (* Harvey P. Dale, Dec 30 2015 *)
  • PARI
    my(x='x+O('x^30)); Vec((1-3*x)/(1-10*x-12*x^2+27*x^3)) \\ G. C. Greubel, Oct 28 2019
    
  • Sage
    def A253265_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P((1-3*x)/(1-10*x-12*x^2+27*x^3)).list()
    A253265_list(30) # G. C. Greubel, Oct 28 2019
    

Formula

G.f.: ( 1-3*x ) / ( 1 - 10*x - 12*x^2 + 27*x^3 ).

A260033 Number of configurations of the general monomer-dimer model for a 2 X 2n square lattice.

Original entry on oeis.org

1, 7, 71, 733, 7573, 78243, 808395, 8352217, 86293865, 891575391, 9211624463, 95173135221, 983314691581, 10159461285307, 104966044432531, 1084493574452273, 11204826469232593, 115766602184825143, 1196083332322900695, 12357755266727364237, 127678491209925526885
Offset: 0

Views

Author

N. J. A. Sloane, Jul 19 2015

Keywords

Crossrefs

Bisection (even part) of A030186.

Programs

  • GAP
    a:=[1,7,71];; for n in [4..30] do a[n]:=11*a[n-1]-7*a[n-2]+a[n-3]; od; a; # G. C. Greubel, Oct 27 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1-4*x+x^2)/(1-11*x+7*x^2-x^3) )); // G. C. Greubel, Oct 27 2019
    
  • Maple
    seq(coeff(series((1-4*x+x^2)/(1-11*x+7*x^2-x^3), x, n+1), x, n), n = 0 .. 30); # G. C. Greubel, Oct 27 2019
  • Mathematica
    LinearRecurrence[{11,-7,1}, {1,7,71}, 30] (* G. C. Greubel, Oct 27 2019 *)
  • PARI
    my(x='x+O('x^30)); Vec((1-4*x+x^2)/(1-11*x+7*x^2-x^3)) \\ G. C. Greubel, Oct 27 2019
    
  • Sage
    def A260033_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P((1-4*x+x^2)/(1-11*x+7*x^2-x^3)).list()
    A260033_list(30) # G. C. Greubel, Oct 27 2019
    

Formula

G.f.: (1-4*x+x^2)/(1-11*x+7*x^2-x^3). - Alois P. Heinz, Mar 07 2016

Extensions

a(0), a(5)-a(20) from Alois P. Heinz, Mar 07 2016
Previous Showing 11-20 of 31 results. Next