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

A174257 Number of symmetry classes of 3 X 3 reduced magic squares with distinct values and maximum value 2n; also, with magic sum 3n.

Original entry on oeis.org

0, 0, 0, 1, 2, 1, 3, 3, 3, 4, 5, 4, 6, 6, 6, 7, 8, 7, 9, 9, 9, 10, 11, 10, 12, 12, 12, 13, 14, 13, 15, 15, 15, 16, 17, 16, 18, 18, 18, 19, 20, 19, 21, 21, 21, 22, 23, 22, 24, 24, 24, 25, 26, 25, 27, 27, 27, 28, 29, 28, 30, 30, 30, 31, 32, 31, 33, 33, 33, 34, 35, 34, 36, 36, 36, 37
Offset: 1

Views

Author

Thomas Zaslavsky, Mar 14 2010

Keywords

Comments

In a reduced magic square the row, column, and two diagonal sums must all be equal (the "magic sum") and the minimum entry is 0. The maximum entry is necessarily even and = (2/3)*(magic sum). The symmetries are those of the square.
a(n) is a quasipolynomial with period 6.
The second differences of A108577 are a(n/2) for even n and 0 for odd n. The first differences of A108579 are a(n/3).
For n>=3 equals a(n) the number of partitions of n-3 using parts 1 and 2 only, with distinct multiplicities. Example: a(7) = 3 because [2,2], [2,1,1], [1,1,1,1] are such partitions of 7-3=4. - T. Amdeberhan, May 13 2012
a(n) is equal to the number of partitions of n of length 3 with exactly two equal entries (see below example). - John M. Campbell, Jan 29 2016
a(k) + 2 =:t(k), k >= 1, based on sequence A300069, is used to obtain for 2^t(k)*O_{-k} integer coordinates in the quadratic number field Q(sqrt(3)), where O_{-k} is the center of a k-family of regular hexagons H_{-k} forming part of a discrete spiral. See the linked W. Lang paper, Lemma 5, and Table 7. - Wolfdieter Lang, Mar 30 2018
a(n) is equal to the number of incongruent isosceles triangles (excluding equilateral triangles) formed from the vertices of a regular n-gon. - Frank M Jackson, Oct 30 2022

Examples

			From _John M. Campbell_, Jan 29 2016: (Start)
For example, there are a(16)=7 partitions of 16 of length 3 with exactly two equal entries:
  (14,1,1) |- 16
  (12,2,2) |- 16
  (10,3,3) |- 16
   (8,4,4) |- 16
   (7,7,2) |- 16
   (6,6,4) |- 16
   (6,5,5) |- 16
(End)
		

Crossrefs

Programs

  • Maple
    seq(floor((n-1)/2)+floor((n-1)/3)-floor(n/3),n=1..100) # Mircea Merca, May 14 2013
  • Mathematica
    Rest@ CoefficientList[Series[x^4 (1 + 2 x)/((1 + x) (1 + x + x^2) (x - 1)^2), {x, 0, 76}], x] (* Michael De Vlieger, Jan 29 2016 *)
    Table[Length@Select[Length/@Union/@IntegerPartitions[n, {3}], # == 2 &], {n,
      1, 100}] (* Frank M Jackson, Oct 30 2022 *)
  • PARI
    concat(vector(3), Vec(x^4*(1+2*x) / ( (1+x)*(1+x+x^2)*(x-1)^2 ) + O(x^90))) \\ Michel Marcus, Jan 29 2016

Formula

G.f.: x^4*(1+2*x) / ( (1+x)*(1+x+x^2)*(x-1)^2 ).
a(n) = (1/8)*A174256(n).
a(n) = floor((n-1)/2) + floor((n-1)/3) - floor(n/3). - Mircea Merca, May 14 2013
a(n) = A300069(n-1) + 3*floor((n-1)/6), n >= 1. Proof via g.f.. - Wolfdieter Lang, Feb 24 2018
a(n) = (6*n - 13 - 8*cos(2*n*Pi/3) - 3*cos(n*Pi))/12. - Wesley Ivan Hurt, Oct 04 2018

Extensions

Information added to name and comments by Thomas Zaslavsky, Apr 24 2010

A300067 Period 6: repeat [0, 0, 0, 1, 2, 2].

Original entry on oeis.org

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

Views

Author

Wolfdieter Lang, Feb 24 2018

Keywords

Comments

Used for A300068.

Crossrefs

Cf. A300068.

Programs

  • Mathematica
    PadRight[{}, 102, {0, 0, 0, 1, 2, 2}] (* or *)
    CoefficientList[Series[x^3*(1 + 2 x + 2 x^2)/(1 - x^6), {x, 0, 102}], x] (* Michael De Vlieger, Feb 25 2018 *)
  • PARI
    a(n) = my(v=[0, 0, 1, 2, 2]); v[if(n%6==0, 1, n%6)] \\ Felix Fröhlich, Feb 24 2018
    
  • PARI
    concat(vector(3), Vec(x^3*(1 + 2*x + 2*x^2)/(1 - x^6) + O(x^40))) \\ Felix Fröhlich, Feb 25 2018

Formula

a(n) = floor((n (mod 6))/3) + floor((n (mod 6))/4), n >= 0.
G.f.: x^3*(1 + 2*x + 2*x^2)/(1 - x^6).
a(n) = (5 - 2*cos(n*Pi/3) - 2*cos(2*n*Pi/3) - cos(n*Pi) - 4*sqrt(3)*sin(n*Pi/3))/6. - Wesley Ivan Hurt, Oct 04 2018

A300076 A sequence based on the period 6 sequence A300075.

Original entry on oeis.org

0, 1, 1, 2, 2, 2, 3, 4, 4, 5, 5, 5, 6, 7, 7, 8, 8, 8, 9, 10, 10, 11, 11, 11, 12, 13, 13, 14, 14, 14, 15, 16, 16, 17, 17, 17, 18, 19, 19, 20, 20, 20, 21, 22, 22, 23, 23, 23, 24, 25, 25, 26, 26, 26, 27, 28, 28, 29, 29, 29, 30, 31, 31, 32, 32, 32, 33, 34, 34, 35, 35, 35, 36, 37, 37, 38, 38, 38, 39, 40, 40, 41, 41, 41, 42, 43, 43, 44, 44, 44
Offset: 0

Views

Author

Wolfdieter Lang, Mar 03 2018

Keywords

Comments

If 1 is added to each entry and the offset is set to 1 then the resulting sequence can be used to obtain integers in the quadratic number field Q(sqrt(3)) for the two components of the vertices V0_{-k}, as well as V3_{-k}, for k >= 1, of a k-family of ascending regular hexagons. Their centers 0{-k} form part of a discrete hexagon spiral.

Crossrefs

Formula

a(n) = A300075(n) + 3*floor(n/6), n >= 0.
a(n) = A300293(n-1) + 1, n >= 1.
G.f.: x*(1 + x^2 + x^5)/((1 - x^6)*(1 - x)) = G(x) + 3*x^6/((1-x)*(1-x^6)), with the g.f. G(x) of A300075.

A300293 A sequence based on the period 6 sequence A151899.

Original entry on oeis.org

0, 0, 1, 1, 1, 2, 3, 3, 4, 4, 4, 5, 6, 6, 7, 7, 7, 8, 9, 9, 10, 10, 10, 11, 12, 12, 13, 13, 13, 14, 15, 15, 16, 16, 16, 17, 18, 18, 19, 19, 19, 20, 21, 21, 22, 22, 22, 23, 24, 24, 25, 25, 25, 26, 27, 27, 28, 28, 28, 29, 30, 30, 31, 31, 31, 32, 33, 33, 34, 34, 34, 35, 36, 36, 37, 37, 37, 38, 39, 39, 40, 40, 40, 41, 42, 42, 43, 43, 43, 44
Offset: 0

Views

Author

Wolfdieter Lang, Mar 05 2018

Keywords

Comments

a(k-1) + 2 =: v2(k), k >= 1, is used to obtain for 2^(v2(k))*V_{-k}(2) as well as 2^(v2(k))*V_{-k}(5) integer coordinates in the quadratic number field Q(sqrt(3)), where V_{-k}(j), j = 0..5, are the vertices of a k-family of regular hexagons H_{-k} whose centers O_{-k} form part of a discrete spiral. See the linked paper, Lemma 6, eqs. (47) and (48), and the Table 19. - Wolfdieter Lang, Mar 30 2018

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{1,0,0,0,0,1,-1},{0,0,1,1,1,2,3},100] (* Harvey P. Dale, Dec 29 2024 *)
  • PARI
    a151899(n) = [0, 0, 1, 1, 1, 2][n%6+1]
    a(n) = a151899(n) + 3*floor(n/6) \\ Felix Fröhlich, Mar 30 2018

Formula

a(n) = A151899(n) + 3*floor(n/6), n >= 0.
a(n) = A300076(n+1) - 1.
G.f.: x^2*(1 + x^3 + x^4)/((1 - x^6)*(1 - x)) = G(x) + 3*x^6/((1-x)*(1-x^6)), with the g.f. G(x) of A151899.
a(n) = a(n-1) + a(n-6) - a(n-7). - Wesley Ivan Hurt, Jun 19 2025

A300290 Period 6: repeat [0, 1, 2, 2, 3, 3].

Original entry on oeis.org

0, 1, 2, 2, 3, 3, 0, 1, 2, 2, 3, 3, 0, 1, 2, 2, 3, 3, 0, 1, 2, 2, 3, 3, 0, 1, 2, 2, 3, 3, 0, 1, 2, 2, 3, 3, 0, 1, 2, 2, 3, 3, 0, 1, 2, 2, 3, 3, 0, 1, 2, 2, 3, 3, 0, 1, 2, 2, 3, 3, 0, 1, 2, 2, 3, 3, 0, 1, 2, 2, 3, 3, 0, 1, 2, 2, 3, 3, 0, 1, 2, 2, 3, 3, 0, 1, 2, 2, 3, 3
Offset: 0

Views

Author

Wolfdieter Lang, Mar 03 2018

Keywords

Comments

Underlying A300068(n+2), n >= 0.

Crossrefs

Formula

a(n) = n (mod 6) - floor((n (mod 6))/3) - floor((n (mod 6))/5), n >= 0.
G.f.: x*(1 + x*(2 + 3*x^2)*(1 + x))/(1 - x^6).
a(n) = (11 - 5*cos(n*Pi/3) - 5*cos(2*n*Pi/3) - cos(n*Pi) - 3*sqrt(3)*sin(n*Pi/3) - sqrt(3)*sin(2*n*Pi/3))/6. - Wesley Ivan Hurt, Oct 04 2018

A302708 Constant of a logarithmic spiral interpolating the centers of regular hexagons: (-6/Pi)*log(-1 + sqrt(3)).

Original entry on oeis.org

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

Views

Author

Wolfdieter Lang, Apr 14 2018

Keywords

Comments

For the sequence of regular hexagons H_k with centers 0_k, for integers k, see the link. These centers form a discrete spiral which is interpolated by a logarithmic spiral r(phi) = exp(-kappa*phi) with origin S = (0, 1) if the hexagon H_0 has center 0_0 = (0, 0), inscribed in a circle of radius 1 length unit, and a vertex V_0(0) = (1, 0). In the link this coordinate system is called (x_0, y_0). The constant of the logarithmic spiral is kappa = (-6/Pi)*log(-1 + sqrt(3)). For -1 + sqrt(3) (the scaling factor for the hexagons called sigma in the linked paper) see A160390.
The constant angle between the radial direction of a spiral point and the tangent is given by arccot(kappa) approximately 1.033548019, corresponding to an angle of about 59.218 degrees (complementary to 120.782 degrees).

Examples

			0.59569535437899341987896613377536017371231315458288726686676607503292533487083...
		

Crossrefs

Cf. A160390.

Programs

  • Mathematica
    RealDigits[6*Log[Sqrt[3] - 1]/Pi, 10, 120][[1]] (* Amiram Eldar, Jun 12 2023 *)
  • PARI
    default(realprecision,120); -(6/Pi)*log(-1 + sqrt(3)) \\ Georg Fischer, Jul 18 2021

Formula

Equals -(6/Pi)*log(-1 + sqrt(3)) = -(6/Pi)*log(A160390).

Extensions

a(102) corrected by Georg Fischer, Jul 18 2021
Showing 1-6 of 6 results.