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

A032528 Concentric hexagonal numbers: floor(3*n^2/2).

Original entry on oeis.org

0, 1, 6, 13, 24, 37, 54, 73, 96, 121, 150, 181, 216, 253, 294, 337, 384, 433, 486, 541, 600, 661, 726, 793, 864, 937, 1014, 1093, 1176, 1261, 1350, 1441, 1536, 1633, 1734, 1837, 1944, 2053, 2166, 2281, 2400, 2521, 2646, 2773, 2904, 3037, 3174, 3313, 3456, 3601, 3750
Offset: 0

Views

Author

Keywords

Comments

From Omar E. Pol, Aug 20 2011: (Start)
Cellular automaton on the hexagonal net. The sequence gives the number of "ON" cells in the structure after n-th stage. A007310 gives the first differences. For a definition without words see the illustration of initial terms in the example section. Note that the cells become intermittent. A083577 gives the primes of this sequences.
A033581 and A003154 interleaved.
Row sums of an infinite square array T(n,k) in which column k lists 2*k-1 zeros followed by the numbers A008458 (see example). (End)
Sequence found by reading the line from 0, in the direction 0, 1, ... and the same line from 0, in the direction 0, 6, ..., in the square spiral whose vertices are the generalized pentagonal numbers A001318. Main axis perpendicular to A045943 in the same spiral. - Omar E. Pol, Sep 08 2011

Examples

			From _Omar E. Pol_, Aug 20 2011: (Start)
Using the numbers A008458 we can write:
  0, 1, 6, 12, 18, 24, 30, 36, 42,  48,  54, ...
  0, 0, 0,  1,  6, 12, 18, 24, 30,  36,  42, ...
  0, 0, 0,  0,  0,  1,  6, 12, 18,  24,  30, ...
  0, 0, 0,  0,  0,  0,  0,  1,  6,  12,  18, ...
  0, 0, 0,  0,  0,  0,  0,  0,  0,   1,   6, ...
And so on.
===========================================
The sums of the columns give this sequence:
0, 1, 6, 13, 24, 37, 54, 73, 96, 121, 150, ...
...
Illustration of initial terms as concentric hexagons:
.
.                                         o o o o o
.                         o o o o        o         o
.             o o o      o       o      o   o o o   o
.     o o    o     o    o   o o   o    o   o     o   o
. o  o   o  o   o   o  o   o   o   o  o   o   o   o   o
.     o o    o     o    o   o o   o    o   o     o   o
.             o o o      o       o      o   o o o   o
.                         o o o o        o         o
.                                         o o o o o
.
. 1    6        13           24               37
.
(End)
		

Crossrefs

Programs

Formula

From Joerg Arndt, Aug 22 2011: (Start)
G.f.: (x+4*x^2+x^3)/(1-2*x+2*x^3-x^4) = x*(1+4*x+x^2)/((1+x)*(1-x)^3).
a(n) = +2*a(n-1) -2*a(n-3) +1*a(n-4). (End)
a(n) = (6*n^2+(-1)^n-1)/4. - Bruno Berselli, Aug 22 2011
a(n) = A184533(n), n >= 2. - Clark Kimberling, Apr 20 2012
First differences of A011934: a(n) = A011934(n) - A011934(n-1) for n>0. - Franz Vrabec, Feb 17 2013
From Paul Curtz, Mar 31 2019: (Start)
a(-n) = a(n).
a(n) = a(n-2) + 6*(n-1) for n > 1.
a(2*n) = A033581(n).
a(2*n+1) = A003154(n+1). (End)
E.g.f.: (3*x*(x + 1)*cosh(x) + (3*x^2 + 3*x - 1)*sinh(x))/2. - Stefano Spezia, Aug 19 2022
Sum_{n>=1} 1/a(n) = Pi^2/36 + tan(Pi/(2*sqrt(3)))*Pi/(2*sqrt(3)). - Amiram Eldar, Jan 16 2023

Extensions

New name and more terms a(41)-a(50) from Omar E. Pol, Aug 20 2011

A307707 Lexicographically earliest sequence of nonnegative integers in which, for all k >= 0, there are exactly k pairs of consecutive terms whose sum is k.

Original entry on oeis.org

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

Views

Author

Eric Angelini and Jean-Marc Falcoz, Apr 23 2019

Keywords

Comments

The old definition was "Lexicographically earliest sequence starting with a(1) = 0 such that a(n) is the number of pairs of contiguous terms whose sum is a(n)".
From Paul Curtz, Apr 27 2019: This can be written as a triangle:
0
1 1
1 2 1
2 2 2 2
2 3 2 3 2
3 3 3 3 3 3
3 4 3 4 3 4 3
...

Crossrefs

Cf. A002024.
Cf. also A007590, A057353, A106466 and A238410.
For other versions see A307720 and A378117.

Programs

  • Mathematica
    m = 107; a[1]=0;
    a24[n_] := Ceiling[(Sqrt[8n+1]-1)/2];
    Array[a, m] /. Solve[Table[a[n] + a[n+1] == a24[n], {n, 1, m-1}]][[1]] (* Jean-François Alcover, Jun 02 2019, after Rémy Sigrist's formula *)
  • PARI
    v=0; rem=wanted=1; for (n=1, 107, print1 (v", "); v=wanted-v; if (rem--==0, rem=wanted++)) \\ Rémy Sigrist, Apr 23 2019

Formula

a(n) + a(n+1) = A002024(n). - Rémy Sigrist, Apr 24 2019
Let t_m = m*(m+1)/2. Write n = t_m - i with m >= 1 and 0 <= i < m. Then a(n) = m/2 if m is even, or if m is odd, a(n) = (m-1)/2 + (i-1 mod 2). - N. J. A. Sloane, Nov 16 2024

Extensions

Definition clarified by Rémy Sigrist and N. J. A. Sloane, Nov 17 2024

A242371 Modified eccentric connectivity index of the cycle graph with n vertices, C[n].

Original entry on oeis.org

12, 32, 40, 72, 84, 128, 144, 200, 220, 288, 312, 392, 420, 512, 544, 648, 684, 800, 840, 968, 1012, 1152, 1200, 1352, 1404, 1568, 1624, 1800, 1860, 2048, 2112, 2312, 2380, 2592, 2664, 2888, 2964, 3200, 3280, 3528, 3612, 3872, 3960, 4232, 4324, 4608, 4704
Offset: 3

Views

Author

Nilanjan De, Jun 08 2014

Keywords

Comments

The modified eccentric connectivity index of a graph is defined as the sum of the products of eccentricity with the total degree of neighboring vertices, over all vertices of the graph. This is a generalization of eccentric connectivity index.
a(n) = 4*A093353(n-1) = n*A168273(n) for n>2. - Alois P. Heinz, Jun 26 2014

Examples

			a(3) = 3*4 = 12 because there are 3 vertices and each vertex has eccentricity 1 and the total degree of neighboring vertices is 4.
		

Crossrefs

Programs

  • Maple
    a:= n-> n*(2*n-1+(-1)^n):
    seq(a(n), n=3..60);  # Alois P. Heinz, Jun 26 2014
  • Mathematica
    a[n_] := 2n(n-Boole[OddQ[n]]);
    Table[a[n], {n, 3, 50}] (* Jean-François Alcover, Nov 28 2018 *)
  • PARI
    a(n) = if (n % 2, 2*n*(n-1), 2*n^2); \\ Michel Marcus, Jun 20 2014

Formula

a(n) = 2*n*(n-1) if n is odd; and a(n) = 2*n^2 if n is even (n>2).
G.f.: -4*x^3*(3+5*x-4*x^2-2*x^3+2*x^4)/((x+1)^2*(x-1)^3). - Alois P. Heinz, Jun 26 2014
Showing 1-3 of 3 results.