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.

A038589 Sizes of successive clusters in hexagonal lattice A_2 centered at lattice point.

Original entry on oeis.org

1, 7, 7, 13, 19, 19, 19, 31, 31, 37, 37, 37, 43, 55, 55, 55, 61, 61, 61, 73, 73, 85, 85, 85, 85, 91, 91, 97, 109, 109, 109, 121, 121, 121, 121, 121, 127, 139, 139, 151, 151, 151, 151, 163, 163, 163, 163, 163, 169, 187, 187, 187, 199, 199, 199
Offset: 0

Views

Author

Keywords

Comments

The hexagonal lattice is the familiar 2-dimensional lattice in which each point has 6 neighbors. This is sometimes called the triangular lattice.

Examples

			1 + 7*x + 7*x^2 + 13*x^3 + 19*x^4 + 19*x^5 + 19*x^6 + 31*x^7 + 31*x^8 + 37*x^9 + ...
		

Crossrefs

Cf. A035019.
Cf. A057655 (for square lattice).

Programs

  • Mathematica
    a[n_] := 1 + Sum[ Length[ {ToRules[ Reduce[ x^2 + x*y + y^2 == k, {x, y}, Integers] ]}], {k, 1, n}]; Table[a[n], {n, 0, 54}] (* Jean-François Alcover, Feb 23 2012, after Neven Juric *)
  • PARI
    a(n)=1+6*sum(k=0,n\3,(n\(3*k+1))-(n\(3*k+2)))

Formula

Partial sums of A004016.
Expansion of a(x) / (1 - x) in powers of x where a() is a cubic AGM theta function (cf. A004016). - Michael Somos, Aug 21 2012
Equals 1 + A014201(n). - Neven Juric, May 10 2010
a(n) = 1 + 6*Sum_{k=1..n/3} floor(n/(3k+1)) - floor(n/(3k+2)). a(n) is asymptotic to 2*(Pi/sqrt(3))*n. Conjecture: a(n) = 2*(Pi/sqrt(3))*n + O(n^(1/4 + epsilon)) as for the Gauss circle or Dirichlet divisor problems. - Benoit Cloitre, Oct 27 2012
a(n) = A014201(n) + 1. - Hugo Pfoertner, Nov 09 2023

A014202 Number of solutions to x^2 + x*y + y^2 <= n, excluding (0,0), divided by 6.

Original entry on oeis.org

0, 1, 1, 2, 3, 3, 3, 5, 5, 6, 6, 6, 7, 9, 9, 9, 10, 10, 10, 12, 12, 14, 14, 14, 14, 15, 15, 16, 18, 18, 18, 20, 20, 20, 20, 20, 21, 23, 23, 25, 25, 25, 25, 27, 27, 27, 27, 27, 28, 31, 31, 31, 33, 33, 33, 33, 33, 35, 35, 35
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • PARI
    a(n)=if(n<1,0,sum(k=1,n,kronecker(k,3)*floor(n/k))) \\ Benoit Cloitre, Oct 31 2009

Formula

For n > 0, a(n) = Sum_{k=1..n} K(k,3)*floor(n/k) where K(x,y) is the Kronecker symbol. - Benoit Cloitre, Oct 31 2009

A307109 Number of integer solutions to x^2 + x*y + y^2 <= n excluding (0,0), divided by 2.

Original entry on oeis.org

1, 1, 4, 5, 5, 5, 11, 11, 12, 12, 12, 15, 21, 21, 21, 22, 22, 22, 28, 28, 34, 34, 34, 34, 35, 35, 38, 44, 44, 44, 50, 50, 50, 50, 50, 51, 57, 57, 63, 63, 63, 63, 69, 69, 69, 69, 69, 72, 79, 79, 79, 85, 85, 85, 85, 85, 91, 91, 91, 91, 97, 97, 103, 104, 104, 104
Offset: 1

Views

Author

Hugo Pfoertner, Mar 25 2019

Keywords

Examples

			a(1)=a(2)=(2/2)=1: 2 solutions (-1,1),(1,-1);
a(3)=(8/2)=4: 2 solutions for n<3 and the 6 solutions (1,1), (-1,-1), (1,-2), (2,-1), (-1,2), (-2,1);
a(4)=a(5)=a(6)=10/2=5: 8 solutions for n<6 and the 2 solutions (-2,2), (2,-2).
		

Crossrefs

Showing 1-3 of 3 results.