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

A037576 Base-4 digits are, in order, the first n terms of the periodic sequence with initial period 1,3.

Original entry on oeis.org

1, 7, 29, 119, 477, 1911, 7645, 30583, 122333, 489335, 1957341, 7829367, 31317469, 125269879, 501079517, 2004318071, 8017272285, 32069089143, 128276356573, 513105426295, 2052421705181, 8209686820727, 32838747282909
Offset: 1

Views

Author

Keywords

Comments

Partial sums of A255465. - Klaus Purath, Mar 18 2021

Crossrefs

Cf. A007090 (numbers in base 4), A037582 (decimal), A265688 (binary), A118111.

Programs

  • Magma
    I:=[1, 7, 29]; [n le 3 select I[n] else 4*Self(n-1)+Self(n-2)-4*Self(n-3): n in [1..30]]; // Vincenzo Librandi, Jun 22 2012
    
  • Mathematica
    CoefficientList[Series[(1+3*x)/((x-1)*(4*x-1)*(1+x)),{x,0,30}],x] (*or*) LinearRecurrence[{4,1,-4},{1,7,29},40] (* Vincenzo Librandi, Jun 22 2012 *)
  • PARI
    my(x='x+O('x^99)); Vec(x*(1+3*x)/((1-x)*(1-4*x)*(1+x))) \\ Altug Alkan, Sep 21 2018
    
  • Python
    print([7*4**n//15 for n in range(1,30)]) # Karl V. Keller, Jr., Mar 09 2021

Formula

G.f.: x*(1+3*x)/((1-x)*(1-4*x)*(1+x)). - Vincenzo Librandi, Jun 22 2012
a(n) = 4*a(n-1) + a(n-2) - 4*a(n-3). - Vincenzo Librandi, Jun 22 2012
a(n) = (7*4^n + 3*(-1)^n - 10)/15. - Bruno Berselli, Jun 22 2012, corrected by Klaus Purath, Mar 18 2021.
a(n) = floor(7*4^n/15). - Karl V. Keller, Jr., Mar 09 2021
From Klaus Purath, Mar 18 2021: (Start)
a(n) = 16*a(n-2) - 3*(-1)^n + 10, assuming that a(0) = 0.
a(n) = 4*a(n-1) + 2 + (-1)^n.
a(n) = 5*a(n-1) - 4*a(n-2) + 2*(-1)^n, n > 2. (End)

A118111 Binary representation of n-th iteration of the Rule 190 elementary cellular automaton starting with a single black cell.

Original entry on oeis.org

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

Views

Author

Eric W. Weisstein, Apr 13 2006

Keywords

Comments

Row n has length 2*n+1. - Hans Havermann, May 26 2002

Examples

			From _Michael De Vlieger_, Aug 21 2020: (Start)
Irregular array begins:
0:                             1
1:                          1  1  1
2:                       1  1  1  0  1
3:                    1  1  1  0  1  1  1
4:                 1  1  1  0  1  1  1  0  1
5:              1  1  1  0  1  1  1  0  1  1  1
6:           1  1  1  0  1  1  1  0  1  1  1  0  1
7:        1  1  1  0  1  1  1  0  1  1  1  0  1  1  1
8:     1  1  1  0  1  1  1  0  1  1  1  0  1  1  1  0  1
9:  1  1  1  0  1  1  1  0  1  1  1  0  1  1  1  0  1  1  1
... (End)
		

Crossrefs

Cf. A265688 (binary rows), A037576 (decimal rows), A032766 (num 1's).

Programs

  • Mathematica
    With[{nn = 9}, MapIndexed[#1[[#2 + 1 ;; 2 nn - #2 + 1]] & @@ {#1, nn - First[#2] + 1} &, CellularAutomaton[190, {{1}, 0}, nn]]] // Flatten (* Michael De Vlieger, Aug 21 2020 *)
Showing 1-2 of 2 results.