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

A003136 Loeschian numbers: numbers of the form x^2 + xy + y^2; norms of vectors in A2 lattice.

Original entry on oeis.org

0, 1, 3, 4, 7, 9, 12, 13, 16, 19, 21, 25, 27, 28, 31, 36, 37, 39, 43, 48, 49, 52, 57, 61, 63, 64, 67, 73, 75, 76, 79, 81, 84, 91, 93, 97, 100, 103, 108, 109, 111, 112, 117, 121, 124, 127, 129, 133, 139, 144, 147, 148, 151, 156, 157, 163, 169, 171, 172, 175, 181, 183, 189, 192
Offset: 1

Views

Author

Keywords

Comments

Equally, numbers of the form x^2 - xy + y^2. - Ray Chandler, Jan 27 2009
Also, numbers of the form X^2+3Y^2 (X=y+x/2, Y=x/2), cf. A092572. - Zak Seidov, Jan 20 2009
Theorem (Schering, Delone, Watson): The only positive definite binary quadratic forms that represent the same numbers are x^2+xy+y^2 and x^2+3y^2 (up to scaling). - N. J. A. Sloane, Jun 22 2014
Equivalently, numbers n such that the coefficient of x^n in Theta3(x)*Theta3(x^3) is nonzero. - Joerg Arndt, Jan 16 2011
Equivalently, numbers n such that the coefficient of x^n in a(x) (resp. b(x)) is nonzero where a(), b() are cubic AGM functions. - Michael Somos, Jan 16 2011
Relative areas of equilateral triangles whose vertices are on a triangular lattice. - Anton Sherwood (bronto(AT)pobox.com), Apr 05 2001
2 appended to a(n) (for positive n) corresponds to capsomere count in viral architectural structures (cf. A071336). - Lekraj Beedassy, Apr 14 2006
The triangle in A132111 gives the enumeration: n^2 + k*n + k^2, 0 <= k <= n.
The number of coat proteins at each corner of a triangular face of a virus shell. - Parthasarathy Nambi, Sep 04 2007
Numbers of the form (x^2 + y^2 + (x + y)^2)/2. If we let z = - x - y, then all the solutions to x^2 + y^2 + z^2 = k with x + y + z = 0 are k = 2a(n) for any n. - Jon Perry, Dec 16 2012
Sequence of divisors of the hexagonal lattice, except zero (where it is said that an integer n divides a lattice if there exists a sublattice of index n; example: 3 divides the hexagonal lattice). - Jean-Christophe Hervé, May 01 2013
Numbers of the form - (x*y + y*z + x*z) with x + y + z = 0. Numbers of the form x^2 + y^2 + z^2 - (x*y + y*z + x*z) = (x - y)*(x - z) + (y - x) * (y - z) + (z - x) * (z - y). - Michael Somos, Jun 26 2013
Equivalently, the existence spectrum of affine Mendelsohn triple systems, cf. A248107. - David Stanovsky, Nov 25 2014
Lame's solutions to the Helmholtz equation with Dirichlet boundary conditions on the unit-edged equilateral triangle have eigenvalues of the form: (x^2+x*y+y^2)*(4*Pi/3)^2. The actual set, starting at 1 and counting degeneracies, is given by A060428, e.g., the first degeneracy is 49 where (x,y)=(0,7) and (3,5). - Robert Stephen Jones, Oct 01 2015
Curvatures of spheres in one bowl of integers, the Loeschian spheres. Mod 12, numbers equal to 0, 1, 3, 4, 7, 9. - Ed Pegg Jr, Jan 10 2017
Norms of Eisenstein integers Z[omega] or k(rho). - Juris Evertovskis, Dec 07 2017
Named after the German economist August Lösch (1906-1945). - Amiram Eldar, Jun 10 2021
Starting from the second element, these and only these numbers of congruent equilateral triangles can be used to cover a regular tetrahedron without overlaps or gaps. - Alexander M. Domashenko, Feb 01 2025
This sequence is closed under multiplication: (x; y)*(u; v) = (x*v - y*u; x*u + y*(u + v)) for x*v - y*u >= 0 , (x; y)*(u; v) = (y*u - x*v; x*u + v*(x + y)) for x*v - y*u < 0. - Alexander M. Domashenko, Feb 03 2025

References

  • J. H. Conway and N. J. A. Sloane, Sphere Packings, Lattices and Groups, Springer-Verlag, p. 111.
  • Ivars Peterson, The Jungles of Randomness: A Mathematical Safari, John Wiley and Sons, (1998) pp. 53.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

See A092572 for numbers of form x^2 + 3 y^2 with positive x,y.
See A088534 for the number of representations.
Cf. A034020 (complement), A007645 (primes); partitions: A198726, A198727.

Programs

  • Haskell
    import Data.Set (singleton, union, fromList, deleteFindMin)
    a003136 n = a003136_list !! (n-1)
    a003136_list = f 0 $ singleton 0 where
    f x s | m < x ^ 2 = m : f x s'
    | otherwise = m : f x'
    (union s' $ fromList $ map (\y -> x'^2+(x'+y)*y) [0..x'])
    where x' = x + 1
    (m,s') = deleteFindMin s
    -- Reinhard Zumkeller, Oct 30 2011
    
  • Julia
    function isA003136(n)
        n % 3 == 2 && return false
        n in [0, 1, 3] && return true
        M = Int(round(2*sqrt(n/3)))
        for y in 0:M, x in 0:y
            n == x^2 + y^2 + x*y && return true
        end
        return false
    end
    A003136list(upto) = [n for n in 0:upto if isA003136(n)]
    A003136list(192) |> println # Peter Luschny, Mar 17 2018
    
  • Magma
    [n: n in [0..192] | NormEquation(3, n) eq true]; // Arkadiusz Wesolowski, May 11 2016
    
  • Maple
    readlib(ifactors): for n from 2 to 200 do m := ifactors(n)[2]: flag := 1: for i from 1 to nops(m) do if m[i,1] mod 3 = 2 and m[i,2] mod 2 = 1 then flag := 0; break fi: od: if flag=1 then printf(`%d,`,n) fi: od: # James Sellers, Dec 07 2000
  • Mathematica
    ok[n_] := Resolve[Exists[{x, y}, Reduce[n == x^2 + x*y + y^2, {x, y}, Integers]]]; Select[Range[0, 192], ok] (* Jean-François Alcover, Apr 18 2011 *)
    nn = 14; Select[Union[Flatten[Table[x^2 + x*y + y^2, {x, 0, nn}, {y, 0, x}]]], # <= nn^2 &] (* T. D. Noe, Apr 18 2011 *)
    QP = QPochhammer; s = QP[q]^3 / QP[q^3]/3 + O[q]^200; Position[ CoefficientList[s, q], n_ /; n != 0] - 1 // Flatten (* Jean-François Alcover, Nov 27 2015, adapted from PARI *)
  • PARI
    isA003136(n)=local(fac,flag);if(n==0,1,fac=factor(n);flag=1;for(i=1,matsize(fac)[1],if(Mod(fac[i,1],3)==2 && Mod(fac[i,2],2)==1,flag=0));flag)
    
  • PARI
    is(n)=#bnfisintnorm(bnfinit(z^2+z+1),n) \\ Ralf Stephan, Oct 18 2013
    
  • PARI
    x='x+O('x^200); p=eta(x)^3/eta(x^3); for(n=0, 199, if(polcoeff(p, n) != 0, print1(n, ", "))) \\ Altug Alkan, Nov 08 2015
    
  • PARI
    list(lim)=my(v=List(),y,t); for(x=0,sqrtint(lim\3), my(y=x,t); while((t=x^2+x*y+y^2)<=lim, listput(v,t); y++)); Set(v) \\ Charles R Greathouse IV, Feb 05 2017
    
  • PARI
    is_a003136(n) = !n || #qfbsolve(Qfb(1, 1, 1), n, 3) \\ Hugo Pfoertner, Aug 04 2023
    
  • Python
    from itertools import count, islice
    from sympy import factorint
    def A003136_gen(): return (n for n in count(0) if all(e % 2 == 0 for p,e in factorint(n).items() if p % 3 == 2))
    A003136_list = list(islice(A003136_gen(),30)) # Chai Wah Wu, Jan 20 2022

Formula

Either n=0 or else in the prime factorization of n all primes of the form 3a+2 must occur to even powers only (there is no restriction of primes congruent to 0 or 1 mod 3).
If n is in the sequence, then n^k is in the sequence (but the converse is not true). n is in the sequence iff n^(2k+1) is in the sequence. - Ray Chandler, Feb 03 2009
A088534(a(n)) > 0. - Reinhard Zumkeller, Oct 30 2011
The sequence is multiplicative in the sense that if m and n are in the sequence, so is m*n. - Jon Perry, Dec 18 2012
Comments from Richard C. Schroeppel, Jul 20 2016: (Start)
The set is also closed under restricted division: If M and N are members, and M divides N, then N/M is a member.
If N == 2 (mod 3), N is not in the sequence.
The density of members (relative to the integers>0) gradually falls to 0. The density goes as O(1/sqrt(log N)). This implies that, if N is a member, the average expected number of representations of N is O(sqrt(log N)).
Representations usually come in sets of 6: (K,L), (K+L,-K), (K+L,-L) and their negatives. (End)
Since Q(zeta), where zeta is a primitive 3rd root of unity has class number 1, the situation as to whether an integer is of the form x^2 + xy + y^2 is similar to the situation with x^2 + y^2: n is of that form if and only if every prime p dividing n which is = 5 mod 6 divides it to an even power. The density of 1/sqrt(x) that Rich mentioned is an old result due to Landau. - Victor S. Miller, Jul 20 2016
From Juris Evertovskis, Dec 07 2017; Jan 01 2020: (Start)
In the prime factorization of n, let S_1 be the set of distinct prime factors p_i for which p_i == 1 (mod 3), let S_2 be the set of distinct prime factors p_j for which p_j == 2 (mod 3), and let M be the exponent of 3. Then n = 3^M * (Product_{p_i in S_1} p_i ^ e_i) * (Product_{p_j in S_2} p_j ^ e_j), and the number of solutions for x^2+xy+y^2=n is 6*Product_{p_i in S_1} (e_i + 1) if all e_j are even and 0 otherwise.
For all Löschian numbers there are nonnegative X,Y such that X^2+XY+Y^2=n. For x,y such that x^2+xy+y^2=n take X=min(|x|,|y|), Y=|x+y| if xy<0 and X=|x|, Y=|y| otherwise. (End)

A034017 Numbers that are primitively represented by x^2 + xy + y^2.

Original entry on oeis.org

0, 1, 3, 7, 13, 19, 21, 31, 37, 39, 43, 49, 57, 61, 67, 73, 79, 91, 93, 97, 103, 109, 111, 127, 129, 133, 139, 147, 151, 157, 163, 169, 181, 183, 193, 199, 201, 211, 217, 219, 223, 229, 237, 241, 247, 259, 271, 273, 277, 283, 291, 301, 307, 309, 313, 327, 331
Offset: 1

Views

Author

Keywords

Comments

Gives the location of the nonzero terms of A000086.
Starting at a(3), a(n)^2 is the ordered semiperimeter of primitive integer Soddyian triangles (see A210484). - Frank M Jackson, Feb 04 2013
A000086(a(n)) > 0; a(n) = A004611(k) or a(n) = 3*A004611(k) for n > 3 and an appropriate k. - Reinhard Zumkeller, Jun 23 2013
The number of structure units in an icosahedral virus is 20*a(n), see Stannard link. - Charles R Greathouse IV, Nov 03 2015
From Wolfdieter Lang, Apr 09 2021: (Start)
The positive definite binary quadratic form F = [1, 1, 1], that is x^2 + x*y + y^2, has discriminant Disc = -3, and class number 1 (see Buell, Examples, p. 19, first line: Delta = -3, h = 1). This reduced form is equivalent to the form [1,-1, 1], but to no other reduced one (see Buell, Theorem 2.4, p. 15).
This form F represents a positive integer k (= a(n)) properly if and only if A002061(j+1) = 2*T(j) + 1 = j^2 + j + 1 == 0 (mod k), for j from {0, 1, ..., k-1}. This congruence determines the representative parallel primitive forms (rpapfs) of discriminant Disc = -3 and representation of a positive integer number k, given by [k, 2*j+1, c(j)], and c(j) is determined from Disc =-3 as c(j) = ((2*j+1)^2 + 3)/(4*k) = (j^2 + j + 1)/k. Each rpapf has a first reduced form, the so-called right neighbor form, namely [1, 1, 1] for k = 1 = a(1) (the already reduced parallel form from j = 0), and [1, -1, 1] for k = a(n), with n >= 2.
Only odd numbers k are eligible for representation, because 2*T(j) + 1, with the triangular numbers T = A000217, is odd. The odd k with at least one solution of the congruence are then the members of the present sequence.
The solutions of the reduced forms F = [1, 1, 1] and F' = [1, -1, 1] representing k are related by type I equivalence because of the first two entries ([a, a, c] == [a, -a, c]), and also by type II equivalence because [a, b, a] == [a, -b, a], for positive b. These transformation matrices are R_I = Matrix([1, -1],[0, 1]) and R_{II} = Matrix([0, -1], [1, 0]), respectively, to obtain the forms with negative second entry from the ones with positive second entry. The corresponding solutions (x, y)^t (t for transposed) are related by the inverse of these matrices.
The table with the A341422(n) solutions j of the congruence given above are given in A343232. (End)
Apparently, also the integers k that can be expressed as a quotient of two terms from A002061. - Martin Becker, Aug 14 2022
For some x, y let a(n) = r, x*(x+y) = s, y*(x+y) = t, x*y = u then (r,s,t,u) is a Pythagorean quadruple such that r^2 = s^2 + t^2 + u^2. - Frank M Jackson, Feb 26 2024

References

  • B. C. Berndt and R. A. Rankin, Ramanujan: Letters and Commentary, see p. 184, AMS, Providence, RI, 1995.
  • D. A. Buell, Binary Quadratic Forms, Springer, 1989, pp. 15, 19.

Crossrefs

Cf. A000217, A002061, A002476, A003136, A007645 (primes), A045611, A045897, A226946 (complement), A045897 (subsequence), A341422, A343232.

Programs

  • Haskell
    a034017 n = a034017_list !! (n-1)
    a034017_list = 0 : filter ((> 0) . a000086) [1..]
    -- Reinhard Zumkeller, Jun 23 2013
  • Maple
    N:= 1000: # to get all terms <= N
    P:= select(isprime, [seq(6*n+1, n=1..floor((N-1)/6))]):
    A:= {1,3}:
    for p in P do
      A:= {seq(seq(a*p^k, k=0..floor(log[p](N/a))),a=A)}:
    od:
    sort(convert(A,list)); # Robert Israel, Nov 04 2015
  • Mathematica
    lst = {0}; maxLen = 331; Do[If[Reduce[m^2 + m*n + n^2 == k && m >= n >= 0 && GCD[m, n] == 1, {m, n}, Integers] === False, , AppendTo[lst, k]], {k, maxLen}]; lst (* Frank M Jackson, Jan 10 2013 *) (* simplified by T. D. Noe, Feb 05 2013 *)
  • PARI
    is(n)=my(f=factor(n));for(i=1,#f[,1],if(f[i,1]%3!=1 && (f[i,1]!=3 || f[i,2]>1), return(n==0))); 1 \\ Charles R Greathouse IV, Jan 10 2013
    
  • PARI
    list(lim)=if(lim<7, return(select(n->n<=lim, [0,1,3]))); my(v=List([0,1,3])); for(x=1,sqrtint(lim\=1), my(y,t); while(y++Charles R Greathouse IV, Jan 20 2022
    

Formula

Extensions

Extended by Ray Chandler, Jan 29 2009

A034019 Numbers that are imprimitively (and possibly also primitively) represented by x^2+xy+y^2.

Original entry on oeis.org

4, 9, 12, 16, 25, 27, 28, 36, 48, 49, 52, 63, 64, 75, 76, 81, 84, 100, 108, 112, 117, 121, 124, 144, 147, 148, 156, 169, 171, 172, 175, 189, 192, 196, 208, 225, 228, 243, 244, 252, 256, 268, 279, 289, 292, 300, 304, 316, 324, 325, 333, 336, 343
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • PARI
    is(n)=my(f=factor(n),t); for(i=1, #f[, 1], if(f[i, 1]%3<2 && f[i,2]>1, t=1); if(f[i,1]%3==2, if(f[i,2]%2, return(0), t=1))); t \\ Charles R Greathouse IV, Nov 04 2015

A034022 Numbers that are primitively or imprimitively represented by x^2+xy+y^2, but not both.

Original entry on oeis.org

0, 1, 3, 4, 7, 9, 12, 13, 16, 19, 21, 25, 27, 28, 31, 36, 37, 39, 43, 48, 52, 57, 61, 63, 64, 67, 73, 75, 76, 79, 81, 84, 91, 93, 97, 100, 103, 108, 109, 111, 112, 117, 121, 124, 127, 129, 133, 139, 144, 148, 151, 156, 157, 163, 171, 172, 175, 181, 183, 189, 192, 193, 196, 199, 201, 208, 211, 217, 219, 223, 225
Offset: 1

Views

Author

Keywords

Comments

a(n) = A198772(n) for n <= 32. - Reinhard Zumkeller, Oct 30 2011

Crossrefs

Symmetric difference of A034017 and A034019.
After the initial 0, differs from A329963 next time at a(63) = 196, term which is not present in the latter.

Programs

  • PARI
    prim(f)=for(i=1, #f~, if(f[i, 1]%3!=1 && (f[i, 1]!=3 || f[i, 2]>1), return(factorback(f)==0))); 1
    imprim(f)=my(t); for(i=1, #f~, if(f[i, 1]%3<2 && f[i, 2]>1, t=1); if(f[i, 1]%3==2, if(f[i, 2]%2, return(0), t=1))); t
    is(n)=my(f=factor(n)); prim(f)+imprim(f)==1 \\ Charles R Greathouse IV, Nov 04 2015

Extensions

Extended by Ray Chandler, Jan 29 2009
Data section further extended up to a(71), to better differentiate from nearby sequences, by Antti Karttunen, Jul 04 2024

A034021 Numbers that are primitively but not imprimitively represented by x^2+xy+y^2.

Original entry on oeis.org

0, 1, 3, 7, 13, 19, 21, 31, 37, 39, 43, 57, 61, 67, 73, 79, 91, 93, 97, 103, 109, 111, 127, 129, 133, 139, 151, 157, 163, 181, 183, 193, 199, 201, 211, 217, 219, 223, 229, 237, 241, 247, 259, 271, 273, 277, 283, 291, 301, 307, 309, 313, 327, 331, 337, 349, 367
Offset: 1

Views

Author

Keywords

Comments

Also numbers that are squarefree and primitively represented by x^2+x*y+y^2. - Frank M Jackson, Nov 08 2013

Crossrefs

Programs

  • Mathematica
    lst = {}; Do[k=x^2+x*y+y^2; If[(SquareFreeQ[k] && GCD[x, y]==1) || k==0, AppendTo[lst, k]], {x, 0, 100}, {y, 0, x}]; Union@lst (* Frank M Jackson, Nov 08 2013 *)

Extensions

Extended by Ray Chandler, Jan 29 2009
Showing 1-5 of 5 results.