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-8 of 8 results.

A204124 Array: row n shows the coefficients of the characteristic polynomial of the n-th principal submatrix of f(i,j) = gcd(2^(i-1), 2^(j-1)) (A144464).

Original entry on oeis.org

1, -1, -3, -2, 1, -1, 11, 3, -1, 6, -6, -29, -4, 1, 1, -13, 8, 56, 5, -1, -1, -6, 71, -46, -102, -6, 1, 0, 4, 8, -128, 73, 161, 7, -1, 1, -4, -76, 126, 322, -164, -245, -8, 1, 1, -33, 63, 285, -295, -629, 277, 351, 9, -1, -4, 22, 121, -256, -722, 662
Offset: 1

Views

Author

Clark Kimberling, Jan 11 2012

Keywords

Comments

Let p(n)=p(n,x) be the characteristic polynomial of the n-th principal submatrix. The zeros of p(n) are real, and they interlace the zeros of p(n+1). See A202605 and A204016 for guides to related sequences.

Examples

			Top of the array:
   1,  -1;
  -3,  -2,   1;
  -1,  11,   3,  -1;
   6,  -6, -29,  -4,   1;
		

References

  • (For references regarding interlacing roots, see A202605.)

Crossrefs

Programs

  • Mathematica
    f[i_, j_] := Max[Floor[i/j], Floor[j/i]];
    m[n_] := Table[f[i, j], {i, 1, n}, {j, 1, n}]
    TableForm[m[8]] (* 8 X 8 principal submatrix *)
    Flatten[Table[f[i, n + 1 - i],
      {n, 1, 15}, {i, 1, n}]]  (* A204123 *)
    p[n_] := CharacteristicPolynomial[m[n], x];
    c[n_] := CoefficientList[p[n], x]
    TableForm[Flatten[Table[p[n], {n, 1, 10}]]]
    Table[c[n], {n, 1, 12}]
    Flatten[%]                 (* A204124 *)
    TableForm[Table[c[n], {n, 1, 10}]]

A204122 Array: row n shows the coefficients of the characteristic polynomial of the n-th principal submatrix of f(i,j) = gcd(2^(i-1), 2^(j-1)) (A144464).

Original entry on oeis.org

1, -1, 1, -3, 1, 2, -8, 7, -1, 8, -36, 43, -15, 1, 64, -304, 414, -198, 31, -1, 1024, -4992, 7224, -3960, 849, -63, 1, 32768, -161792, 241088, -140864, 34674, -3516, 127, -1, 2097152, -10420224, 15752192, -9492480, 2493640, -290412
Offset: 1

Views

Author

Clark Kimberling, Jan 11 2012

Keywords

Comments

Let p(n)=p(n,x) be the characteristic polynomial of the n-th principal submatrix. The zeros of p(n) are real, and they interlace the zeros of p(n+1). See A202605 and A204016 for guides to related sequences.

Examples

			Top of the array:
  1,  -1;
  1,  -3,   1;
  2,  -8,   7,  -1;
  8, -36,  43, -15,   1;
		

References

  • (For references regarding interlacing roots, see A202605.)

Crossrefs

Programs

  • Mathematica
    f[i_, j_] := GCD[2^(i - 1), 2^(j - 1)];
    m[n_] := Table[f[i, j], {i, 1, n}, {j, 1, n}]
    TableForm[m[8]] (* 8 X 8 principal submatrix *)
    Flatten[Table[f[i, n + 1 - i],
      {n, 1, 15}, {i, 1, n}]] (* A144464 *)
    p[n_] := CharacteristicPolynomial[m[n], x];
    c[n_] := CoefficientList[p[n], x]
    TableForm[Flatten[Table[p[n], {n, 1, 10}]]]
    Table[c[n], {n, 1, 12}]
    Flatten[%]              (* A204122 *)
    TableForm[Table[c[n], {n, 1, 10}]]

A204016 Symmetric matrix based on f(i,j) = max(j mod i, i mod j), by antidiagonals.

Original entry on oeis.org

0, 1, 1, 1, 0, 1, 1, 2, 2, 1, 1, 2, 0, 2, 1, 1, 2, 3, 3, 2, 1, 1, 2, 3, 0, 3, 2, 1, 1, 2, 3, 4, 4, 3, 2, 1, 1, 2, 3, 4, 0, 4, 3, 2, 1, 1, 2, 3, 4, 5, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 0, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 0, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 7
Offset: 1

Views

Author

Clark Kimberling, Jan 10 2012

Keywords

Comments

A204016 represents the matrix M given by f(i,j) = max{(j mod i), (i mod j)} for i >= 1 and j >= 1. See A204017 for characteristic polynomials of principal submatrices of M, with interlacing zeros.
Guide to symmetric matrices M based on functions f(i,j) and characteristic polynomial sequences (c.p.s.) with interlaced zeros:
f(i,j)..........................M.........c.p.s.
C(i+j,j)........................A007318...A045912
min(i,j)........................A003983...A202672
max(i,j)........................A051125...A203989
(i+j)*min(i,j)..................A203990...A203991
|i-j|...........................A049581...A203993
max(i-j+1,j-i+1)................A143182...A203992
min(i-j+1,j-i+1)................A203994...A203995
min(i(j+1),j(i+1))..............A203996...A203997
max(i(j+1)-1,j(i+1)-1)..........A203998...A203999
min(i(j+1)-1,j(i+1)-1)..........A204000...A204001
min(2i+j,i+2j)..................A204002...A204003
max(2i+j-2,i+2j-2)..............A204004...A204005
min(2i+j-2,i+2j-2)..............A204006...A204007
max(3i+j-3,i+3j-3)..............A204008...A204011
min(3i+j-3,i+3j-3)..............A204012...A204013
min(3i-2,3j-2)..................A204028...A204029
1+min(j mod i, i mod j).........A204014...A204015
max(j mod i, i mod j)...........A204016...A204017
1+max(j mod i, i mod j).........A204018...A204019
min(i^2,j^2)....................A106314...A204020
min(2i-1, 2j-1).................A157454...A204021
max(2i-1, 2j-1).................A204022...A204023
min(i(i+1)/2,j(j+1)/2)..........A106255...A204024
gcd(i,j)........................A003989...A204025
gcd(i+1,j+1)....................A204030...A204111
min(F(i+1),F(j+1)),F=A000045....A204026...A204027
gcd(F(i+1),F(j+1)),F=A000045....A204112...A204113
gcd(L(i),L(j)),L=A000032........A204114...A204115
gcd(2^i-1,2^j-2)................A204116...A204117
gcd(prime(i),prime(j))..........A204118...A204119
gcd(prime(i+1),prime(j+1))......A204120...A204121
gcd(2^(i-1),2^(j-1))............A144464...A204122
max(floor(i/j),floor(j/i))......A204123...A204124
min(ceiling(i/j),ceiling(j/i))..A204143...A204144
Delannoy matrix.................A008288...A204135
max(2i-j,2j-i)..................A204154...A204155
-1+max(3i-j,3j-i)...............A204156...A204157
max(3i-2j,3j-2i)................A204158...A204159
floor((i+1)/2)..................A204164...A204165
ceiling((i+1)/2)................A204166...A204167
i+j.............................A003057...A204168
i+j-1...........................A002024...A204169
i*j.............................A003991...A204170
..abbreviation below: AOE means "all 1's except"
AOE f(i,i)=i....................A204125...A204126
AOE f(i,i)=A000045(i+1).........A204127...A204128
AOE f(i,i)=A000032(i)...........A204129...A204130
AOE f(i,i)=2i-1.................A204131...A204132
AOE f(i,i)=2^(i-1)..............A204133...A204134
AOE f(i,i)=3i-2.................A204160...A204161
AOE f(i,i)=floor((i+1)/2).......A204162...A204163
...
Other pairs (M, c.p.s.): (A204171, A204172) to (A204183, A204184)
See A202695 for a guide to choices of symmetric matrix M for which the zeros of the characteristic polynomials are all positive.

Examples

			Northwest corner:
  0 1 1 1 1 1 1 1
  0 1 2 2 2 2 2 2
  1 2 0 3 3 3 3 3
  1 2 3 0 4 4 4 4
  1 2 3 4 0 5 5 5
  1 2 3 4 5 0 6 6
  1 2 3 4 5 6 0 7
		

Crossrefs

Programs

  • Mathematica
    f[i_, j_] := Max[Mod[i, j], Mod[j, i]];
    m[n_] := Table[f[i, j], {i, 1, n}, {j, 1, n}]
    TableForm[m[8]] (* 8x8 principal submatrix *)
    Flatten[Table[f[i, n + 1 - i],
    {n, 1, 12}, {i, 1, n}]]  (* A204016 *)
    p[n_] := CharacteristicPolynomial[m[n], x];
    c[n_] := CoefficientList[p[n], x]
    TableForm[Flatten[Table[p[n], {n, 1, 10}]]]
    Table[c[n], {n, 1, 12}]
    Flatten[%]               (* A204017 *)
    TableForm[Table[c[n], {n, 1, 10}]]

A061547 Number of 132 and 213-avoiding derangements of {1,2,...,n}.

Original entry on oeis.org

1, 0, 1, 2, 6, 10, 26, 42, 106, 170, 426, 682, 1706, 2730, 6826, 10922, 27306, 43690, 109226, 174762, 436906, 699050, 1747626, 2796202, 6990506, 11184810, 27962026, 44739242, 111848106, 178956970, 447392426, 715827882, 1789569706, 2863311530, 7158278826
Offset: 0

Views

Author

Emeric Deutsch, May 16 2001

Keywords

Comments

Or, number of permutations with no fixed points avoiding 213 and 132.
Number of derangements of {1,2,...,n} having ascending runs consisting of consecutive integers. Example: a(4)=6 because we have 234/1, 34/12, 34/2/1, 4/123, 4/3/12, 4/3/2/1, the ascending runs being as indicated. - Emeric Deutsch, Dec 08 2004
Let c be twice the sequence A002450 interlaced with itself (from the second term), i.e., c = 2*(0, 1, 1, 5, 5, 21, 21, 85, 85, 341, 341, ...). Let d be powers of 4 interlaced with the zero sequence: d = (1, 0, 4, 0, 16, 0, 64, 0, 256, 0, ...). Then a(n+1) = c(n) + d(n). - Creighton Dement, May 09 2005
Inverse binomial transform of A094705 (0, 1, 4, 15). - Paul Curtz, Jun 15 2008
Equals row sums of triangle A177993. - Gary W. Adamson, May 16 2010
a(n-1) is also the number of order preserving partial isometries (of an n-chain) of fix 1 (fix of alpha equals the number of fixed points of alpha). - Abdullahi Umar, Dec 28 2010
a(n+1) <= A218553(n) is also the Moore lower bound on the order of a (5,n)-cage. - Jason Kimberley, Oct 31 2011
For n > 0, a(n) is the location of the n-th new number to make a first appearance in A087230. E.g., the 17th number to make its first appearance in A087230 is 18 and this occurs at A087230(43690) and a(17)=43690. - K D Pegrume, Jan 26 2022
Position in A002487 of 2 adjacent terms of A000045. E.g., 3/5 at 10, 5/8 at 26, 8/13 at 42, ... - Ed Pegg Jr, Dec 27 2022

Examples

			a(4)=6 because the only 132 and 213-avoiding permutations of {1,2,3,4} without fixed points are: 2341, 3412, 3421, 4123, 4312 and 4321.
		

Crossrefs

Cf. A177993. - Gary W. Adamson, May 16 2010
Cf. A183158, A183159. - Abdullahi Umar, Dec 28 2010
Moore lower bound on the order of a (k,g) cage: A198300 (square); rows: A000027 (k=2), A027383 (k=3), A062318 (k=4), this sequence (k=5), A198306 (k=6), A198307 (k=7), A198308 (k=8), A198309 (k=9), A198310 (k=10), A094626 (k=11); columns: A020725 (g=3), A005843 (g=4), A002522 (g=5), A051890 (g=6), A188377 (g=7). - Jason Kimberley, Oct 31 2011

Programs

Formula

a(n) = (3/8)*2^n + (1/24)*(-2)^n - 2/3 for n>=1.
a(n) = 4*a(n-2) + 2, a(0)=1, a(1)=0, a(2)=1.
G.f: (5*z^3-3*z^2-z+1)/((z-1)*(4*z^2-1)).
a(n) = A020989((n-2)/2) for n=2, 4, 6, ... and A020988((n-3)/2) for n=3, 5, 7, ... .
a(n+1)-2*a(n) = A078008 signed. Differences: doubled A000302. - Paul Curtz, Jun 15 2008
a(2i+1) = 2*Sum_{j=0..i-1} 4^j = string "2"^i read in base 4.
a(2i+2) = 4^i + 2*Sum_{j=0..i-1} 4^j = string "1"*"2"^i read in base 4.
a(n+2) = Sum_{k=0..n} A144464(n,k)^2 = Sum_{k=0..n} A152716(n,k). - Philippe Deléham and Michel Marcus, Feb 26 2014
a(2*n-1) = A176965(2*n), a(2*n) = A176965(2*n-1) for n>0. - Yosu Yurramendi, Dec 23 2016
a(2*n-1) = A020988(k-1), a(2*n)= A020989(n-1) for n>0. - Yosu Yurramendi, Jan 03 2017
a(n+2) = 2*A086893(n), n > 0. - Yosu Yurramendi, Mar 07 2017
E.g.f.: (15 - 8*cosh(x) + 5*cosh(2*x) - 8*sinh(x) + 4*sinh(2*x))/12. - Stefano Spezia, Apr 07 2022

Extensions

a(0)=1 prepended by Alois P. Heinz, Jan 27 2022

A004197 Triangle read by rows. T(n, k) = n - k if n - k < k, otherwise k.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 2, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 2, 3, 2, 1, 0, 0, 1, 2, 3, 3, 2, 1, 0, 0, 1, 2, 3, 4, 3, 2, 1, 0, 0, 1, 2, 3, 4, 4, 3, 2, 1, 0, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 0, 1, 2, 3, 4, 5, 5, 4, 3, 2, 1, 0, 0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0, 0, 1, 2, 3, 4, 5, 6, 6, 5, 4, 3, 2, 1, 0, 0, 1, 2
Offset: 0

Views

Author

Keywords

Comments

Table of min(x,y), where (x,y) = (0,0),(0,1),(1,0),(0,2),(1,1),(2,0),...
Highest power of 6 that divides A036561. - Fred Daniel Kline, May 29 2012
Triangle T(n,k) read by rows: T(n,k) = min(k,n-k). - Philippe Deléham, Feb 25 2014

Examples

			From _Philippe Deléham_, Feb 25 2014: (Start)
Top left corner of table:
  0 0 0 0
  0 1 1 1
  0 1 2 2
  0 1 2 3
Triangle T(n,k) begins:
  0;
  0, 0;
  0, 1, 0;
  0, 1, 1, 0;
  0, 1, 2, 1, 0;
  0, 1, 2, 2, 1, 0;
  0, 1, 2, 3, 2, 1, 0;
  0, 1, 2, 3, 3, 2, 1, 0;
  0, 1, 2, 3, 4, 3, 2, 1, 0;
  0, 1, 2, 3, 4, 4, 3, 2, 1, 0;
  0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0;
  0, 1, 2, 3, 4, 5, 5, 4, 3, 2, 1, 0;
  0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0;
  0, 1, 2, 3, 4, 5, 6, 6, 5, 4, 3, 2, 1, 0;
  0, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1, 0;
  0, 1, 2, 3, 4, 5, 6, 7, 7, 6, 5, 4, 3, 2, 1, 0;
  ... (End)
		

Crossrefs

Similar to but strictly different from A087062 and A261684.
Row sums give A002620. - Reinhard Zumkeller, Jul 27 2005
Positions of zero are given in A117142. - Ridouane Oudra, Apr 30 2019

Programs

  • Haskell
    a004197 n k = a004197_tabl !! n !! k
    a004197_tabl = map a004197_row [0..]
    a004197_row n = hs ++ drop (1 - n `mod` 2) (reverse hs)
       where hs = [0..n `div` 2]
    -- Reinhard Zumkeller, Aug 14 2011
    
  • Maple
    T := (n, k) -> if n - k < k then n - k else k fi:
    for n from 0 to 9 do seq(T(n, k), k=0..n) od; # Peter Luschny, May 07 2023
  • Mathematica
    Flatten[Table[IntegerExponent[2^(n - k) 3^k, 6], {n, 0, 20}, {k, 0, n}]] (* Fred Daniel Kline, May 29 2012 *)
  • PARI
    T(x,y)=min(x,y) \\ Charles R Greathouse IV, Feb 07 2017

Formula

a(n) = A003983(n) - 1.
G.f.: x*y/((1-x)*(1-y)*(1-x*y)). - Franklin T. Adams-Watters, Feb 06 2006
2^T(n,k) = A144464(n,k), 3^T(n,k) = A152714(n,k), 4^T(n,k) = A152716(n,k), 5^T(n,k) = A152717(n,k). - Philippe Deléham, Feb 25 2014
a(n) = (1/2)*(t - 1 - abs(t^2 - 2*n - 1)), where t = floor(sqrt(2*n+1)+1/2). - Ridouane Oudra, May 03 2019

Extensions

Mathematica program fixed by Harvey P. Dale, Nov 26 2020
Name edited by Peter Luschny, May 07 2023

A152716 Triangle T(n,k) read by rows: T(n,k) = 4^min(k, n-k) = 4^A004197(n,k).

Original entry on oeis.org

1, 1, 1, 1, 4, 1, 1, 4, 4, 1, 1, 4, 16, 4, 1, 1, 4, 16, 16, 4, 1, 1, 4, 16, 64, 16, 4, 1, 1, 4, 16, 64, 64, 16, 4, 1, 1, 4, 16, 64, 256, 64, 16, 4, 1, 1, 4, 16, 64, 256, 256, 64, 16, 4, 1, 1, 4, 16, 64, 256, 1024, 256, 64, 16, 4, 1
Offset: 0

Views

Author

Roger L. Bagula and Gary W. Adamson, Dec 11 2008

Keywords

Comments

Row sums are: {1, 2, 6, 10, 26, 42, 106, 170, 426, 682, 1706,...} = A061547(n+2).

Examples

			{1},
{1, 1},
{1, 4, 1},
{1, 4, 4, 1},
{1, 4, 16, 4, 1},
{1, 4, 16, 16, 4, 1},
{1, 4, 16, 64, 16, 4, 1},
{1, 4, 16, 64, 64, 16, 4, 1},
{1, 4, 16, 64, 256, 64, 16, 4, 1},
{1, 4, 16, 64, 256, 256, 64, 16, 4, 1},
{1, 4, 16, 64, 256, 1024, 256, 64, 16, 4, 1}
		

Crossrefs

Programs

  • Mathematica
    Clear[a, k, m]; k = 4; a[0] = {1}; a[1] = {1, 1};
    a[n_] := a[n] = Join[{1}, k*a[n - 2], {1}];
    Table[a[n], {n, 0, 10}];
    Flatten[%]

Formula

T(n,k) = 4^min(k, n-k). - Philippe Deléham, Feb 25 2014
T(n,k) = A144464(n,k)^2. - Philippe Deléham, Feb 26 2014

Extensions

Better name by Philippe Deléham, Feb 25 2014

A152714 Triangle read by rows: T(n,k) = 3^min(k, n-k).

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 3, 3, 1, 1, 3, 9, 3, 1, 1, 3, 9, 9, 3, 1, 1, 3, 9, 27, 9, 3, 1, 1, 3, 9, 27, 27, 9, 3, 1, 1, 3, 9, 27, 81, 27, 9, 3, 1, 1, 3, 9, 27, 81, 81, 27, 9, 3, 1, 1, 3, 9, 27, 81, 243, 81, 27, 9, 3, 1
Offset: 0

Views

Author

Roger L. Bagula and Gary W. Adamson, Dec 11 2008

Keywords

Examples

			Triangle begins
  {1},
  {1, 1},
  {1, 3, 1},
  {1, 3, 3,  1},
  {1, 3, 9,  3,  1},
  {1, 3, 9,  9,  3,   1},
  {1, 3, 9, 27,  9,   3,  1},
  {1, 3, 9, 27, 27,   9,  3,  1},
  {1, 3, 9, 27, 81,  27,  9,  3, 1},
  {1, 3, 9, 27, 81,  81, 27,  9, 3, 1},
  {1, 3, 9, 27, 81, 243, 81, 27, 9, 3, 1}
		

Crossrefs

Cf. A004197, A144464, A152716, A152717, A062318 (row sums).

Programs

  • Magma
    [[3^(Min(k,n-k)): k in [0..n]]: n in [0..15]]; // G. C. Greubel, Sep 01 2018
  • Mathematica
    Clear[a, k, m]; k = 3; a[0] = {1}; a[1] = {1, 1};
    a[n_] := a[n] = Join[{1}, k*a[n - 2], {1}];
    Table[a[n], {n, 0, 10}];
    Flatten[%]
    Table[3^(Min[k, n - k]), {n, 0, 100}, {k, 0, n}] // Flatten (* G. C. Greubel, Sep 01 2018 *)
  • PARI
    for(n=0,15, for(k=0,n, print1(3^(min(k,n-k)), ", "))) \\ G. C. Greubel, Sep 01 2018
    

Formula

T(n,k) = 3^min(k, n-k) = 3^A004197(n,k). - Philippe Deléham, Feb 25 2014

Extensions

Better name by Philippe Deléham, Feb 25 2014

A152717 Triangle T(n,k) read by rows: T(n,k) = 5^min(k, n-k) = 5^A004197(n,k).

Original entry on oeis.org

1, 1, 1, 1, 5, 1, 1, 5, 5, 1, 1, 5, 25, 5, 1, 1, 5, 25, 25, 5, 1, 1, 5, 25, 125, 25, 5, 1, 1, 5, 25, 125, 125, 25, 5, 1, 1, 5, 25, 125, 625, 125, 25, 5, 1, 1, 5, 25, 125, 625, 625, 125, 25, 5, 1, 1, 5, 25, 125, 625, 3125, 625, 125, 25, 5, 1
Offset: 0

Views

Author

Roger L. Bagula and Gary W. Adamson, Dec 11 2008

Keywords

Comments

Row sums are: {1, 2, 7, 12, 37, 62, 187, 312, 937, 1562, 4687,...}

Examples

			{1},
{1, 1},
{1, 5, 1},
{1, 5, 5, 1},
{1, 5, 25, 5, 1},
{1, 5, 25, 25, 5, 1},
{1, 5, 25, 125, 25, 5, 1},
{1, 5, 25, 125, 125, 25, 5, 1},
{1, 5, 25, 125, 625, 125, 25, 5, 1},
{1, 5, 25, 125, 625, 625, 125, 25, 5, 1},
{1, 5, 25, 125, 625, 3125, 625, 125, 25, 5, 1}
		

Crossrefs

Programs

  • Mathematica
    Clear[a, k, m]; k = 5; a[0] = {1}; a[1] = {1, 1};
    a[n_] := a[n] = Join[{1}, k*a[n - 2], {1}];
    Table[a[n], {n, 0, 10}];
    Flatten[%]

Formula

T(n,k) = 5^min(k, n-k). - Philippe Deléham, Feb 25 2014

Extensions

Better name from Philippe Deléham, Feb 25 2014
Showing 1-8 of 8 results.