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 51-60 of 98 results. Next

A167630 Riordan array (1/(1-x),xm(x)) where m(x) is the g.f. of Motzkin numbers A001006.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 4, 3, 1, 1, 8, 8, 4, 1, 1, 17, 20, 13, 5, 1, 1, 38, 50, 38, 19, 6, 1, 1, 89, 126, 107, 63, 26, 7, 1, 1, 216, 322, 296, 196, 96, 34, 8, 1, 1, 539, 834, 814, 588, 326, 138, 43, 9, 1, 1, 1374, 2187, 2236, 1728, 1052, 507, 190, 53, 10, 1
Offset: 0

Views

Author

Philippe Deléham, Nov 07 2009

Keywords

Examples

			Triangle begins:
  1;
  1,  1;
  1,  2,  1;
  1,  4,  3,  1;
  1,  8,  8,  4,  1;
  1, 17, 20, 13,  5, 1;
  1, 38, 50, 38, 19, 6, 1;
  ...
		

Crossrefs

Antidiagonal sums give A082395.
Row sums give A383527.
Diagonals include: A006416, A034856, A086615, A140662.

Programs

  • Maple
    T:= proc(n, k) option remember; `if`(k=0, 1,
          `if`(k>n, 0, T(n-1, k-1)+T(n-1, k)+T(n-1, k+1)))
        end:
    seq(seq(T(n, k), k=0..n), n=0..12);  # Alois P. Heinz, Apr 20 2018
  • Mathematica
    T[, 0] = T[n, n_] = 1;
    T[n_, k_] /; 0, ] = 0;
    Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, Dec 09 2019 *)

Formula

T(n,0)=1, T(0,k)=0 for k>0, T(n,k)=0 if k>n, T(n,k)=T(n-1,k-1)+T(n-1,k)+T(n-1,k+1).
Sum_{k=0..n} k * T(n,k) = A003462(n). - Alois P. Heinz, Apr 20 2018
Sum_{k=0..n} (-1)^(k+1) * T(n,k) = A082397(n-2) for n>=2. - Alois P. Heinz, May 02 2025

A209293 Inverse permutation of A185180.

Original entry on oeis.org

1, 2, 3, 5, 4, 6, 8, 9, 7, 10, 13, 12, 14, 11, 15, 18, 19, 17, 20, 16, 21, 25, 24, 26, 23, 27, 22, 28, 32, 33, 31, 34, 30, 35, 29, 36, 41, 40, 42, 39, 43, 38, 44, 37, 45, 50, 51, 49, 52, 48, 53, 47, 54, 46, 55, 61, 60, 62, 59, 63, 58, 64, 57, 65, 56, 66, 72, 73, 71, 74, 70, 75, 69, 76, 68, 77, 67
Offset: 1

Views

Author

Boris Putievskiy, Jan 16 2013

Keywords

Comments

Permutation of the natural numbers. a(n) is a pairing function: a function that reversibly maps Z^{+} x Z^{+} onto Z^{+}, where Z^{+} is the set of integer positive numbers.
Enumeration table T(n,k) by diagonals. The order of the list
if n is odd - T(n-1,2),T(n-3,4),...,T(2,n-1),T(1,n),T(3,n-2),...T(n,1).
if n is even - T(n-1,2),T(n-3,4),...,T(3,n-2),T(1,n),T(2,n-1),...T(n,1).
Table T(n,k) contains:
Column number 1 A000217,
column number 2 A000124,
column number 3 A000096,
column number 4 A152948,
column number 5 A034856,
column number 6 A152950,
column number 7 A055998.
Row number 1 A000982,
row number 2 A097063.

Examples

			The start of the sequence as table:
  1....2...5...8..13..18...25...32...41...
  3....4...9..12..19..24...33...40...51...
  6....7..14..17..26..31...42...49...62...
  10..11..20..23..34..39...52...59...74...
  15..16..27..30..43..48...63...70...87...
  21..22..35..38..53..58...75...82..101...
  28..29..44..47..64..69...88...95..116...
  36..37..54..57..76..81..102..109..132...
  45..46..65..68..89..94..117..124..149...
  . . .
The start of the sequence as triangle array read by rows:
  1;
  2,3;
  5,4,6;
  8,9,7,10;
  13,12,14,11,15;
  18,19,17,20,16,21;
  25,24,26,23,27,22,28;
  32,33,31,34,30,35,29,36;
  41,40,42,39,43,38,44,37,45;
  . . .
Row number r contains permutation from r numbers:
if r is odd  ceiling(r^2/2), ceiling(r^2/2)+1, ceiling(r^2/2)-1, ceiling(r^2/2)+2, ceiling(r^2/2)-2,...r*(r+1)/2;
if r is even ceiling(r^2/2), ceiling(r^2/2)-1, ceiling(r^2/2)+1, ceiling(r^2/2)-2, ceiling(r^2/2)+2,...r*(r+1)/2;
		

Crossrefs

Programs

  • Mathematica
    max = 10; row[n_] := Table[Ceiling[(n + k - 1)^2/2] + If[OddQ[k], 1, -1]*Floor[n/2], {k, 1, max}]; t = Table[row[n], {n, 1, max}]; Table[t[[n - k + 1, k]], {n, 1, max}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Jan 17 2013 *)
  • Python
    t=int((math.sqrt(8*n-7) - 1)/ 2)
    i=n-t*(t+1)/2
    j=(t*t+3*t+4)/2-n
    m1=int((i+j)/2)+int(i/2)*(-1)**(i+t+1)
    m2=int((i+j+1)/2)+int(i/2)*(-1)**(i+t)
    m=(m1+m2-1)*(m1+m2-2)/2+m1

Formula

As table T(n,k) read by antidiagonals
T(n,k) = n*n/2+4*(floor((k-1)/2)+1)*n+ceiling((k-1)^2/2), n,k > 0.
As linear sequence
a(n) = (m1+m2-1)*(m1+m2-2)/2+m1, where
m1 = int((i+j)/2)+int(i/2)*(-1)^(i+t+1),
m2 = int((i+j+1)/2)+int(i/2)*(-1)^(i+t),
t = int((math.sqrt(8*n-7) - 1)/ 2),
i = n-t*(t+1)/2,
j = (t*t+3*t+4)/2-n.

A283394 a(n) = 3*n*(3*n + 7)/2 + 4.

Original entry on oeis.org

4, 19, 43, 76, 118, 169, 229, 298, 376, 463, 559, 664, 778, 901, 1033, 1174, 1324, 1483, 1651, 1828, 2014, 2209, 2413, 2626, 2848, 3079, 3319, 3568, 3826, 4093, 4369, 4654, 4948, 5251, 5563, 5884, 6214, 6553, 6901, 7258, 7624, 7999, 8383, 8776, 9178, 9589, 10009
Offset: 0

Views

Author

Bruno Berselli, Mar 23 2017

Keywords

Comments

Sum_{k = 0..n} (3*k + r)^3 is divisible by 3*n*(3*n + 2*r + 3)/2 + r^2: the sequence corresponds to the case r = 2 of this formula (other cases are listed in Crossrefs section).
Also, Sum_{k = 0..n} (3*k + 2)^3 / a(n) gives 2, 7, 15, 26, 40, 57, 77, 100, 126, 155, 187, 222, ... (A005449).
a(n) is even if n belongs to A014601. No term is divisible by 3, 5, 7 and 11.

Crossrefs

Sequences with formula 3*n*(3*n + 2*r + 3)/2 + r^2: A038764 (r=-1), A027468 (r=0), A081271 (r=1), this sequence (r=2), A027468 (r=3; offset: -1), A080855 (r=4; offset: -2).

Programs

  • Magma
    [3*n*(3*n+7)/2+4: n in [0..50]];
    
  • Mathematica
    Table[3 n (3 n + 7)/2 + 4, {n, 0, 50}]
    LinearRecurrence[{3,-3,1},{4,19,43},50] (* Harvey P. Dale, Mar 02 2019 *)
  • Maxima
    makelist(3*n*(3*n+7)/2+4, n, 0, 50);
    
  • PARI
    a(n) = 3*n*(3*n + 7)/2 + 4; \\ Indranil Ghosh, Mar 24 2017
  • Python
    [3*n*(3*n+7)/2+4 for n in range(50)]
    
  • Sage
    [3*n*(3*n+7)/2+4 for n in range(50)]
    

Formula

O.g.f.: (4 + 7*x - 2*x^2)/(1 - x)^3.
E.g.f.: (8 + 30*x + 9*x^2)*exp(x)/2.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
a(n) = A081271(-n-2).
a(n) = 3*A095794(n+1) + 1.
a(n) = A034856(3*n+2) = A101881(6*n+2) = A165157(6*n+3) = A186349(6*n+3).
The inverse binomial transform yields 4, 15, 9, 0 (0 continued), therefore:
a(n) = 4*binomial(n,0) + 15*binomial(n,1) + 9*binomial(n,2).

A096465 Triangle (read by rows) formed by setting all entries in the first column and in the main diagonal ((i,i) entries) to 1 and the rest of the entries by the recursion T(n, k) = T(n-1, k) + T(n, k-1).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 4, 1, 1, 4, 8, 9, 1, 1, 5, 13, 22, 23, 1, 1, 6, 19, 41, 64, 65, 1, 1, 7, 26, 67, 131, 196, 197, 1, 1, 8, 34, 101, 232, 428, 625, 626, 1, 1, 9, 43, 144, 376, 804, 1429, 2055, 2056, 1, 1, 10, 53, 197, 573, 1377, 2806, 4861, 6917, 6918, 1, 1, 11, 64, 261, 834, 2211, 5017, 9878, 16795, 23713, 23714, 1
Offset: 0

Views

Author

Gerald McGarvey, Aug 12 2004

Keywords

Comments

The third column is A034856 (binomial(n+1, 2) + n-1).
The row sums are A014137 (partial sums of Catalan numbers (A000108)).
The "1st subdiagonal" ((i+1,i) entries) are also A014137.
The "2nd subdiagonal" ((i+2,i) entries) is A014138 ( Partial sums of Catalan numbers (starting 1,2,5,...)).
The "3rd subdiagonal" ((i+3,i) entries) is A001453 (Catalan numbers - 1.)
This is the reverse of A091491 - see A091491 for more information. The sequence of antidiagonal sums gives A124642. - Gerald McGarvey, Dec 09 2006

Examples

			Triangle begins as:
  1;
  1, 1;
  1, 2,  1;
  1, 3,  4,  1;
  1, 4,  8,  9,   1;
  1, 5, 13, 22,  23,   1;
  1, 6, 19, 41,  64,  65,   1;
  1, 7, 26, 67, 131, 196, 197, 1;
		

Crossrefs

Programs

  • Haskell
    a096465 n k = a096465_tabl !! n !! k
    a096465_row n = a096465_tabl !! n
    a096465_tabl = map reverse a091491_tabl
    -- Reinhard Zumkeller, Jul 12 2012
    
  • Magma
    A096465:= func< n,k | k eq n select 1 else (n-k)*(&+[Binomial(n+k-2*j, n-j)/(n+k-2*j): j in [0..k]]) >;
    [A096465(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Apr 30 2021
    
  • Maple
    A096465:= (n,k)-> `if`(k=n, 1, (n-k)*add(binomial(n+k-2*j, n-j)/(n+k-2*j), j=0..k));
    seq(seq(A096465(n,k), k=0..n), n=0..12) # G. C. Greubel, Apr 30 2021
  • Mathematica
    T[, 0]= 1; T[n, n_]= 1; T[n_, m_]:= T[n, m]= T[n-1, m] + T[n, m-1]; T[n_, m_] /; n < 0 || m > n = 0; Table[T[n, m], {n, 0, 12}, {m, 0, n}]//Flatten (* Jean-François Alcover, Dec 17 2012 *)
  • Sage
    def A096465(n,k): return 1 if (k==n) else (n-k)*sum( binomial(n+k-2*j, n-j)/(n+k-2*j) for j in (0..k))
    flatten([[A096465(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Apr 30 2021

Formula

From G. C. Greubel, Apr 30 2021: (Start)
T(n, k) = (n-k) * Sum_{j=0..k} binomial(n+k-2*j, n-j)/(n+k-2*j) with T(n,n) = 1.
T(n, k) = A091491(n, n-k).
Sum_{k=0..n} T(n,k) = Sum_{j=0..n} A000108(j) = A014137(n). (End)

Extensions

Offset changed by Reinhard Zumkeller, Jul 12 2012

A113452 a(n) is the n-th smallest permanental minor of any H_m (m >= n), where H_m is the square matrix of order m with 1's on or below the superdiagonal and 0's elsewhere.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 2, 2, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 16, 16, 32, 32, 32, 32, 32, 32, 32, 32, 64, 64, 64, 64, 64, 64, 64, 64, 64
Offset: 1

Views

Author

Bryan Shader (bshader(AT)uwyo.edu), Jan 07 2006

Keywords

Crossrefs

A113454 Triangle giving maximal permanent P(n,k) of an n X n lower Hessenberg (0,1)-matrix with exactly k 1's for n >= 3 and 2n < k <= (8n)/3, read by rows.

Original entry on oeis.org

3, 4, 4, 5, 6, 8, 8, 8, 10, 12, 16, 12, 16, 16, 20, 16, 20, 24, 32, 32, 24, 32, 32, 40, 48, 64, 32, 40, 48, 64, 64, 80, 48, 64, 64, 80, 96, 128, 128, 64, 80, 96, 128, 128, 160, 192, 256
Offset: 0

Views

Author

Bryan Shader (bshader(AT)uwyo.edu), Jan 07 2006

Keywords

Crossrefs

Formula

P(n, k) = 2^(n-1) - (s(1) + s(2) + ... + s(h(n)-k)) where s(k) is the sequence A113452.

A130303 A130296 * A000012.

Original entry on oeis.org

1, 3, 1, 5, 2, 1, 7, 3, 2, 1, 9, 4, 3, 2, 1, 11, 5, 4, 3, 2, 1, 13, 6, 5, 4, 3, 2, 1, 15, 7, 6, 5, 4, 3, 2, 1, 17, 8, 7, 6, 5, 4, 3, 2, 1, 19, 9, 8, 7, 6, 5, 4, 3, 2, 1
Offset: 1

Views

Author

Gary W. Adamson, May 20 2007

Keywords

Examples

			1;
3, 1;
5, 2, 1;
7, 3, 2, 1;
9, 4, 3, 2, 1;
11, 5, 4, 3, 2, 1;
13, 6, 5, 4, 3, 2, 1;
15, 7, 6, 5, 4, 3, 2, 1;
17, 8, 7, 6, 5, 4, 3, 2, 1;
19, 9, 8, 7, 6, 5, 4, 3, 2, 1;
		

References

  • H. S. M. Coxeter, Regular Polytopes, 3rd ed., Dover, NY, 1973, pp 159-162

Crossrefs

Cf. A130296, A000012, A034856 (row sums), A130302 (commuted matrix product)

Programs

  • Mathematica
    Clear[e, n, k];
    e[n_, 0] := 2*n - 1;
    e[n_, k_] := 0 /; k >= n;
    e[n_, k_] := (e[n - 1, k]*e[n, k - 1] + 1)/e[n - 1, k - 1];
    Table[Table[e[n, k], {k, 0, n - 1}], {n, 1, 10}];
    Flatten[%]

Formula

A130296 * A000012 as infinite lower triangular matrices. (1,3,5,...) as the left border; (1,2,3,...) in all other columns.
e(n,k)= (e(n - 1, k)*e(n, k - 1) + 1)/e(n - 1, k - 1)

Extensions

Additional comments from Roger L. Bagula and Gary W. Adamson, Mar 28 2009

A302829 a(n) is the number of lattice points in a Cartesian grid between a circle of radius n and an inscribed square whose vertices lie on the coordinate axes.

Original entry on oeis.org

0, 0, 4, 8, 12, 28, 36, 52, 72, 88, 112, 128, 156, 192, 220, 252, 280, 324, 368, 408, 448, 504, 548, 592, 644, 708, 776, 828, 880, 952, 1016, 1096, 1164, 1236, 1324, 1388, 1472, 1548, 1648, 1736, 1808, 1912, 2004, 2116, 2212, 2300, 2408, 2508, 2624, 2728, 2860, 2976, 3076
Offset: 1

Views

Author

Kirill Ustyantsev, Apr 27 2018

Keywords

Comments

Points are not lying on the borders of the circle and the square.
Note that if the square is rotated so that its sides are parallel to the coordinate axes, the resulting sequence is A303642 instead.

Crossrefs

Programs

  • PARI
    a(n) = sum(x=-n, +n, sum(y=-n, +n, ((x^2+y^2) < n^2) && ((abs(x)+abs(y))^2 > n^2))); \\ Michel Marcus, May 22 2018
  • Python
    for n in range (1, 100):
        count=0
        for x in range (0, n):
            for y in range (0, n):
                if (x*x+y*yn):
                    count=count+1
        print(4*count)
    

Formula

a(n) = A281795(n) - 4*A034856(n). - Andrey Zabolotskiy, Apr 29 2018

A210764 Square array T(n,k), n>=0, k>=0, read by antidiagonals in which column k gives the partial sums of column k of A144064.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 4, 3, 1, 1, 7, 8, 4, 1, 1, 12, 18, 13, 5, 1, 1, 19, 38, 35, 19, 6, 1, 1, 30, 74, 86, 59, 26, 7, 1, 1, 45, 139, 194, 164, 91, 34, 8, 1, 1, 67, 249, 415, 416, 281, 132, 43, 9, 1, 1, 97, 434, 844, 990, 787, 447, 183, 53, 10, 1
Offset: 0

Views

Author

Omar E. Pol, Jun 27 2012

Keywords

Comments

It appears that row 2 is A034856.
Observation:
Column 1 is the EULER transform of 2,1,1,1,1,1,1,1...
Column 2 is the EULER transform of 3,2,2,2,2,2,2,2...

Examples

			Array begins:
1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,
1,   2,   3,   4,   5,   6,   7,   8,   9,  10,
1,   4,   8,  13,  19,  26,  34,  43,  53,
1,   7,  18,  35,  59,  91, 132, 183,
1,  12,  38,  86, 164, 281, 447,
1,  19,  74, 194, 416, 787,
1,  30, 139, 415, 990,
1,  45, 249, 844,
1,  67, 434,
1,  97,
1,
		

Crossrefs

Columns (0-3): A000012, A000070, A000713, A210843.
Rows (0-1): A000012, A000027.
Main diagonal gives A303070.

Programs

  • Maple
    with(numtheory):
    etr:= proc(p) local b;
            b:= proc(n) option remember; `if`(n=0, 1,
                  add(add(d*p(d), d=divisors(j))*b(n-j), j=1..n)/n)
                end
          end:
    A:= (n, k)-> etr(j-> k +`if`(j=1, 1, 0))(n):
    seq(seq(A(d-k, k), k=0..d), d=0..14); # Alois P. Heinz, May 20 2013
  • Mathematica
    etr[p_] := Module[{b}, b[n_] := b[n] = If[n == 0, 1, Sum[Sum[d*p[d], {d, Divisors[ j]}]*b[n-j], {j, 1, n}]/n]; b]; A[n_, k_] := etr[Function[{j}, k + If[j == 1, 1, 0]]][n]; Table[Table[A[d-k, k], {k, 0, d}], {d, 0, 14}] // Flatten (* Jean-François Alcover, Mar 05 2015, after Alois P. Heinz *)

A239352 van Heijst's upper bound on the number of squares inscribed by a real algebraic curve in R^2 of degree n, if the number is finite.

Original entry on oeis.org

0, 0, 1, 12, 48, 130, 285, 546, 952, 1548, 2385, 3520, 5016, 6942, 9373, 12390, 16080, 20536, 25857, 32148, 39520, 48090, 57981, 69322, 82248, 96900, 113425, 131976, 152712, 175798, 201405, 229710, 260896, 295152, 332673, 373660, 418320, 466866, 519517
Offset: 0

Views

Author

Jonathan Sondow, Mar 21 2014

Keywords

Comments

In 1911 Toeplitz conjectured the Square Peg (or Inscribed Square) Problem: Every continuous simple closed curve in the plane contains 4 points that are the vertices of a square. The conjecture is still open. Many special cases have been proved; see Matschke's beautiful 2014 survey.
Recently van Heijst proved that any real algebraic curve in R^2 of degree d inscribes either at most (d^4 - 5d^2 + 4d)/4 or infinitely many squares. He conjectured that a generic complex algebraic plane curve inscribes exactly (d^4 - 5d^2 + 4d)/4 squares.

Examples

			A point or a line has no inscribed squares, so a(0) = a(1) = 0.
A circle has infinitely many inscribed squares, and an ellipse that is not a circle has exactly one, agreeing with a(2) = 1.
G.f. = x^2 + 12*x^3 + 48*x^4 + 130*x^5 + 285*x^6 + 546*x^7 + 952*x^8 + ...
		

References

  • Otto Toeplitz, Über einige Aufgaben der Analysis situs, Verhandlungen der Schweizerischen Naturforschenden Gesellschaft in Solothurn, 4 (1911), 197.

Crossrefs

Programs

  • Magma
    [(n^4 - 5*n^2 + 4*n)/4: n in [0..50]]; // G. C. Greubel, Aug 07 2018
  • Mathematica
    Table[(n^4 - 5 n^2 + 4 n)/4, {n, 0, 38}]
  • PARI
    for(n=0,50, print1((n^4 - 5*n^2 + 4*n)/4, ", ")) \\ G. C. Greubel, Aug 07 2018
    

Formula

a(n) = (n^4 - 5*n^2 + 4*n)/4 = n*(n - 1)*(n^2 + n - 4)/4 = A000217(n-1)*A034856(n-1), which shows the formula is an integer.
G.f.: x^2 * (1 + 7*x - 2*x^2) / (1 - x)^5. - Michael Somos, Mar 21 2014
a(n) = A172225(n)/2. - R. J. Mathar, Jan 09 2018
Previous Showing 51-60 of 98 results. Next