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-4 of 4 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

A238410 a(n) = floor((3(n-1)^2 + 1)/2).

Original entry on oeis.org

0, 2, 6, 14, 24, 38, 54, 74, 96, 122, 150, 182, 216, 254, 294, 338, 384, 434, 486, 542, 600, 662, 726, 794, 864, 938, 1014, 1094, 1176, 1262, 1350, 1442, 1536, 1634, 1734, 1838, 1944, 2054, 2166, 2282, 2400, 2522, 2646, 2774, 2904, 3038, 3174, 3314, 3456, 3602, 3750, 3902, 4056, 4214, 4374, 4538, 4704
Offset: 1

Views

Author

Emeric Deutsch, Feb 27 2014

Keywords

Comments

a(n) = the eccentric connectivity index of the path P[n] on n vertices. The eccentric connectivity index of a simple connected graph G is defined to be the sum over all vertices i of G of the product E(i)D(i), where E(i) is the eccentricity and D(i) is the degree of vertex i. For example, a(4)=14 because the vertices of P[4] have degrees 1,2,2,1 and eccentricities 3,2,2,3; we have 1*3 + 2*2 + 2*2 + 1*3 = 14.
From Paul Curtz, Feb 23 2023: (Start)
East spoke of the hexagonal spiral using A004526 with a single 0:
.
43 42 42 41 41 40
43 28 28 27 27 26 40
44 29 17 16 16 15 26 39
44 29 17 8 8 7 15 25 39
45 30 18 9 3 2 7 14 25 38
45 30 18 9 3 0---2---6--14--24--38-->
31 19 10 4 1 1 6 13 24 37
31 19 10 4 5 5 13 23 37
32 20 11 11 12 12 23 36
32 20 21 21 22 22 36
33 33 34 34 35 35
.

Crossrefs

Programs

  • Maple
    a := proc (n) options operator, arrow: floor((3/2)*(n-1)^2+1/2) end proc: seq(a(n), n = 1 .. 70);
  • Mathematica
    Table[Floor[(3(n-1)^2+1)/2],{n,80}]  (* or *) LinearRecurrence[{2,0,-2,1},{0,2,6,14},80] (* Harvey P. Dale, Apr 30 2022 *)
  • PARI
    a(n)=(3*(n-1)^2 + 1)\2 \\ Charles R Greathouse IV, Feb 15 2017

Formula

a(n) = (3*n)^2/6 for n even and a(n) = ((3*n)^2 + 3)/6 for n odd. - Miquel Cerda, Jun 17 2016
From Ilya Gutkovskiy, Jun 17 2016: (Start)
G.f.: 2*x^2*(1 + x + x^2)/((1 - x)^3*(1 + x)).
a(n) = (6*n^2 - 12*n + 7 + (-1)^n)/4.
a(n) = 2* A077043(n-1). (End)
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4). - Matthew House, Feb 15 2017
Sum_{n>=2} 1/a(n) = Pi^2/36 + tanh(Pi/(2*sqrt(3)))*Pi/(2*sqrt(3)). - Amiram Eldar, Mar 12 2023

A211520 Number of ordered triples (w,x,y) with all terms in {1,...,n} and w + 4y = 2x.

Original entry on oeis.org

0, 0, 0, 1, 2, 3, 5, 7, 10, 12, 16, 19, 24, 27, 33, 37, 44, 48, 56, 61, 70, 75, 85, 91, 102, 108, 120, 127, 140, 147, 161, 169, 184, 192, 208, 217, 234, 243, 261, 271, 290, 300, 320, 331, 352, 363, 385, 397, 420, 432, 456, 469, 494, 507, 533, 547, 574
Offset: 0

Views

Author

Clark Kimberling, Apr 14 2012

Keywords

Comments

For a guide to related sequences, see A211422.

Crossrefs

Programs

  • Haskell
    a211520 n = a211520_list !! n
    a211520_list = 0 : 0 : 0 : scanl1 (+) a178804_list
    -- Reinhard Zumkeller, Nov 15 2014
    
  • Maple
    seq(floor((n-1)^2/4)-floor((n-1)/4)*floor((n+1)/4), n=0..60); # Ridouane Oudra, Nov 21 2024
  • Mathematica
    t[n_] := t[n] = Flatten[Table[w - 2 x + 4 y, {w, 1, n}, {x, 1, n}, {y, 1, n}]]
    c[n_] := Count[t[n], 0]
    t = Table[c[n], {n, 0, 70}]  (* this sequence *)
    FindLinearRecurrence[t]
    LinearRecurrence[{1,1,-1,1,-1,-1,1},{0,0,0,1,2,3,5},57] (* Ray Chandler, Aug 02 2015 *)
  • PARI
    { my(x='x+O('x^66)); concat([0,0,0],Vec( x^3*(1+x+x^3) / ( (1-x)^3*(1+x)^2*(1+x^2) ) ) ) } \\ Joerg Arndt, Apr 02 2017

Formula

a(n) = a(n-1) + a(n-2) - a(n-3) + a(n-4) - a(n-5) - a(n-6) + a(n-7).
a(n) - a(n-1) = A178804(n-2). - Reinhard Zumkeller, Nov 15 2014
a(n) = (6*n^2-10*n+3+(2*n-7)*(-1)^n-4*(-1)^((2*n-3-(-1)^n)/4))/32. - Luce ETIENNE, Dec 31 2015
a(n) = Sum_{k=1..floor(n/2)} floor((n-k)/2). - Wesley Ivan Hurt, Apr 01 2017
G.f.: x^3 * (1+x+x^3) / ( (1-x)^3*(1+x)^2*(1+x^2) ). - Joerg Arndt, Apr 02 2017
a(n)+a(n-1) = A282513(n-2). - R. J. Mathar, Jun 23 2021
a(n) = floor((n-1)^2/4) - floor((n-1)/4)*floor((n+1)/4). - Ridouane Oudra, Nov 21 2024

A336234 Edge length of 'Prime squares': sum the four numbers at the corners of a square drawn on a diagonally numbered 2D board, with 1 at the corner of the square. The sequence gives the size of the square such that the sum is a prime number.

Original entry on oeis.org

1, 3, 7, 9, 13, 15, 19, 25, 31, 37, 39, 51, 61, 63, 69, 81, 87, 97, 99, 109, 117, 135, 145, 147, 151, 153, 163, 165, 171, 183, 189, 195, 201, 207, 213, 219, 223, 229, 235, 241, 249, 253, 267, 271, 273, 277, 297, 307, 319, 325, 337, 343, 345, 355, 373, 381, 387, 391, 393, 409, 435, 447, 451, 457
Offset: 1

Views

Author

Eric Angelini and Scott R. Shannon, Jul 13 2020

Keywords

Examples

			The board is numbered as follows:
.
   1  2  4  7 11 16  .
   3  5  8 12 17  .
   6  9 13 18  .
  10 14 19  .
  15 20  .
  21  .
  .
a(1) = 1 as the four numbers {1,2,5,3} form the corners of a square of size 1, and the sum of these number is 11, a prime number.
a(2) = 3 as the four numbers {1,7,25,10} form the corners of a square of size 3, and the sum of these number is 43, a prime number.
a(3) = 7 as the four numbers {1,29,113,36} form the corners of a square of size 7, and the sum of these number is 179, a prime number.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[1,501,2],PrimeQ[3#^2+4#+4]&] (* Harvey P. Dale, May 26 2022 *)

Formula

The sequence is the values of d where 3*d^2+4*d+4, the sum of the four numbers for a square of size d, is prime. For even d this sum will always be even, thus all terms are odd.
Showing 1-4 of 4 results.