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

A070909 Triangle read by rows giving successive states of cellular automaton generated by "Rule 28" and by "Rule 156".

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0
Offset: 0

Views

Author

Hans Havermann, May 26 2002

Keywords

Comments

Row n has length n+1.
From Gary W. Adamson, May 15 2010: (Start)
Eigensequence of the triangle = A038754 (i.e., 1, 1, 2, 3, 6, 9, 18, ...) shifts to the left with multiplication by triangle A070909.
Binomial transform of A070909 = triangle A177953. (End)
From Paul Barry, Nov 03 2010: (Start)
Generalized (conditional) Riordan array with k-th column generated by x^k/(1-x) if k is even, x^k otherwise.
A181651 is an eigentriangle. Inverse is A181650. (End)
From Peter Bala, Aug 15 2021: (Start)
Double Riordan array (1/(1 - x); x*(1 - x), x/(1 - x)) as defined in Davenport et al. The inverse array is the double Riordan array (1 - x - x^2; x/(1 - x - x^2), x*(1 - x - x^2)).
In general, double Riordan arrays of the form (g(x); x/g(x), x*g(x)), where g(x) = 1 + g_1*x + g_2*x^2 + ..., form a group under matrix multiplication with the group law given by (g(x); x/g(x), x*g(x)) * (G(x); x/G(x), x*G(x)) = (h(x); x/h(x), x*h(x)), where h(x) = G(x) + (g(x) - 1)*(G(x) + G(-x))/2. The inverse array of (g(x); x/g(x), x*g(x)) equals (f(x); x/f(x), x*f(x)), where f(x) = (2 - (g(x) - g(-x)))/(g(x) + g(-x)). (End)

Examples

			From _Paul Barry_, Nov 03 2010: (Start)
Triangle begins
  1;
  1, 1;
  1, 0, 1;
  1, 0, 1, 1;
  1, 0, 1, 0, 1;
  1, 0, 1, 0, 1, 1;
  1, 0, 1, 0, 1, 0, 1;
  1, 0, 1, 0, 1, 0, 1, 1;
  1, 0, 1, 0, 1, 0, 1, 0, 1;
  1, 0, 1, 0, 1, 0, 1, 0, 1, 1;
Production matrix begins
  1,  1;
  0, -1,  1;
  0, -1,  1,  1;
  0,  0,  0, -1,  1;
  0,  0,  0, -1,  1,  1;
  0,  0,  0,  0,  0, -1,  1;
  0,  0,  0,  0,  0, -1,  1,  1;
  0,  0,  0,  0,  0,  0,  0, -1,  1;
  0,  0,  0,  0,  0,  0,  0, -1,  1,  1;
  0,  0,  0,  0,  0,  0,  0,  0,  0, -1,  1; (End)
		

References

  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; Chapter 3.

Crossrefs

Inverse array A181650. Cf. A038754, A266502, A266508.

Programs

  • Mathematica
    rows = 14; ca = CellularAutomaton[28, {{1}, 0}, rows-1]; Flatten[Table[ca[[k, 1 ;; k]], {k, 1, rows}]] (* Jean-François Alcover, May 24 2012 *)

A101881 Write two numbers, skip one, write two, skip two, write two, skip three ... and so on.

Original entry on oeis.org

1, 2, 4, 5, 8, 9, 13, 14, 19, 20, 26, 27, 34, 35, 43, 44, 53, 54, 64, 65, 76, 77, 89, 90, 103, 104, 118, 119, 134, 135, 151, 152, 169, 170, 188, 189, 208, 209, 229, 230, 251, 252, 274, 275, 298, 299, 323, 324, 349, 350, 376, 377, 404, 405, 433, 434, 463, 464, 494
Offset: 0

Views

Author

Candace Mills (scorpiocand(AT)yahoo.com), Dec 19 2004

Keywords

Comments

Equals row sums of triangle A177994. - Gary W. Adamson, May 16 2010
From Ralf Stephan, Mar 09 2014: (Start)
Write the positive integers in a skewed triangle:
1, 2;
0, 3, 4, 5;
0, 0, 6, 7, 8, 9;
0, 0, 0, 10, 11, 12, 13, 14;
...
Sequence consists of the first number in each column. (End)
In a regular k-polygon draw lines connecting all the vertices. Select a triangle that tiles the polygon into k pieces. This triangle contains two adjacent polygon vertices. The third vertex is for even k the center of the polygon and for odd k one of the vertices of the central k-polygon (which is not included in the tiling). Count all lines connecting vertices in the original k-polygon that passes through the interior of the tiling triangle. That count is a(k-5). (See illustrations below.) - Lars Blomberg, Feb 20 2020
a(n) is the smallest number which has n+1 as a part in any of its maximally refined strict partitions. The first such are:(1),(2),(1,3),(1,4),(1,2,5),(1,2,6),(1,2,3,7),(1,2,3,8),(1,2,3,4,9) etc. - Sigurd Kittilsen, Oct 18 2024

Crossrefs

Programs

  • Haskell
    import Data.List (intersperse)
    a101881 n = a101881_list !! n
    a101881_list = scanl1 (+) $ intersperse 1 [1..]
    -- Reinhard Zumkeller, Feb 20 2015
    
  • Magma
    [(1/16)*(2*n^2+18*n+15+(2*n+1)*(-1)^n): n in [0..60]]; // Vincenzo Librandi, Mar 11 2014
    
  • Mathematica
    CoefficientList[Series[(-1 + x^3 - x)/((x + 1)^2 (x - 1)^3), {x, 0, 60}], x] (* Vincenzo Librandi, Mar 11 2014 *)
    LinearRecurrence[{1,2,-2,-1,1},{1,2,4,5,8},60] (* Harvey P. Dale, Dec 07 2016 *)
    With[{nn=60},Take[#,2]&/@TakeList[Range[(nn^2+nn-6)/2],Range[3,nn]]]// Flatten (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Mar 30 2019 *)
  • PARI
    Vec((-1+x^3-x)/((x+1)^2*(x-1)^3) + O(x^60)) \\ Iain Fox, Nov 17 2017

Formula

G.f.: (-1+x^3-x)/((x+1)^2*(x-1)^3). - Maksym Voznyy (voznyy(AT)mail.ru), Aug 11 2009
a(n) = (1/16)*(2*n^2 + 18*n + 15 + (2*n+1)*(-1)^n). - Ralf Stephan, Mar 09 2014
a(2*n) = A034856(n+1); a(2*n+1) = A000096(n+1). - Reinhard Zumkeller, Feb 20 2015
a(n) = n + 1 + A008805(n-2). - Wesley Ivan Hurt, Nov 17 2017
E.g.f.: (cosh(x) - sinh(x))*(1 - 2*x + (15 + 20*x + 2*x^2)*(cosh(2*x) + sinh(2*x)))/16. - Stefano Spezia, Feb 20 2020

A106465 Triangle read by rows, T(n, k) = 1 if n mod 2 = 1, otherwise (k + 1) mod 2.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Paul Barry, May 03 2005

Keywords

Comments

Rows alternate between all 1's and alternating 1's and 0's. A 'mixed' sequence array: rows alternate between the rows of the sequence array for the all 1's sequence and the sequence array for the sequence 1,0,1,0,...
Column 2*k has g.f. x^(2*k)/(1-x); column 2*k+1 has g.f. x^(2*k+1)/(1-x^2).
Row sums are A029578(n+2). Antidiagonal sums are A106466.
This triangle is the Kronecker product of an infinite lower triangular matrix filled with 1's with a 2 X 2 lower triangular matrix of 1's. - Christopher Cormier, Sep 24 2017
From Peter Bala, Aug 21 2021: (Start)
Using the notation of Davenport et al.:
This is the double Riordan array ( 1/(1 - x); x/(1 + x), x*(1 + x) ).
The inverse array equals ( (1 - x)*(1 - x^2); x*(1 - x), x*(1 + x) ).
They are examples of double Riordan arrays of the form (g(x); x*f_1(x), x*f_2(x)), where f_1(x)*f_2(x) = 1. Arrays of this type form a group under matrix multiplication. For the group law see the Bala link. (End)

Examples

			The triangle begins:
  n\k| 0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 ...
  ---+------------------------------------------------
   0 | 1
   1 | 1  1
   2 | 1  0  1
   3 | 1  1  1  1
   4 | 1  0  1  0  1
   5 | 1  1  1  1  1  1
   6 | 1  0  1  0  1  0  1
   7 | 1  1  1  1  1  1  1  1
   8 | 1  0  1  0  1  0  1  0  1
   9 | 1  1  1  1  1  1  1  1  1  1
  10 | 1  0  1  0  1  0  1  0  1  0  1
  11 | 1  1  1  1  1  1  1  1  1  1  1  1
  12 | 1  0  1  0  1  0  1  0  1  0  1  0  1
  13 | 1  1  1  1  1  1  1  1  1  1  1  1  1  1
  14 | 1  0  1  0  1  0  1  0  1  0  1  0  1  0  1
... Reformatted by _Wolfdieter Lang_, May 12 2018
Inverse array begins
  n\k|  0   1   2   3   4   5   6   7
  ---+-------------------------------
   0 |  1
   1 | -1   1
   2 | -1   0   1
   3 |  1  -1  -1   1
   4 |  0   0  -1   0   1
   5 |  0   0   1  -1  -1   1
   6 |  0   0   0   0  -1   0   1
   7 |  0   0   0   0   1  -1  -1  1
  ... - _Peter Bala_, Aug 21 2021
		

Crossrefs

Programs

  • Maple
    T := (n, k) -> if igcd(n - k + 1, k + 1) mod 2 = 0 then 0 else 1 fi:
    for n from 0 to 9 do seq(T(n, k), k = 0..n) od;
    # Alternative:
    T := (n, k) -> if n mod 2 = 1 then 1 else (k + 1) mod 2 fi:
    for n from 0 to 9 do seq(T(n, k), k = 0..n) od; # Peter Luschny, Dec 12 2022
  • Mathematica
    Table[Binomial[Mod[n, 2], Mod[k, 2]], {n, 0, 16}, {k, 0, n}] // Flatten (* Michael De Vlieger, Dec 12 2022 *)
  • Python
    def A106465row(n: int) -> list[int]:
      if n % 2 == 1:
          return [1] * (n + 1)
      return [1, 0] * (n // 2) + [1]
    for n in range(9): print(A106465row(n)) # Peter Luschny, Dec 12 2022

Formula

If gcd(n - k + 1, k + 1) mod 2 = 0 then T(n, k) = 0, otherwise T(n, k) = 1.
T(n, k) = A003989(n + 1, k + 1) mod 2.
T(n, k) = binomial(n mod 2, k mod 2). - Peter Luschny, Dec 12 2022

Extensions

Edited and new name by Peter Luschny, Dec 12 2022

A177991 Triangle read by rows, A070909 * A177990.

Original entry on oeis.org

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

Views

Author

Gary W. Adamson, May 16 2010

Keywords

Comments

Row sums = A117142: (1, 2, 3, 5, 6, 9,...)

Examples

			First few rows of the triangle =
1;
1, 1;
1, 1, 1;
1, 2, 1, 1;
1, 2, 1, 1, 1;
1, 3, 1, 2, 1, 1;
1, 3, 1, 2, 1, 1, 1;
1, 4, 1, 3, 1, 2, 1, 1;
1, 4, 1, 3, 1, 2, 1, 1, 1;
1, 5, 1, 4, 1, 3, 1, 2, 1, 1;
1, 5, 1, 4, 1, 3, 1, 2, 1, 1, 1;
1, 6, 1, 5, 1, 4, 1, 3, 1, 2, 1, 1;
1, 6, 1, 5, 1, 4, 1, 3, 1, 2, 1, 1, 1;
1, 7, 1, 6, 1, 5, 1, 4, 1, 3, 1, 2, 1, 1;
1, 7, 1, 6, 1, 5, 1, 4, 1, 3, 1, 2, 1, 1, 1;
...
		

Crossrefs

Formula

As infinite lower triangular matrices, A070909 * A177990

Extensions

a(28)=1 inserted before the first "4" by Georg Fischer, Dec 28 2021

A162169 Exponential series expansion of (cos(x) - sin(x))*cosh(t*x) + sinh(t*x).

Original entry on oeis.org

1, -1, 1, -1, 0, 1, 1, 0, -3, 1, 1, 0, -6, 0, 1, -1, 0, 10, 0, -5, 1, -1, 0, 15, 0, -15, 0, 1, 1, 0, -21, 0, 35, 0, -7, 1, 1, 0, -28, 0, 70, 0, -28, 0, 1, -1, 0, 36, 0, -126, 0, 84, 0, -9, 1, -1, 0, 45, 0, -210, 0, 210, 0, -45, 0, 1, 1, 0, -55, 0, 330, 0, -462, 0, 165, 0, -11, 1
Offset: 1

Views

Author

Mats Granvik, Jun 27 2009

Keywords

Comments

Previous name was: Signed version of Pascal's triangle.
Related to A000111 via its matrix inverse A162170.
For odd columns k, T(n, k) = binomial(n-1, k-1) * (-1)^floor((n+k-1)/2). For even columns, T(n, k) = 1 if n = k, otherwise 0. - Mike Tryczak, Jun 17 2015
From Peter Bala, Sep 08 2021: (Start)
In the notation of the Bala link, this is the array [[ cos(x) - sin(x), 1 ]] with inverse array A162170 = [[ sec(x) + tan(x), 1 ]].
In general, arrays of the form [[ G(x), 1 ]], where G(x) = 1 + g(1)*x + g(2)*x^2/2! + g(3)*x^3/3! + ... is an e.g.f., form a group with group law [[ G(x), 1 ]]*[[ F(x), 1 ]] = [[ G(x)*F_e(x) + F_o(x), 1 ]] and inverse array [[ G(x), 1 ]]^(-1) = [[ (1 - G_o(x))/G_e(x), 1 ]], where G_e(x) = (G(x) + G(-x))/2 and G_o(x) = (G(x) - G(-x))/2 are the even and odd parts of G(x). (End)

Examples

			Table begins:
   1;
  -1,    1;
  -1,    0,    1;
   1,    0,   -3,    1;
   1,    0,   -6,    0,    1;
  -1,    0,   10,    0,   -5,    1;
  -1,    0,   15,    0,  -15,    0,    1;
   1,    0,  -21,    0,   35,    0,   -7,    1;
   1,    0,  -28,    0,   70,    0,  -28,    0,    1;
  -1,    0,   36,    0, -126,    0,   84,    0,   -9,    1;
  -1,    0,   45,    0, -210,    0,  210,    0,  -45,    0,    1;
   1,    0,  -55,    0,  330,    0, -462,    0,  165,    0,  -11,    1;
.
As a symmetric triangle:
                                   1;
                               -1,    1;
                            -1,    0,    1;
                          1,    0,   -3,    1;
                       1,    0,   -6,    0,    1;
                   -1,    0,   10,    0,   -5,    1;
                -1,    0,   15,    0,  -15,    0,    1;
              1,    0,  -21,    0,   35,    0,   -7,    1;
           1,    0,  -28,    0,   70,    0,  -28,    0,    1;
       -1,    0,   36,    0, -126,    0,   84,    0,   -9,    1;
    -1,    0,   45,    0, -210,    0,  210,    0,  -45,    0,    1;
  1,    0,  -55,    0,  330,    0, -462,    0,  165,    0,  -11,    1;
		

Crossrefs

Programs

  • Excel
    =if(or(mod(row()-column();4)=1;mod(row()-column();4)=2);-1;1)*if(row()>=column();combin(row()-1;column()-1);0)*if(and(row()>column();mod(column();2)=0);0;1)
    
  • Maple
    egf := (cos(x) - sin(x))*cosh(t*x) + sinh(t*x):
    ser := n -> series(egf, x, n+1): c := n -> n!*coeff(ser(n), x, n):
    A162169row := n -> seq(coeff(c(n), t, k), k=0..n):
    for n from 0 to 9 do A162169row(n) od; # Peter Luschny, Sep 18 2021
  • Mathematica
    nn=12; Flatten[Table[Table[If[Or[Mod[n - k, 4] == 1, Mod[n - k, 4] == 2], -1, 1]*If[n >= k, Binomial[n - 1, k - 1], 0]*If[And[n > k, Mod[k, 2] == 0], 0, 1], {k, 1, n}], {n, 1, nn}]] (* Mats Granvik, Nov 25 2017 *)
  • PARI
    T(n, k) = if (k % 2, binomial(n-1, k-1) * (-1)^floor((n+k-1)/2), if (n==k, 1 , 0));
    tabl(nn) = {for (n=1, nn, for (k=1, n, print1(T(n,k), ", ");); print(););} \\ Michel Marcus, Jun 17 2015

Formula

E.g.f.: (cos(x) - sin(x))*cosh(t*x) + sinh(t*x) = 1 + (-1 + t)*x + (-1 + t^2)*x^2/2! + (1 - 3^t^2 + t^3)*x^3/3! + .... - Peter Bala, Sep 08 2021

Extensions

New name using a formula of Peter Bala from Peter Luschny, Sep 18 2021
Showing 1-5 of 5 results.