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

A133130 Number of 0/1 colorings of an n X n square for which no 2 by 2 subsquare is monochromatic.

Original entry on oeis.org

1, 2, 14, 322, 23858, 5735478, 4468252414, 11282914491066, 92343922085798834, 2449629600675855540670, 210618917058297166847778158, 58694743562963266347581955456602, 53015873227026172656988353687982082782, 155209215810704933798454506348361943868443334
Offset: 0

Views

Author

Victor S. Miller, Sep 19 2007

Keywords

Comments

For each n we define an undirected labeled graph (with self loops), where the vertices are labeled with strings from {0,1}^n and there is an edge between two vertices exactly when we can form a 2 X n rectangle whose rows are the two labels and the 2 X n rectangle has no monochromatic 2 X 2 subsquares. a(n) is the number of walks of length n in this graph. Thus it is the sum of all of the entries of A^n, where A is the adjacency matrix of the graph.

Examples

			a(2) = 14 because 2 of the 16 unrestricted colorings are monochromatic.
		

Crossrefs

Cf. A055099.
Main diagonal of A181245.

Extensions

a(0)-a(1), a(11)-a(13) from Alois P. Heinz, Feb 18 2015

A202396 Triangle T(n,k), read by rows, given by (2, 1/2, 1/2, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (2, -1/2, -1/2, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938.

Original entry on oeis.org

1, 2, 2, 5, 8, 3, 13, 27, 19, 5, 34, 86, 86, 42, 8, 89, 265, 338, 234, 85, 13, 233, 798, 1227, 1084, 567, 166, 21, 610, 2362, 4230, 4510, 3038, 1286, 314, 34, 1597, 6898, 14058, 17474, 14284, 7814, 2774, 582, 55
Offset: 0

Views

Author

Philippe Deléham, Dec 18 2011

Keywords

Comments

T(n,n) = Fibonacci(n+2) = A000045(n+2).

Examples

			Triangle begins :
1
2, 2
5, 8, 3
13, 27, 19, 5
34, 86, 86, 42, 8
89, 265, 338, 234, 85, 13
		

Crossrefs

Formula

T(n,k) = 3*T(n-1,k) + T(n-1,k-1) + T(n-2,k-2) - T(n-2,k) with T(0,0) = 1, T(1,0) = T(1,1) = 2 and T(n,k) = 0 if k<0 or if n
G.f.: (1+(y-1)*x)/(1-(3+y)*x+(1-y^2)*x^2).
Sum_{k, 0<=k<=n} T(n,k)*x^k = A000007(n), A122367(n), A000302(n), A180035(n) for x = -1, 0, 1, 2 respectively.
Sum_{k, 0<=k<=n} T(n,k)*3^k = 2^n * A055099(n). - Philippe Deléham, Feb 05 2012

A322940 a(n) = [x^n] (4*x^2 + x - 1)/(2*x^2 + 3*x - 1).

Original entry on oeis.org

1, 2, 4, 16, 56, 200, 712, 2536, 9032, 32168, 114568, 408040, 1453256, 5175848, 18434056, 65653864, 233829704, 832796840, 2966049928, 10563743464, 37623330248, 133997477672, 477239093512, 1699712235880, 6053614894664, 21560269155752, 76788037256584
Offset: 0

Author

Peter Luschny, Jan 06 2019

Keywords

Crossrefs

Row sums of A322941.

Programs

  • Maple
    a := proc(n) option remember; `if`(n < 3, [1, 2, 4][n+1], 3*a(n-1) + 2*a(n-2)) end:
    seq(a(n), n=0..26);
  • Mathematica
    Join[{1}, LinearRecurrence[{3, 2}, {2, 4}, 26]] (* Jean-François Alcover, Jul 13 2019 *)

Formula

a(n) = 3*a(n-1) + 2*a(n-2) for n >= 3.
a(n) = 2*A104934(n-1) for n >= 1.
a(n) = 4*A055099(n-2) for n >= 2.
INVERT(a) = A102865.
INVERTi(a) = A322939. (See the link 'Transforms' at the bottom of the page.)

A254599 Numbers of words on alphabet {0,1,...,9} with no subwords ii, for i from {0,1}.

Original entry on oeis.org

1, 10, 98, 962, 9442, 92674, 909602, 8927810, 87627106, 860066434, 8441614754, 82855064258, 813228496354, 7981896981250, 78342900802082, 768941283068738, 7547214754035298, 74076463050867586, 727065885490090658, 7136204673817756610, 70042369148280534754
Offset: 0

Author

Milan Janjic, Feb 02 2015

Keywords

Comments

a(n) is the number of sequences over {0,1,...,9} of length n such that no two consecutive terms have distance 9. - David Nacin, May 31 2017

Crossrefs

Programs

  • Magma
    [n le 1 select 10^n else 9*Self(n)+8*Self(n-1): n in [0..20]]; // Bruno Berselli, Feb 02 2015
    
  • Mathematica
    RecurrenceTable[{a[0] == 1, a[1] == 10, a[n] == 9 a[n - 1] + 8 a[n - 2]}, a[n], {n, 0, 20}] (* Bruno Berselli, Feb 02 2015 *)
  • PARI
    Vec((1 + x)/(1 - 9*x - 8*x^2) + O(x^30)) \\ Colin Barker, Jan 22 2017

Formula

a(n) = 9*a(n-1) + 8*a(n-2) with n>1, a(0) = 1, a(1) = 10.
G.f.: (1 + x)/(1 - 9*x - 8*x^2). - Bruno Berselli, Feb 02 2015
a(n) = (2^(-1-n)*((9-r)^n*(-11+r) + (9+r)^n*(11+r))) / r, where r=sqrt(113). - Colin Barker, Jan 22 2017

A254659 Numbers of words on alphabet {0,1,...,8} with no subwords ii, where i is from {0,1,2,3}.

Original entry on oeis.org

1, 9, 77, 661, 5673, 48689, 417877, 3586461, 30781073, 264180889, 2267352477, 19459724261, 167014556473, 1433415073089, 12302393367077, 105586222302061, 906201745251873, 7777545073525289, 66751369314461677, 572898679883319861, 4916946285638867273
Offset: 0

Author

Milan Janjic, Feb 04 2015

Keywords

Comments

a(n) is the number of nonary sequences of length n such that no two consecutive terms have distance 7. - David Nacin, May 31 2017

Programs

  • Magma
    [n le 1 select 9^n else 8*Self(n)+5*Self(n-1): n in [0..20]];
    
  • Mathematica
    RecurrenceTable[{a[0] == 1, a[1] == 9, a[n] == 8 a[n - 1] + 5 a[n - 2]}, a[n], {n, 0, 20}]
  • PARI
    Vec((1 + x)/(1 - 8*x -5*x^2) + O(x^30)) \\ Colin Barker, Jan 22 2017

Formula

G.f.: (1 + x)/(1 - 8*x - 5*x^2).
a(n) = 8*a(n-1) + 5*a(n-2) with n>1, a(0) = 1, a(1) = 9.
a(n) = ((4-r)^n*(-5+r) + (4+r)^n*(5+r)) / (2*r), where r=sqrt(21). - Colin Barker, Jan 22 2017

A254662 Numbers of words on alphabet {0,1,...,7} with no subwords ii, where i is from {0,1,...,4}.

Original entry on oeis.org

1, 8, 59, 437, 3236, 23963, 177449, 1314032, 9730571, 72056093, 533584364, 3951258827, 29259564881, 216670730648, 1604473809179, 11881328856197, 87982723420916, 651523050515003, 4824609523867769, 35726835818619392, 264561679301939051, 1959112262569431533
Offset: 0

Author

Milan Janjic, Feb 04 2015

Keywords

Programs

  • Magma
    [n le 1 select 8^n else 7*Self(n)+3*Self(n-1): n in [0..20]];
    
  • Mathematica
    RecurrenceTable[{a[0] == 1, a[1] == 8, a[n] == 7 a[n - 1] + 3 a[n - 2]}, a[n], {n, 0, 20}]
  • PARI
    Vec((1+x)/(1-7*x-3*x^2) + O(x^30)) \\ Colin Barker, Sep 08 2016

Formula

G.f.: (1 + x)/(1 - 7*x -3*x^2).
a(n) = 7*a(n-1) + 3*a(n-2) with n>1, a(0) = 1, a(1) = 8.
a(n) = (2^(-1-n) * ((7-sqrt(61))^n * (-9+sqrt(61)) + (7+sqrt(61))^n * (9+sqrt(61)))) / sqrt(61). - Colin Barker, Sep 08 2016

A287811 Number of septenary sequences of length n such that no two consecutive terms have distance 5.

Original entry on oeis.org

1, 7, 45, 291, 1881, 12159, 78597, 508059, 3284145, 21229047, 137226717, 887047443, 5733964809, 37064931183, 239591481525, 1548743682699, 10011236540769, 64713650292711, 418315611378573, 2704034619149571, 17479154549033145, 112987031151647583
Offset: 0

Author

David Nacin, Jun 01 2017

Keywords

Examples

			For n=2 the a(2) = 49-4 = 45 sequences contain every combination except these four: 05, 50, 16, 61.
		

Programs

  • Mathematica
    LinearRecurrence[{6, 3}, {1,7}, 40]
  • Python
    def a(n):
     if n in [0, 1]:
      return [1, 7][n]
     return 6*a(n-1)-3*a(n-2)

Formula

a(n) = 6*a(n-1) + 3*a(n-2), a(0)=1, a(1)=7.
G.f.: (1 + x)/(1 - 6*x - 3*x^2).
a(n) = A090018(n-1)+A090018(n). - R. J. Mathar, Oct 20 2019

A287838 Number of words of length n over the alphabet {0,1,...,10} such that no two consecutive terms have distance 8.

Original entry on oeis.org

1, 11, 115, 1205, 12625, 132275, 1385875, 14520125, 152130625, 1593906875, 16699721875, 174966753125, 1833166140625, 19206495171875, 201230782421875, 2108340300078125, 22089556912890625, 231437270629296875, 2424820490857421875, 25405391261720703125
Offset: 0

Author

David Nacin, Jun 07 2017

Keywords

Comments

In general, the number of sequences on {0,1,...,10} such that no two consecutive terms have distance 6+k for k in {0,1,2,3,4} has generating function (-1 - x)/(-1 + 10*x + (2*k+1)*x^2).

Programs

  • Mathematica
    LinearRecurrence[{10, 5}, {1, 11, 115}, 20]
  • PARI
    Vec((1 + x) / (1 - 10*x - 5*x^2) + O(x^40)) \\ Colin Barker, Nov 25 2017
  • Python
    def a(n):
     if n in [0,1,2]:
      return [1, 11, 115][n]
     return 10*a(n-1) + 5*a(n-2)
    

Formula

For n > 2, a(n) = 10*a(n-1) + 5*a(n-2), a(0)=1, a(1)=11, a(2)=115.
G.f.: (-1 - x)/(-1 + 10*x + 5*x^2).
a(n) = (((5-sqrt(30))^n*(-6+sqrt(30)) + (5+sqrt(30))^n*(6+sqrt(30)))) / (2*sqrt(30)). - Colin Barker, Nov 25 2017

A287805 Number of quinary sequences of length n such that no two consecutive terms have distance 2.

Original entry on oeis.org

1, 5, 19, 73, 281, 1083, 4175, 16097, 62065, 239307, 922711, 3557761, 13717913, 52893147, 203943935, 786361409, 3032030689, 11690820555, 45077144455, 173807214241, 670161078089, 2583988659867, 9963272432111, 38416111919777, 148123788152017, 571131629935179
Offset: 0

Author

David Nacin, Jun 01 2017

Keywords

Examples

			For n=2 the a(2)=19=25-6 sequences contain every combination except these six: 02,20,13,31,24,42.
		

Programs

  • Mathematica
    LinearRecurrence[{4, 1, -6}, {1, 5, 19, 73}, 40]
  • Python
    def a(n):
     if n in [0,1,2,3]:
      return [1,5,19,73][n]
     return 4*a(n-1)+a(n-2)-6*a(n-3)

Formula

For n>0, a(n) = 4*a(n-1) + a(n-2) - 6*a(n-3), a(1)=5, a(2)=19, a(3)=73.
G.f.: (1 + x - 2*x^2 - 2*x^3)/(1 - 4*x - x^2 + 6*x^3).

A287806 Number of senary sequences of length n such that no two consecutive terms have distance 1.

Original entry on oeis.org

1, 6, 26, 114, 500, 2194, 9628, 42252, 185422, 813722, 3571010, 15671340, 68773514, 301811860, 1324498252, 5812546998, 25508302906, 111942925778, 491260382084, 2155891150146, 9461106209228, 41519967599596, 182209952129086, 799626506818554, 3509152727035810
Offset: 0

Author

David Nacin, Jun 01 2017

Keywords

Examples

			For n=2 the a(2)=26=36-10 sequences contain every combination except these ten: 01,10,12,21,23,32,34,43,45,54.
		

Programs

  • Mathematica
    LinearRecurrence[{5, -2, -3}, {1, 6, 26, 114}, 40]
  • Python
    def a(n):
     if n in [0, 1, 2, 3]:
      return [1, 6, 26, 114][n]
     return 5*a(n-1)-2*a(n-2)-3*a(n-3)

Formula

For n>3, a(n) = 5*a(n-1) - 2*a(n-2) - 3*a(n-3), a(1)=6, a(2)=26, a(3)=114.
G.f.: (1 + x - 2*x^2 - x^3)/(1 - 5*x + 2*x^2 + 3*x^3).
Previous Showing 31-40 of 62 results. Next