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 41-45 of 45 results.

A266087 Alternating sum of 11-gonal (or hendecagonal) numbers.

Original entry on oeis.org

0, -1, 10, -20, 38, -57, 84, -112, 148, -185, 230, -276, 330, -385, 448, -512, 584, -657, 738, -820, 910, -1001, 1100, -1200, 1308, -1417, 1534, -1652, 1778, -1905, 2040, -2176, 2320, -2465, 2618, -2772, 2934, -3097, 3268, -3440, 3620, -3801, 3990, -4180
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 21 2015

Keywords

Crossrefs

Programs

  • Magma
    [(18*(-1)^n*n^2 + 4*(-1)^n*n - 7*(-1)^n + 7)/8: n in [0..50]]; // Vincenzo Librandi, Dec 21 2015
    
  • Mathematica
    Table[((18 n^2 + 4 n - 7) (-1)^n + 7)/8, {n, 0, 43}]
    CoefficientList[Series[(x - 8 x^2)/(x^4 + 2 x^3 - 2 x - 1), {x, 0, 50}], x] (* Vincenzo Librandi, Dec 21 2015 *)
    Accumulate[Times@@@Partition[Riffle[PolygonalNumber[11,Range[0,50]],{1,-1},{2,-1,2}],2]] (* Requires Mathematica version 10 or later *) (* or *) LinearRecurrence[{-2,0,2,1},{0,-1,10,-20},50] (* Harvey P. Dale, Aug 27 2019 *)
  • PARI
    x='x+O('x^100); concat(0, Vec(-x*(1-8*x)/((1-x)*(1+x)^3))) \\ Altug Alkan, Dec 21 2015

Formula

G.f.: -x*(1 - 8*x)/((1 - x)*(1 + x)^3).
a(n) = ((18*n^2 + 4*n - 7)*(-1)^n + 7)/8.
a(n) = Sum_{k = 0..n} (-1)^k*A051682(k).
Lim_{n -> infinity} a(n + 1)/a(n) = -1.
E.g.f.: (1/4)*(9*x^2 - 11*x)*cosh(x) - (1/4)*(9*x^2 - 11*x - 7)*sinh(x). - G. C. Greubel, Jan 27 2016

A266088 Alternating sum of 12-gonal (or dodecagonal) numbers.

Original entry on oeis.org

0, -1, 11, -22, 42, -63, 93, -124, 164, -205, 255, -306, 366, -427, 497, -568, 648, -729, 819, -910, 1010, -1111, 1221, -1332, 1452, -1573, 1703, -1834, 1974, -2115, 2265, -2416, 2576, -2737, 2907, -3078, 3258, -3439, 3629, -3820, 4020, -4221, 4431, -4642
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 21 2015

Keywords

Comments

More generally, the ordinary generating function for the alternating sum of k-gonal numbers is -x*(1 - (k - 3)*x)/((1 - x)*(1 + x)^3).

Crossrefs

Programs

  • Magma
    [1+(-1)^n*(5*n^2+n-2)/2: n in [0..50]]; // Vincenzo Librandi, Dec 21 2015
    
  • Mathematica
    Table[1 + (-1)^n (5 n^2 + n - 2)/2, {n, 0, 43}]
    CoefficientList[Series[-x (1 - 9 x)/((1 - x) (1 + x)^3), {x, 0, 50}], x] (* Vincenzo Librandi, Dec 21 2015 *)
  • PARI
    x='x+O('x^100); concat(0, Vec(-x*(1-9*x)/((1-x)*(1+x)^3))) \\ Altug Alkan, Dec 21 2015

Formula

G.f.: -x*(1 - 9*x)/((1 - x)*(1 + x)^3).
a(n) = 1 + (-1)^n*(5*n^2 + n - 2)/2.
a(n) = Sum_{k = 0..n} (-1)^k*A051624(k).
Lim_{n -> infinity} a(n + 1)/a(n) = -1.

A337108 Square spiral constructed by greedy algorithm, so that each diagonal and antidiagonal contains distinct numbers.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Aug 16 2020

Keywords

Comments

This sequence is a variant of A308896; here we walk a bishop, there a rook.
Visually, we have a superposition of two images that we can separate by considering the parity of the x and y coordinates (see illustrations in Links section).

Examples

			The spiral begins:
        7----7----6----7----1----7----4----7----7
        |                                       |
        6    5----5----4----1----5----5----5    6
        |    |                             |    |
        3    4    3----3----2----3----3    4    3
        |    |    |                   |    |    |
        6    5    2    1----1----1    2    4    6
        |    |    |    |         |    |    |    |
        0    0    0    0    0----0    0    0    0
        |    |    |    |              |    |    |
        6    3    2    2----1----2----2    3    6
        |    |    |                        |    |
        7    4    4----3----1----3----4----4    5
        |    |                                  |
        6    6----5----5----1----6----5----6----6
        |
        8----7----8----7----1----7----4----7----8
		

Crossrefs

See A274641 and A308896 for similar sequences.
Cf. A035608.

Programs

  • PARI
    \\ See Links section.

Formula

a(n) = 0 iff n belongs to A035608.

A104571 Triangle T(n,k) = A042948(n-k+1) read by rows, 0<=k<=n.

Original entry on oeis.org

1, 4, 1, 5, 4, 1, 8, 5, 4, 1, 9, 8, 5, 4, 1, 12, 9, 8, 5, 4, 1, 13, 12, 9, 8, 5, 4, 1, 16, 13, 12, 9, 8, 5, 4, 1
Offset: 0

Views

Author

Gary W. Adamson, Mar 16 2005

Keywords

Examples

			The first few rows are:
1;
4, 1;
5, 4, 1;
8, 5, 4, 1;
9, 8, 5, 4, 1;
...
		

Crossrefs

Cf. A042948, A035608 (row sums), A104570, A104569, A074377.

Formula

The triangle is extracted from the product of lower triangular matrices (with the rest of the terms all zeros): G * R (or R * G); G = [1; 3, 1; 1, 3, 1; 3, 1, 3, 1;...]; R = [1; 1, 1; 1, 1, 1;...].

A131307 (A127701 * A000012 + A000012(signed) * A127701) - A000012.

Original entry on oeis.org

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

Views

Author

Gary W. Adamson, Sep 30 2007

Keywords

Comments

Row sums = A035608: (1, 5, 10, 18, 27, 39, 52, ...).

Examples

			First few rows of the triangle:
   1;
   2,  3;
   3,  2,  5;
   4,  5,  2,  7;
   5,  4,  7,  2,  9;
   6,  7,  4,  9,  2, 11;
   7,  6,  9,  4, 11,  2, 13;
   8,  9,  6, 11,  4, 13,  2, 15;
   9,  8, 11,  6, 13,  4, 15,  2, 17;
  10, 11,  8, 13,  6, 15,  4, 17,  2, 19;
  ...
		

Crossrefs

Formula

(A127701 * A000012 + A000012(signed) * A127701) - A000012; as infinite lower triangular matrices, where A000012(signed) = (1; -1,1; 1,-1,1; -1,1,-1,1; ...).
Previous Showing 41-45 of 45 results.