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

A047270 Numbers that are congruent to {3, 5} mod 6.

Original entry on oeis.org

3, 5, 9, 11, 15, 17, 21, 23, 27, 29, 33, 35, 39, 41, 45, 47, 51, 53, 57, 59, 63, 65, 69, 71, 75, 77, 81, 83, 87, 89, 93, 95, 99, 101, 105, 107, 111, 113, 117, 119, 123, 125, 129, 131, 135, 137, 141, 143, 147, 149
Offset: 1

Views

Author

Keywords

Comments

Apart from initial term(s), dimension of the space of weight 2n cusp forms for Gamma_0( 10 ).
This sequence is an interleaving of A016945 with A016969. - Guenther Schrack, Nov 16 2018

Crossrefs

Cf. A047235 [(6*n-(-1)^n-3)/2], A047241 [(6*n-(-1)^n-5)/2], A047238 [(6*n-(-1)^n-7)/2]. [Bruno Berselli, Jun 24 2010]
Subsequence of A186422.
From Guenther Schrack, Nov 18 2018: (Start)
Complement: A047237.
First differences: A105397(n) for n > 0.
Partial sums: A227017(n+1) for n > 0.
Elements of odd index: A016945.
Elements of even index: A016969(n-1) for n > 0. (End)

Programs

  • Mathematica
    Select[Range@ 149, MemberQ[{3, 5}, Mod[#, 6]] &] (* or *)
    Array[(6 # - (-1)^# - 1)/2 &, 50] (* or *)
    Fold[Append[#1, 6 #2 - Last@ #1 - 4] &, {3}, Range[2, 50]] (* or *)
    CoefficientList[Series[(3 + 2 x + x^2)/((1 + x) (1 - x)^2), {x, 0, 49}], x] (* Michael De Vlieger, Jan 12 2018 *)
  • PARI
    a(n) = (6*n - 1 - (-1)^n)/2 \\ David Lovler, Aug 25 2022

Formula

a(n) = sqrt(2)*sqrt((1-6*n)*(-1)^n + 18*n^2 - 6*n + 1)/2. - Paul Barry, May 11 2003
From Bruno Berselli, Jun 24 2010: (Start)
G.f.: (3+2*x+x^2)/((1+x)*(1-x)^2).
a(n) - a(n-1) - a(n-2) + a(n-3) = 0, with n > 3.
a(n) = (6*n - (-1)^n - 1)/2. (End)
a(n) = 6*n - a(n-1) - 4 with n > 1, a(1)=3. - Vincenzo Librandi, Aug 05 2010
From Guenther Schrack, Nov 17 2018: (Start)
a(n) = a(n-2) + 6 for n > 2.
a(-n) = -A047241(n+1) for n > 0.
a(n) = A109613(n-1) + 2*n for n > 0.
a(n) = 2*A001651(n) + 1.
m-element moving averages: Sum_{k=1..m} a(n-m+k)/m = A016777(n-m/2) for m = 2, 4, 6, ... and n >= m. (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/(4*sqrt(3)) - log(3)/4. - Amiram Eldar, Dec 13 2021
E.g.f.: 1 + 3*x*exp(x) - cosh(x). - David Lovler, Aug 25 2022

A227012 a(n) = floor(M(g(n-1)+1, ..., g(n))), where M = harmonic mean and g(n) = n^3.

Original entry on oeis.org

1, 4, 16, 43, 91, 166, 275, 422, 614, 857, 1158, 1521, 1953, 2460, 3049, 3724, 4492, 5359, 6332, 7415, 8615, 9938, 11391, 12978, 14706, 16581, 18610, 20797, 23149, 25672, 28373, 31256, 34328, 37595, 41064, 44739, 48627, 52734, 57067, 61630, 66430, 71473
Offset: 1

Views

Author

Clark Kimberling, Jul 01 2013

Keywords

Comments

Suppose that f(k) is a sequence such that f(k) > 0 for k >= 1, the limit of f(k) is 0, and the sum of f(k) as k->oo diverges. Let g(n) be a strictly increasing sequence of positive integers, and s(n) = Sum_{k=g(n-1)+1..g(n)} f(k). If f(k) = 1/k, then M(n) = (g(n) - g(n-1))/s(n) is the harmonic mean of g(n-1),...,g(n).
Conjecture: if f(k) = u/(v*k + w), where u,v,w are integers, and g(n) is a polynomial, then the sequence with n-th term m(n) = floor(M(n)) is linearly recurrent. The conjecture extends to these cases, in which a,b,c,d are integers and a > 0:
(1) if g(n) = a*n^2 + b*n + c, the recurrence has order 2, and the first 3 recurrence coefficients for m(n) are 3, -3, 1; these are followed by some nonnegative number of 0's, a property abbreviated below as "(fbz)"; e.g., A002378.
(2) if g(n) has the form (a*n^2 + b*n + c)/2 where a and b are odd, then the recurrence has order 4, and the first 4 coefficients for m(n) are 2, 0-, -1, 2 (fbz); e.g., A080576.
(3) if g(n) = a*n^3 + b*n^2 + c*n + d, the recurrence has order 7, and the first 7 coefficients for m(n) are 3, -3, 1, 1, -3, 3, -1 (fbz); e.g., A227012.

Examples

			a(1) = floor(1/(1/1)) = 1, a(2) = floor(7/(1/2 + 1/3 + ... + 1/8)).
		

Crossrefs

Programs

  • Mathematica
    Clear[g]; g[n_] := g[n] = n^3; a = {1}; Do[AppendTo[a, Floor[(Last[#] - First[#] + 1)/(HarmonicNumber[Last[#]]-HarmonicNumber[First[#] - 1])] &[
       N[{g[k - 1] + 1, g[k]}, 150]]], {k, 2, 100}]; a (* Peter J. C. Moses, Jul 03 2012 *)

Formula

a(n+2) = (1/8)*(27 - (-1)^n - 2*cos(n*Pi/2) + 2*sin(n*Pi/2) + 2*n*(4*n^2 + 18 n + 27)) for n >= 1 (conjectured).
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) + a(n-4) - 3*a(n-5) + 3*a(n-6) - a(n-7) for n >= 10 (conjectured).
G.f.: x*(1 + x + 7*x^2 + 6*x^3 + 5*x^4 + 5*x^5 - 2*x^7 + x^8)/(((x - 1)^4)*(1 + x + x^2 + x^3)) (conjectured).
a(n) = (2*n^3 - 3*n^2 + n + 2)/2 + floor(max(0, n - 3)/4) (conjectured). - Franck Maminirina Ramaharo, Apr 12 2018

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
Showing 1-4 of 4 results.