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

A160413 a(n) = A160411(n+1)/4.

Original entry on oeis.org

2, 1, 7, 2, 13, 3, 19, 4, 25, 5, 31, 6, 37, 7, 43, 8, 49, 9, 55, 10, 61, 11, 67, 12, 73, 13, 79, 14, 85, 15, 91, 16, 97, 17, 103, 18, 109, 19, 115, 20, 121, 21, 127, 22, 133, 23, 139, 24, 145, 25, 151, 26, 157, 27, 163, 28, 169, 29, 175, 30, 181, 31, 187, 32, 193
Offset: 1

Views

Author

Omar E. Pol, Jun 13 2009

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{0, 2, 0, -1}, {2, 1, 7, 2, 13}, 100] (* Amiram Eldar, Feb 02 2024 *)

Formula

G.f.: x*(x^4 + 3*x^2 + x+2) / ((x-1)^2*(x+1)^2). - Colin Barker, Mar 04 2013
From Colin Barker, Apr 06 2013: (Start)
a(n) = -1 + (-1)^n - (1/4)*(-7 + 5*(-1)^n)*n for n > 1.
a(n) = 2*a(n-2) - a(n-4) for n > 5. (End)

Extensions

More terms from Colin Barker, Apr 06 2013
More terms from Amiram Eldar, Feb 02 2024

A160117 Number of "ON" cells after n-th stage in simple 2-dimensional cellular automaton (see Comments for precise definition).

Original entry on oeis.org

0, 1, 9, 13, 41, 49, 101, 113, 189, 205, 305, 325, 449, 473, 621, 649, 821, 853, 1049, 1085, 1305, 1345, 1589, 1633, 1901, 1949, 2241, 2293, 2609, 2665, 3005, 3065, 3429, 3493, 3881, 3949, 4361, 4433, 4869, 4945, 5405, 5485, 5969, 6053, 6561, 6649, 7181, 7273
Offset: 0

Views

Author

Omar E. Pol, May 05 2009, May 15 2009

Keywords

Comments

Define "peninsula cell" to be the "ON" cell connected to the structure by exactly one of its vertices.
Define "bridge cell" to be the "ON" cell connected to two cells of the structure by exactly consecutive two of its vertices.
On the infinite square grid, we start at stage 0 with all cells in OFF state. At stage 1, we turn ON a single cell, in the central position.
In order to construct this sequence we use the following rules:
- If n is even, we turn "ON" the cells around the cells turned "ON" at the generation n-1.
- If n is odd, we turn "ON" the possible bridge cells and the possible peninsula cells.
- Everything that is already ON remains ON.
A160411, the first differences, gives the number of cells turned "ON" at n-th stage.

Examples

			If we label the generations of cells turned ON by consecutive numbers we get the cell pattern shown below:
9...9...9...9...9
.888.888.888.888.
.878.878.878.878.
.886668666866688.
9..656.656.656..9
.886644464446688.
.878.434.434.878.
.886644222446688.
9..656.212.656..9
.886644222446688.
.878.434.434.878.
.886644464446688.
9..656.656.656..9
.886668666866688.
.878.878.878.878.
.888.888.888.888.
9...9...9...9...9
At the first generation, only the central "1" is ON, so a(1) = 1. At the second generation, we turn ON eight cells around the central cell, leading to a(2) = a(1)+8 = 9. At the third generation, we turn ON four peninsula cells, so a(3) = a(2)+4 = 13. At the fourth generation, we turn ON the cells around the cells turned ON at the third generation, so a(4) = a(3)+28 = 41. At the 5th generation, we turn ON four peninsula cells and four bridge cells, so a(5) = a(4)+8 = 49.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) local r;
          r:= irem(n, 2);
          `if`(n<2, n, 5+(n-r)*((7*n-3*r)/2-5))
        end:
    seq(a(n), n=0..80);  # Alois P. Heinz, Sep 16 2011
  • Mathematica
    a[0] = 0; a[1] = 1; a[n_] := If[EvenQ[n], (7n^2 - 10n + 10)/2, (7n^2 - 20n + 23)/2]; Table[a[n], {n, 0, 80}] (* Jean-François Alcover, Jul 16 2015, after Nathaniel Johnston *)

Formula

a(2n) = 5 + 2n(7n-5) for n>=1, a(2n+1) = 5 + 2n(7n-3) for n>=1. - Nathaniel Johnston, Nov 06 2010
G.f.: x*(x^2+1)*(4*x^3+x^2+8*x+1)/((x+1)^2*(1-x)^3). - Alois P. Heinz, Sep 16 2011

Extensions

a(10) - a(27) from Nathaniel Johnston, Nov 06 2010
a(28) - a(47) from Alois P. Heinz, Sep 16 2011

A161415 First differences of A160414.

Original entry on oeis.org

1, 8, 12, 28, 12, 36, 36, 92, 12, 36, 36, 108, 36, 108, 108, 292, 12, 36, 36, 108, 36, 108, 108, 324, 36, 108, 108, 324, 108, 324, 324, 908, 12, 36, 36, 108, 36, 108, 108, 324, 36, 108, 108, 324, 108, 324, 324, 972, 36, 108, 108, 324, 108, 324, 324, 972, 108, 324, 324
Offset: 1

Views

Author

Omar E. Pol, May 20 2009, Jun 13 2009

Keywords

Crossrefs

Programs

  • Maple
    Contribution from R. J. Mathar, Oct 16 2010: (Start)
    isA000079 := proc(n) if type(n,'even') then nops(numtheory[factorset](n)) = 1 ; else false ; fi ; end proc:
    A048883 := proc(n) 3^wt(n) ; end proc:
    A161415 := proc(n) if n = 1 then 1; elif isA000079(n) then 4*A048883(n-1)-2*n ; else 4*A048883(n-1) ; end if; end proc: seq(A161415(n),n=1..90) ; (End)
  • Mathematica
    a[1] = 1; a[n_] := 4*3^DigitCount[n-1, 2, 1] - If[IntegerQ[Log[2, n]], 2n, 0];
    Array[a, 60] (* Jean-François Alcover, Nov 17 2017, after N. J. A. Sloane *)

Formula

For n > 1, a(n) = 4*A048883(n-1), except a(n) = 4*A048883(n-1) - 2n if n is a power of 2. - N. J. A. Sloane, Jul 13 2009

Extensions

More terms from R. J. Mathar, Oct 16 2010

A160415 First differences of A160118.

Original entry on oeis.org

1, 8, 4, 28, 4, 28, 12, 84, 4, 28, 12, 84, 12, 84, 36, 252, 4, 28, 12, 84, 12, 84, 36, 252, 12, 84, 36, 252, 36, 252, 108, 756, 4, 28, 12, 84, 12, 84, 36, 252, 12, 84, 36, 252, 36, 252, 108, 756, 12, 84, 36, 252, 36, 252, 108, 756, 36, 252, 108, 756, 108, 756, 324
Offset: 1

Views

Author

Omar E. Pol, Jun 13 2009

Keywords

Comments

Number of cells turned "ON" at n-th stage of the cellular automaton of A160118.

Examples

			From _Omar E. Pol_, Mar 21 2011: (Start)
If written as a triangle begins:
1,
8,
4,28,
4,28,12,84,
4,28,12,84,12,84,36,252,
4,28,12,84,12,84,36,252,12,84,36,252,36,252,108,756,
(End)
		

Crossrefs

Programs

  • Mathematica
    With[{d = 2}, wt[n_] := DigitCount[n, 2, 1]; f[n_] := If[OddQ[n], 3^d + (2^d) * Sum[(2^d - 1)^(wt[k] - 1), {k, 1, (n - 1)/2}] + (2^d)*(3^d - 2) * Sum[(2^d - 1)^(wt[k] - 1), {k, 1, (n - 3)/2}], 3^d + (2^d) * Sum[(2^d - 1)^(wt[k] - 1), {k, 1, n/2 - 1}] + (2^d)*(3^d - 2) * Sum[(2^d - 1)^(wt[k] - 1), {k, 1, n/2 - 1}]]; f[0] = 0; f[1] = 1; Differences[Array[f, 100, 0]]] (* Amiram Eldar, Feb 02 2024 *)

Extensions

More terms (a(8)-a(38)) from Nathaniel Johnston, Nov 14 2010
21 terms corrected between a(13) and a(38), and more terms (a(39)-a(48)) from Omar E. Pol, Mar 21 2011
More terms from Amiram Eldar, Feb 02 2024

A160429 First differences of A160428.

Original entry on oeis.org

8, 56, 56, 392, 56, 392, 392, 2744, 56, 392, 392, 2744, 392, 2744, 2744, 19208, 56, 392, 392, 2744, 392, 2744, 2744, 19208, 392, 2744, 2744, 19208, 2744, 19208, 19208, 134456, 56, 392, 392, 2744, 392, 2744, 2744, 19208, 392, 2744, 2744, 19208, 2744, 19208, 19208
Offset: 1

Views

Author

Omar E. Pol, Jun 01 2009

Keywords

Crossrefs

Programs

  • PARI
    a(n) = 8*7^hammingweight(n-1); \\ Jinyuan Wang, Mar 14 2020

Formula

a(n) = 8 * 7^A000120(n-1) for n>=1.

Extensions

Formula and more terms from Nathaniel Johnston, Nov 14 2010
More terms from Jinyuan Wang, Mar 14 2020

A162349 First differences of A160412.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Jul 14 2009

Keywords

Comments

Note that if A048883 is written as a triangle then rows converge to this sequence. - Omar E. Pol, Nov 15 2009

Crossrefs

Programs

  • Mathematica
    a[n_] := 3^(1 + DigitCount[n - 1, 2, 1]); Array[a, 100] (* Amiram Eldar, Feb 02 2024 *)

Formula

a(n) = 3^A063787(n) = 3 * A048883(n-1). - Amiram Eldar, Feb 02 2024

Extensions

More terms from Omar E. Pol, Nov 15 2009
More terms from Colin Barker, Apr 19 2015
More terms from Amiram Eldar, Feb 02 2024

A161417 First differences of A160416.

Original entry on oeis.org

1, 7, 3, 21, 7, 41, 9, 57, 13
Offset: 1

Views

Author

Omar E. Pol, May 20 2009, Jun 14 2009

Keywords

Crossrefs

Showing 1-7 of 7 results.