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

A212943 T(n,k)=Number of nXk 0..k-1 arrays with no column j greater than or equal to than column j-1 in all rows.

Original entry on oeis.org

1, 1, 1, 1, 7, 1, 1, 181, 37, 1, 1, 10311, 9019, 175, 1, 1, 1016501, 6470341, 331489, 781, 1, 1, 152747323, 10058484751, 2509306671, 10669771, 3367, 1, 1, 32383630189, 28744943858947, 52311221188001, 801439905901, 320396041, 14197, 1, 1
Offset: 1

Views

Author

R. H. Hardin May 31 2012

Keywords

Comments

Table starts
.1...1........1............1..................1........................1
.1...7......181........10311............1016501................152747323
.1..37.....9019......6470341........10058484751...........28744943858947
.1.175...331489...2509306671.....52311221188001......2438624218076957695
.1.781.10669771.801439905901.212180664326328751.153322267564381742818531

Examples

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

Crossrefs

Column 2 is A005061

Formula

Empirical for column k:
k=1: a(n) = a(n-1)
k=2: a(n) = 7*a(n-1) -12*a(n-2)
k=3: a(n) = 55*a(n-1) -936*a(n-2) +4860*a(n-3)
k=4: a(n) = 631*a(n-1) -144700*a(n-2) +15035200*a(n-3) -702208000*a(n-4) +11468800000*a(n-5)
The coefficient of a(n-1) is A209668(k) (through at least k=1..7)

A359576 Array read by antidiagonals: T(m,n) is the number of m X n binary arrays with a path of adjacent 1's from top row to bottom row.

Original entry on oeis.org

1, 3, 1, 7, 7, 1, 15, 37, 17, 1, 31, 175, 197, 41, 1, 63, 781, 1985, 1041, 99, 1, 127, 3367, 18621, 22193, 5503, 239, 1, 255, 14197, 167337, 433809, 247759, 29089, 577, 1, 511, 58975, 1461797, 8057905, 10056959, 2764991, 153769, 1393, 1, 1023, 242461, 12519345, 144769425, 384479935, 232824241, 30856705, 812849, 3363, 1
Offset: 1

Views

Author

Andrew Howroyd, Jan 06 2023

Keywords

Comments

The grid has m rows and n columns.
"Path" refers to a sequence of L(eft), R(ight), U(p), D(own) steps (edge connectivity like in fixed polyominoes), self-avoiding, starting anywhere in the first row and ending anywhere in the last row. The path does not need to step on all 1's of the array. The path has obviously at least m-1 steps. - R. J. Mathar, Jun 21 2023
Note that the total would be smaller if Up steps were disallowed (as in the original comment above); the smallest grid size for which this phenomenon occurs is 4 X 5. The total number of 4 X 5 and 5 X 5 grids would be 433801 instead of 433809 and 10056087 instead of 10056959, respectively, without Up steps. - Caleb Stanford, Feb 01 2024
Each row and each column satisfies a linear recurrence with constant coefficients. - Pontus von Brömssen, Feb 05 2025

Examples

			Array begins:
====================================================================
m\n| 1   2      3        4          5            6             7
---+----------------------------------------------------------------
1  | 1   3      7       15         31           63           127 ...
2  | 1   7     37      175        781         3367         14197 ...
3  | 1  17    197     1985      18621       167337       1461797 ...
4  | 1  41   1041    22193     433809      8057905     144769425 ...
5  | 1  99   5503   247759   10056959    384479935   14142942975 ...
6  | 1 239  29089  2764991  232824241  18287614751 1374273318721 ...
7  | 1 577 153769 30856705 5388274121 868972410929 ...
  ...
All the 37 2 X 3 binary arrays:
001 001 001 001
001 011 101 111 plus 4 copies left-right flipped
.
010 010 010 010
010 011 110 111
.
011 011 011 011 011 011
001 010 011 101 110 111 plus 6 copies left-right flipped
.
101 101 101 101 101 101
001 011 100 101 110 111
.
111 111 111 111 111 111 111
001 010 011 100 101 110 111 - _R. J. Mathar_, Jun 21 2023
		

References

  • Samuel Dittmer, Hiram Golze, Grant Molnar, and Caleb Stanford, Puzzle and Proof: A Decade of Problems from the Utah Math Olympiad, CRC Press, 2025, p. 51.

Crossrefs

Main diagonal is A365988.
Columns 1..20 are A000012, A001333(n+1), A069378, A069379, A069380-A069395.

Extensions

One additional diagonal of terms added by Caleb Stanford, Feb 05 2024

A069362 Number of 4 X n binary arrays with a path of adjacent 1's from top row to bottom row.

Original entry on oeis.org

1, 41, 1041, 22193, 433809, 8057905, 144769425, 2541013617, 43843180113, 746691527217, 12588144461329, 210502738714097, 3497001564166609, 57781030561348017, 950437243856526737, 15574913193760097649, 254416775893204873553, 4144677558181255455025
Offset: 1

Views

Author

R. H. Hardin, Mar 22 2002

Keywords

Crossrefs

Row 4 of A359576.
Cf. 1 X n A000225, 2 X n A005061, n X 2 A001333, vertical path of 1 A069361-A069395, vertical paths of 0+1 A069396-A069416, vertical path of 1 not 0 A069417-A069428, no vertical paths A069429-A069447, no horizontal or vertical paths A069448-A069452.

Programs

  • Magma
    m:=25; R:=PowerSeriesRing(Integers(), m); Coefficients(R!(x*(1+6*x-16*x^2-8*x^3)/((1-16*x)*(1-19*x+ 74*x^2 -80*x^3-8*x^4)))); // G. C. Greubel, Apr 22 2018
  • Mathematica
    Rest[CoefficientList[Series[x*(1+6*x-16*x^2-8*x^3)/((1-16*x)*(1-19*x+ 74*x^2 -80*x^3-8*x^4)), {x,0,50}],x]] (* G. C. Greubel, Apr 22 2018 *)
    LinearRecurrence[{35,-378,1264,-1272,-128},{1,41,1041,22193,433809},20] (* Harvey P. Dale, Jan 01 2019 *)
  • PARI
    Vec(x*(1 + 6*x - 16*x^2 - 8*x^3) / ((1 - 16*x)*(1 - 19*x + 74*x^2 - 80*x^3 - 8*x^4)) + O(x^30)) \\ Colin Barker, Oct 12 2017
    

Formula

G.f.: x*(1 +6*x -16*x^2 -8*x^3)/((1 -16*x)*(1 -19*x +74*x^2 -80*x^3 - 8*x^4)).

A090888 Matrix defined by a(n,k) = 3^n*Fibonacci(k) - 2^n*Fibonacci(k-2), read by antidiagonals.

Original entry on oeis.org

1, 2, 0, 4, 1, 1, 8, 5, 3, 1, 16, 19, 9, 4, 2, 32, 65, 27, 14, 7, 3, 64, 211, 81, 46, 23, 11, 5, 128, 665, 243, 146, 73, 37, 18, 8, 256, 2059, 729, 454, 227, 119, 60, 29, 13, 512, 6305, 2187, 1394, 697, 373, 192, 97, 47, 21, 1024, 19171, 6561, 4246, 2123, 1151, 600, 311
Offset: 0

Views

Author

Ross La Haye, Feb 12 2004; revised Sep 24 2004, Sep 10 2005

Keywords

Comments

a(0,k) = A000045(k-1); a(1,k) = A000032(k); a(2,k) = A000285(k+1).
a(n,1) = a(n-1,1) + a(n-1,3) for n > 0; a(n,1) = A001047(n) = 2^(2n) - A083324(n); a(n,2) = A000244(n) = 2^(2n) - A005061(n); a(n,3) = 2a(n-1,4) for n > 0; a(n,3) = A027649(n); a(n,4) = A083313(n+1); a(n,5) = A084171(n+1).
Sum[a(n-k,k), {k,0,n}] = A098703(n+1), antidiagonal sums.
Let R, S and T be binary relations on the power set P(A) of a set A having n = |A| elements such that for every element x, y of P(A), xRy if x is a subset of y or y is a subset of x, xSy if x is a subset of y and xTy if x is a proper subset of y. Then a(n,3) = |R|, a(n,2) = |S| and a(n,1) = |T|. Note that a binary relation W on P(A) can be defined also such that for every element x, y of P(A) xWy if x is a proper subset of y and there are no z in P(A) such that x is a proper subset of z and z is a proper subset of y. A090802(n,1) = |W|. Also, a(n,0) = |P(A)|.

Examples

			   1    0    1    1    2    3    5    8    13    21    34
   2    1    3    4    7   11   18   29    47    76   123
   4    5    9   14   23   37   60   97   157   254   411
   8   19   27   46   73  119  192  311   503   814  1317
  16   65   81  146  227  373  600  973  1573  2546  4119
  32  211  243  454  697 1151 1848 2999  4847  7846 12693
  64  665  729 1394 2123 3517 5640 9157 14797 23954 38751
a(5,3) = 454 because Fibonacci(3) = 2, Fibonacci(1) = 1 and (2 * 3^5) - (1 * 2^5) = 454.
		

Programs

  • Mathematica
    Table[3^(n - k) Fibonacci@ k - 2^(n - k) Fibonacci[k - 2], {n, 0, 10}, {k, 0, n}] // Flatten (* Michael De Vlieger, Nov 28 2015 *)

Formula

a(n, k) = 3^n*Fibonacci(k) - 2^n*Fibonacci(k-2).
a(n, 0) = 2^n, a(n, 1) = 3^n - 2^n, a(n, k) = a(n, k-1) + a(n, k-2) for k > 1.
a(0, k) = Fibonacci(k-1), a(1, k) = Lucas(k), a(n, k) = 5a(n-1, k) - 6a(n-2, k) for n > 1.
O.g.f. (by rows) = (-2^n + (2^(n+1) - 3^n)x)/(-1+x+x^2). - Ross La Haye, Mar 30 2006
a(n,1) - a(n,0) = A003063(n+1). - Ross La Haye, Jun 22 2007
Binomial transform (by columns) of A118654. - Ross La Haye, Jun 22 2007

Extensions

More terms from Ray Chandler, Oct 27 2004

A167762 a(n) = 2*a(n-1)+3*a(n-2)-6*a(n-3) starting a(0)=a(1)=0, a(2)=1.

Original entry on oeis.org

0, 0, 1, 2, 7, 14, 37, 74, 175, 350, 781, 1562, 3367, 6734, 14197, 28394, 58975, 117950, 242461, 484922, 989527, 1979054, 4017157, 8034314, 16245775, 32491550, 65514541, 131029082, 263652487, 527304974, 1059392917, 2118785834, 4251920575, 8503841150
Offset: 0

Views

Author

Paul Curtz, Nov 11 2009

Keywords

Comments

Inverse binomial transform yields two zeros followed by A077917 (a signed variant of A127864).
a(n) mod 10 is zero followed by a sequence with period length 8: 0, 1, 2, 7, 4, 7, 4, 5 (repeat).
a(n) is the number of length n+1 binary words with some prefix w such that w contains three more 1's than 0's and no prefix of w contains three more 0's than 1's. - Geoffrey Critzer, Dec 13 2013
From Gus Wiseman, Oct 06 2023: (Start)
Also the number of subsets of {1..n} with two distinct elements summing to n + 1. For example, the a(2) = 1 through a(5) = 14 subsets are:
{1,2} {1,3} {1,4} {1,5}
{1,2,3} {2,3} {2,4}
{1,2,3} {1,2,4}
{1,2,4} {1,2,5}
{1,3,4} {1,3,5}
{2,3,4} {1,4,5}
{1,2,3,4} {2,3,4}
{2,4,5}
{1,2,3,4}
{1,2,3,5}
{1,2,4,5}
{1,3,4,5}
{2,3,4,5}
{1,2,3,4,5}
The complement is counted by A038754.
Allowing twins gives A167936, complement A108411.
For n instead of n + 1 we have A365544, complement A068911.
The version for all subsets (not just pairs) is A366130.
(End)

Crossrefs

First differences are A167936, complement A108411.

Programs

  • Mathematica
    LinearRecurrence[{2,3,-6},{0,0,1},40] (* Harvey P. Dale, Sep 17 2013 *)
    CoefficientList[Series[x^2/((2 x - 1) (3 x^2 - 1)), {x, 0, 50}], x] (* Vincenzo Librandi, Sep 17 2013 *)
    Table[Length[Select[Subsets[Range[n]],MemberQ[Total/@Subsets[#,{2}],n+1]&]],{n,0,10}] (* Gus Wiseman, Oct 06 2023 *)

Formula

a(n) mod 9 = A153130(n), n>3 (essentially the same as A154529, A146501 and A029898).
a(n+1)-2*a(n) = 0 if n even, = A000244((1+n)/2) if n odd.
a(2*n) = A005061(n). a(2*n+1) = 2*A005061(n).
G.f.: x^2/((2*x-1)*(3*x^2-1)). a(n) = 2^n - A038754(n). - R. J. Mathar, Nov 12 2009
G.f.: x^2/(1-2*x-3*x^2+6*x^3). - Philippe Deléham, Nov 11 2009

Extensions

Edited and extended by R. J. Mathar, Nov 12 2009

A085350 Binomial transform of poly-Bernoulli numbers A027649.

Original entry on oeis.org

1, 5, 23, 101, 431, 1805, 7463, 30581, 124511, 504605, 2038103, 8211461, 33022991, 132623405, 532087943, 2133134741, 8546887871, 34230598205, 137051532983, 548593552421, 2195536471151, 8785632669005, 35152991029223
Offset: 0

Views

Author

Paul Barry, Jun 24 2003

Keywords

Comments

Binomial transform is A085351.
a(n) mod 10 = period 4:repeat 1,5,3,1 = A132400. - Paul Curtz, Nov 13 2009

Crossrefs

a(n-1) = A080643(n)/2 = A081674(n+1) - A081674(n).
Cf. A000244 (3^n).

Programs

  • Magma
    [2*4^n-3^n: n in [0..30]]; // Vincenzo Librandi, Aug 13 2011
  • Mathematica
    LinearRecurrence[{4,9,-36},{1,5,23},30] (* Harvey P. Dale, Nov 30 2011 *)
    LinearRecurrence[{7, -12},{1, 5},23] (* Ray Chandler, Aug 03 2015 *)

Formula

G.f.: (1-2x)/((1-3x)(1-4x)).
E.g.f.: 2exp(4x) - exp(3x).
a(n) = 2*4^n-3^n.
From Paul Curtz, Nov 13 2009: (Start)
a(n) = 4*a(n-1) + 9*a(n-2) - 36*a(n-3);
a(n) = 4*a(n-1) + 3^(n-1), both like A005061 (note for A005061 dual formula a(n) = 3*a(n-1) + 4^(n-1) = 3*a(n-1) + A000302(n-1)).
a(n) = 3*a(n-1) + 2^(2n+1) = 3*a(n-1) + A004171(n).
a(n) = A005061(n) + A000302(n).
b(n) = mix(A005061, A085350) = 0,1,1,5,7,23,... = differences of (A167762 = 0,0,1,2,7,14,37,...); b(n) differences = A167784. (End)

A277965 Numbers whose largest decimal digit is 3.

Original entry on oeis.org

3, 13, 23, 30, 31, 32, 33, 103, 113, 123, 130, 131, 132, 133, 203, 213, 223, 230, 231, 232, 233, 300, 301, 302, 303, 310, 311, 312, 313, 320, 321, 322, 323, 330, 331, 332, 333, 1003, 1013, 1023, 1030, 1031, 1032, 1033, 1103, 1113, 1123, 1130, 1131, 1132
Offset: 1

Views

Author

Colin Barker, Nov 06 2016

Keywords

Comments

Number of terms less than 10^n is 4^n - 3^n. - Chai Wah Wu, Nov 06 2016

Crossrefs

Cf. A005061 (4^n - 3^n).
Cf. A106099 (subsequence of primes).

Programs

  • GAP
    Filtered([1..450],n->Maximum(ListOfDigits(n))=3); # Muniru A Asiru, Mar 01 2019
  • Mathematica
    A277965Q = Max[IntegerDigits[#]] == 3 &; Select[Range[1200], A277965Q] (* JungHwan Min, Nov 06 2016 *)
  • PARI
    L=List(); for(n=1, 10000, if(vecmax(digits(n))==3, listput(L, n))); Vec(L)
    

A051588 Number of 3 X n binary matrices such that any 2 rows have a common 1.

Original entry on oeis.org

0, 1, 15, 175, 1827, 17791, 164955, 1475335, 12844707, 109581871, 920591595, 7643833495, 62904774387, 514168732351, 4180996130235, 33864296127655, 273465115692867, 2203291473841231, 17721094011796875, 142344054436901815
Offset: 0

Views

Author

Vladeta Jovovic, Goran Kilibarda

Keywords

Crossrefs

Cf. A005061.

Programs

  • GAP
    List([0..20], n-> 8^n -3*6^n +3*5^n -4^n); # G. C. Greubel, Nov 12 2019
  • Magma
    [8^n -3*6^n +3*5^n -4^n: n in [0..20]]; // G. C. Greubel, Nov 12 2019
    
  • Maple
    A051588:=n->8^n-3*6^n+3*5^n-4^n: seq(A051588(n), n=0..30); # Wesley Ivan Hurt, May 03 2017
  • Mathematica
    Table[8^n-3*6^n+3*5^n-4^n, {n,0,20}] (* or *) LinearRecurrence[{23,-194, 712,-960}, {0,1,15,175}, 20] (* Harvey P. Dale, Mar 07 2012 *)
  • PARI
    vector(21, n, m=n-1; 8^m -3*6^m +3*5^m -4^m) \\ G. C. Greubel, Oct 06 2017
    
  • Sage
    [8^n -3*6^n +3*5^n -4^n for n in (0..20)] # G. C. Greubel, Nov 12 2019
    

Formula

a(n) = 8^n - 3*6^n + 3*5^n - 4^n.
a(0)=0, a(1)=1, a(2)=15, a(3)=175, a(n) = 23*a(n-1) -194*a(n-2) + 712*a(n-3) -960*a(n-4). - Harvey P. Dale, Mar 07 2012
G.f.: x*(24*x^2-8*x+1)/((4*x-1)*(5*x-1)*(6*x-1)*(8*x-1)). - Colin Barker, Nov 05 2012
E.g.f.: exp(8*x) -3*exp(6*x) +3*exp(5*x) -exp(4*x). - G. C. Greubel, Nov 12 2019

A255463 a(n) = 3*4^n - 2*3^n.

Original entry on oeis.org

1, 6, 30, 138, 606, 2586, 10830, 44778, 183486, 747066, 3027630, 12228618, 49268766, 198137946, 795740430, 3192527658, 12798808446, 51281327226, 205383589230, 822309197898, 3291561314526, 13173218826906, 52713796014030, 210917946175338, 843860071059006, 3376005143308986, 13505715150454830
Offset: 0

Views

Author

Keywords

Comments

a(n-1) is also the number of n-digit numbers whose largest decimal digit is 3. - Stefano Spezia, Nov 15 2023

Crossrefs

Cf. A255462.
First differences of 4^n - 3^n = A005061(n). See A257285, A257286, A257287, A257288, A257289 for first differences of 5^n - 4^n, ..., 9^n - 8^n. - M. F. Hasler, May 04 2015

Programs

Formula

G.f.: (1-x)/((1-3*x)*(1-4*x)).
a(n+1) = 7*a(n) - 12*a(n-1) with a(0)=1, a(1)=6.
a(n) = A255462(2^n-1).
E.g.f.: exp(3*x)*(3*exp(x) - 2). - Stefano Spezia, Nov 15 2023

Extensions

Simpler definition from N. J. A. Sloane, Mar 10 2015

A087490 Primes p such that 4^p - 3^p is composite.

Original entry on oeis.org

5, 11, 13, 19, 23, 29, 31, 37, 41, 43, 47, 53, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 293, 307
Offset: 1

Views

Author

Cino Hilliard, Oct 26 2003

Keywords

Comments

Primes not in A059801. - Robert Israel, Nov 03 2024

Crossrefs

Primes p such that k^p - (k-1)^p is composite: A087489 (k=3), this sequence (k=4), A087685 (k=5), A087749 (k=6), A087759 (k=7), A087763 (k=8), A087894 (k=9), A087895 (k=10).

Programs

  • Maple
    filter:= p -> isprime(p) and not isprime(4^p-3^p):
    select(filter, [seq(i,i=3..1000,2)]); # Robert Israel, Nov 03 2024
  • Mathematica
    Select[Prime[Range[70]],CompositeQ[4^#-3^#]&] (* Harvey P. Dale, Mar 14 2025 *)
  • PARI
    apmb(a,b,n) = { forprime(x=2,n, y=a^x-b^x; if(!ispseudoprime(y), print1(x","); ) ) }

Extensions

Offset corrected by Mohammed Yaseen, Jul 18 2022
Previous Showing 11-20 of 84 results. Next