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-10 of 11 results. Next

A230902 Positive numbers such that half of the set of divisors are of the form x^2 + x*y + y^2 (A003136) and half not (A034020).

Original entry on oeis.org

2, 5, 6, 8, 11, 14, 15, 17, 18, 23, 24, 26, 29, 32, 33, 35, 38, 41, 42, 45, 47, 51, 53, 54, 56, 59, 62, 65, 69, 71, 72, 74, 77, 78, 83, 86, 87, 89, 95, 96, 98, 99, 101, 104, 105, 107, 113, 114, 119, 122, 123, 125, 126, 128, 131, 134, 135, 137, 141, 143, 146, 149, 152, 153, 155, 158, 159, 161, 162
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Oct 31 2013

Keywords

Examples

			Triangle read by rows in which row n lists the divisors of n begins:
1(0^2+0*1+1^2);
1(0^2+0*1+1^2), 2;
1(0^2+0*1+1^2), 3(1^1+1*1+1^2);
1(0^2+0*1+1^2), 2, 4(0^2+0*2+2^2);
1(0^2+0*1+1^2), 5;
1(0^2+0*1+1^2), 2, 3(1^1+1*1+1^2), 6;
1(0^2+0*1+1^2), 7(1^1+1*2+2^2);
1(0^2+0*1+1^2), 2, 4(0^2+0*2+2^2), 8;
1(0^2+0*1+1^2), 3(1^1+1*1+1^2), 9;
1(0^2+0*1+1^2), 2, 5, 10;
1(0^2+0*1+1^2), 11;
1(0^2+0*1+1^2), 2, 3(1^1+1*1+1^2), 4(0^2+0*2+2^2), 6, 12(2^2+2*2+2^2);
1(0^2+0*1+1^2), 13(1^2+1*3+3^2);
1(0^2+0*1+1^2), 2, 7(1^1+1*2+2^2), 14;
1(0^2+0*1+1^1), 3(1^11+1*1+1^2), 5, 15,
i.e. a(1)=2, a(2)=5, a(3)=6, a(4)=8, a(5)=11, a(6)=14, a(7)=15.
		

Crossrefs

Cf. A027750, A230851. Subsequence of A000037.

Programs

  • Maple
    isA003136 := proc(n)
        local x,y ;
        for x from 0 do
            if x^2 > n then
                return false;
            end if;
            for y from 0 do
                if x^2+x*y+y^2 = n then
                    return true;
                elif x^2+x*y+y^2 > n then
                    break;
                end if;
            end do:
        end do:
    end proc:
    isA230902 := proc(n)
        local a36,a20,d ;
        a36 := 0 ;
        a20 := 0 ;
        for d in numtheory[divisors](n) do
            if isA003136(d) then
                a36 := a36+1 ;
            else
                a20 := a20+1 ;
            end if;
        end do:
        simplify( a36=a20) ;
    end proc:
    for n from 0 to 200 do
        if isA230902(n) then
        printf("%d,",n);
        end if;
    end do: # R. J. Mathar, Nov 08 2013
  • Mathematica
    A003136Q[n_] := Resolve[Exists[{x, y}, Reduce[n == x^2 + x*y + y^2, {x, y}, Integers]]];
    okQ[n_] := With[{dd = Divisors[n]}, 2 Count[dd, _?A003136Q] == Length[dd]];
    Select[Range[200], okQ] (* Jean-François Alcover, Jun 07 2024 *)

Extensions

Corrected by R. J. Mathar, Nov 08 2013

A003627 Primes of the form 3n-1.

Original entry on oeis.org

2, 5, 11, 17, 23, 29, 41, 47, 53, 59, 71, 83, 89, 101, 107, 113, 131, 137, 149, 167, 173, 179, 191, 197, 227, 233, 239, 251, 257, 263, 269, 281, 293, 311, 317, 347, 353, 359, 383, 389, 401, 419, 431, 443, 449, 461, 467, 479, 491, 503, 509, 521, 557, 563, 569, 587
Offset: 1

Views

Author

Keywords

Comments

Inert rational primes in the field Q(sqrt(-3)). - N. J. A. Sloane, Dec 25 2017
Primes p such that 1+x+x^2 is irreducible over GF(p). - Joerg Arndt, Aug 10 2011
Primes p dividing sum(k=0,p,C(2k,k)) -1 = A006134(p)-1. - Benoit Cloitre, Feb 08 2003
A039701(A049084(a(n))) = 2; A134323(A049084(a(n))) = -1. - Reinhard Zumkeller, Oct 21 2007
The set of primes of the form 3n - 1 is a superset of the set of lesser of twin primes larger than three (A001359). - Paul Muljadi, Jun 05 2008
Primes of this form do not occur in or as divisors of {n^2+n+1}. See A002383 (n^2+n+1 = prime), A162471 (prime divisors of n^2+n+1 not in A002383), and A002061 (numbers of the form n^2-n+1). - Daniel Tisdale, Jul 04 2009
Or, primes not in A007645. A003627 UNION A007645 = A000040. Also, primes of the form 6*k-5/2-+3/2. - Juri-Stepan Gerasimov, Jan 28 2010
Except for first term "2", all these prime numbers are of the form: 6*n-1. - Vladimir Joseph Stephan Orlovsky, Jul 13 2011
A088534(a(n)) = 0. - Reinhard Zumkeller, Oct 30 2011
For n>1: Numbers k such that (k-4)! mod k =(-1)^(floor(k/3)+1)*floor((k+1)/6), k>4. - Gary Detlefs, Jan 02 2012
Binomial(a(n),3)/a(n)= (3*A024893(n)^2+A024893(n))/2, n>1. - Gary Detlefs, May 06 2012
For every prime p in this sequence, 3 is a 9th power mod p. See Williams link. - Michel Marcus, Nov 12 2017
2 adjoined to A007528. - David A. Corneth, Nov 12 2017
For n >= 2 there exists a polygonal number P_s(3) = 3s - 3 = a(n) + 1. These are the only primes p with P_s(k) = p + 1, s >= 3, k >= 3, since P_s(k) - 1 is composite for k > 3. - Ralf Steiner, May 17 2018

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 870.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Primes of form 3n+1 give A002476.
These are the primes arising in A024893, A087370, A088879. A091177 gives prime index.
Subsequence of A034020.

Programs

  • Haskell
    a003627 n = a003627_list !! (n-1)
    a003627_list = filter ((== 2) . (`mod` 3)) a000040_list
    -- Reinhard Zumkeller, Oct 30 2011
    
  • Magma
    [n: n in PrimesUpTo(720) | n mod 3 eq 2]; // Bruno Berselli, Apr 05 2011
    
  • Maple
    t1 := {}; for n from 0 to 500 do if isprime(3*n+2) then t1 := {op(t1),3*n+2}; fi; od: A003627 := convert(t1,list);
  • Mathematica
    Select[Range[-1, 600, 3], PrimeQ[#] &] (* Vincenzo Librandi, Jun 17 2015 *)
    Select[Prime[Range[200]],Mod[#,3]==2&] (* Harvey P. Dale, Jan 31 2023 *)
  • PARI
    is(n)=n%3==2 && isprime(n) \\ Charles R Greathouse IV, Mar 20 2013

Formula

From R. J. Mathar, Apr 03 2011: (Start)
Sum_{n>=1} 1/a(n)^2 = 0.30792... = A085548 - 1/9 - A175644.
Sum_{n>=1} 1/a(n)^3 = 0.134125... = A085541 - 1/27 - A175645. (End)

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)

A002324 Number of divisors of n == 1 (mod 3) minus number of divisors of n == 2 (mod 3).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Coefficients of Dedekind zeta function for the quadratic number field of discriminant -3. See Formula section for the general expression. - N. J. A. Sloane, Mar 22 2022
Coefficients in expansion of Dirichlet series Product_p (1 - (Kronecker(m,p) + 1)*p^(-s) + Kronecker(m,p) * p^(-2s))^(-1) for m = -3.
(Number of points of norm n in hexagonal lattice) / 6, n>0.
The hexagonal lattice is the familiar 2-dimensional lattice (A_2) in which each point has 6 neighbors. This is sometimes called the triangular lattice.
The first occurrence of a(n) = 1, 2, 3, 4,... is at n= 1, 7, 49, 91, 2401, 637, ... as tabulated in A343771. - R. J. Mathar, Sep 21 2024

Examples

			G.f. = x + x^3 + x^4 + 2*x^7 + x^9 + x^12 + 2*x^13 + x^16 + 2*x^19 + 2*x^21 + ...
		

References

  • J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 112, first display.
  • J. W. L. Glaisher, Table of the excess of the number of (3k+1)-divisors of a number over the number of (3k+2)-divisors, Messenger Math., 31 (1901), 64-72.
  • D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, pp. 7-10.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Dedekind zeta functions for imaginary quadratic number fields of discriminants -3, -4, -7, -8, -11, -15, -19, -20 are A002324, A002654, A035182, A002325, A035179, A035175, A035171, A035170, respectively.
Dedekind zeta functions for real quadratic number fields of discriminants 5, 8, 12, 13, 17, 21, 24, 28, 29, 33, 37, 40 are A035187, A035185, A035194, A035195, A035199, A035203, A035188, A035210, A035211, A035215, A035219, A035192, respectively.

Programs

  • Haskell
    a002324 n = a001817 n - a001822 n  -- Reinhard Zumkeller, Nov 26 2011
    
  • Maple
    A002324 := proc(n)
        local a,pe,p,e;
        a :=1 ;
        for pe in ifactors(n)[2] do
            p := op(1,pe) ;
            e := op(2,pe) ;
            if p = 3 then
                ;
            elif modp(p,3) = 1 then
                a := a*(e+1) ;
            else
                a := a*(1+(-1)^e)/2 ;
            end if;
        end do:
        a ;
    end proc:
    seq(A002324(n),n=1..100) ; # R. J. Mathar, Sep 21 2024
  • Mathematica
    dn12[n_]:=Module[{dn=Divisors[n]},Count[dn,?(Mod[#,3]==1&)]-Count[ dn,?(Mod[#,3]==2&)]]; dn12/@Range[120]  (* Harvey P. Dale, Apr 26 2011 *)
    a[ n_] := If[ n < 1, 0, DivisorSum[ n, KroneckerSymbol[ -3, #] &]]; (* Michael Somos, Aug 24 2014 *)
    Table[DirichletConvolve[DirichletCharacter[3,2,m],1,m,n],{n,1,30}] (* Steven Foster Clark, May 29 2019 *)
    f[3, p_] := 1; f[p_, e_] := If[Mod[p, 3] == 1, e+1, (1+(-1)^e)/2]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 17 2020 *)
  • PARI
    {a(n) = if( n<0, 0, polcoeff( sum(k=1, n, x^k / (1 + x^k + x^(2*k)), x * O(x^n)), n))}; \\ Michael Somos
    
  • PARI
    {a(n) = if( n<1, 0, sumdiv(n, d, (d%3==1) - (d%3==2)))};
    
  • PARI
    {a(n) = local(A, p, e); if( n<1, 0, A = factor(n); prod(k=1, matsize(A)[1], if( p=A[k,1], e=A[k,2]; if( p==3, 1, if( p%3==1, e+1, !(e%2))))))}; \\ Michael Somos, May 20 2005
    
  • PARI
    {a(n) = if( n<1, 0, qfrep([2,1; 1,2], n, 1)[n] / 3)}; \\ Michael Somos, Jun 05 2005
    
  • PARI
    {a(n) = if( n<1, 0, direuler(p=2, n, 1 / (1 - X) / (1 - kronecker(-3, p)*X))[n])}; \\ Michael Somos, Jun 05 2005
    
  • PARI
    my(B=bnfinit(x^2+x+1)); vector(100,n,#bnfisintnorm(B,n)) \\ Joerg Arndt, Jun 01 2024
    
  • Python
    from math import prod
    from sympy import factorint
    def A002324(n): return prod(e+1 if p%3==1 else int(not e&1) for p, e in factorint(n).items() if p != 3) # Chai Wah Wu, Nov 17 2022

Formula

From N. J. A. Sloane, Mar 22 2022 (Start):
The Dedekind zeta function DZ_K(s) for a quadratic field K of discriminant D is as follows.
Here m is defined by K = Q(sqrt(m)) (so m=D/4 if D is a multiple of 4, otherwise m=D).
DZ_K(s) is the product of three terms:
(a) Product_{odd primes p | D} 1/(1-1/p^s)
(b) Product_{odd primes p such that (D|p) = -1} 1/(1-1/p^(2s))
(c) Product_{odd primes p such that (D|p) = 1} 1/(1-1/p^s)^2
and if m is
0,1,2,3,4,5,6,7 mod 8, the prime 2 is to be included in term
-,c,a,a,-,b,a,a, respectively.
For Maple (and PARI) implementations, see link. (End)
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^4)) where f(u, v, w) = u^2 - 3*v^2 + 4*w^2 - 2*u*w + w - v. - Michael Somos, Jul 20 2004
Has a nice Dirichlet series expansion, see PARI line.
G.f.: Sum_{k>0} x^k/(1+x^k+x^(2*k)). - Vladeta Jovovic, Dec 16 2002
a(3*n + 2) = 0, a(3*n) = a(n), a(3*n + 1) = A033687(n). - Michael Somos, Apr 04 2003
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^3), A(x^6)) where f(u1, u2, u3, u6) = (u1 - u3)*(u3 - u6) - (u2 - u6)^2. - Michael Somos, May 20 2005
Multiplicative with a(3^e) = 1, a(p^e) = e+1 if p == 1 (mod 3), a(p^e) = (1+(-1)^e)/2 if p == 2 (mod 3). - Michael Somos, May 20 2005
G.f.: Sum_{k>0} x^(3*k - 2) / (1 - x^(3*k - 2)) - x^(3*k - 1) / (1 - x^(3*k - 1)). - Michael Somos, Nov 02 2005
G.f.: Sum_{n >= 1} q^(n^2)(1-q)(1-q^2)...(1-q^(n-1))/((1-q^(n+1))(1-q^(n+2))...(1-q^(2n))). - Jeremy Lovejoy, Jun 12 2009
a(n) = A001817(n) - A001822(n). - R. J. Mathar, Mar 31 2011
A004016(n) = 6*a(n) unless n=0.
Dirichlet g.f.: zeta(s)*L(chi_2(3),s), with chi_2(3) the nontrivial Dirichlet character modulo 3 (A102283). - Ralf Stephan, Mar 27 2015
From Andrey Zabolotskiy, May 07 2018: (Start)
a(n) = Sum_{ m: m^2|n } A000086(n/m^2).
a(A003136(m)) > 0, a(A034020(m)) = 0 for all m. (End)
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Pi/(3*sqrt(3)) = 0.604599... (A073010). - Amiram Eldar, Oct 11 2022

Extensions

More terms from David Radcliffe
Somos D.g.f. replaced with correct version by Ralf Stephan, Mar 27 2015

A088534 Number of representations of n by the quadratic form x^2 + xy + y^2 with 0 <= x <= y.

Original entry on oeis.org

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

Views

Author

Benoit Cloitre, Nov 16 2003

Keywords

Comments

Also, apparently the number of 6-regular plane graphs with n vertices that have only trigonal faces and loops ("({1,3},6)-spheres" from the paper by Michel Deza and Mathieu Dutour Sikiric). - Andrey Zabolotskiy, Dec 22 2021

Examples

			From _M. F. Hasler_, Mar 05 2018: (Start)
a(0) = a(1) = 1 since 0 = 0^2 + 0*0 + 0^2 and 1 = 0^2 + 0*1 + 1^2.
a(2) = 0 since 2 cannot be written as x^2 + xy + y^2.
a(49) = 2 since 49 = 0^2 + 0*7 + 7^2 = 3^2 + 3*5 + 5^2. (End)
		

References

  • B. C. Berndt, "On a certain theta-function in a letter of Ramanujan from Fitzroy House", Ganita 43 (1992), 33-43.

Crossrefs

Cf. A118886 (indices of values > 1), A198772 (indices of 1's), A198773 (indices of 2's), A198774 (indices of 3's), A198775 (indices of 4's), A198799 (index of 1st term = n).
Cf. A215622.

Programs

  • Haskell
    a088534 n = length
       [(x,y) | y <- [0..a000196 n], x <- [0..y], x^2 + x*y + y^2 == n]
    a088534_list = map a088534 [0..]
    -- Reinhard Zumkeller, Oct 30 2011
    
  • Julia
    function A088534(n)
        n % 3 == 2 && return 0
        M = Int(round(2*sqrt(n/3)))
        count = 0
        for y in 0:M, x in 0:y
            n == x^2 + y^2 + x*y && (count += 1)
        end
        return count
    end
    A088534list(upto) = [A088534(n) for n in 0:upto]
    A088534list(104) |> println # Peter Luschny, Mar 17 2018
    
  • Mathematica
    a[n_] := Sum[Boole[i^2 + i*j + j^2 == n], {i, 0, n}, {j, 0, i}];
    Table[a[n], {n, 0, 104}] (* Jean-François Alcover, Jun 20 2018 *)
  • PARI
    a(n)=sum(i=0,n,sum(j=0,i,if(i^2+i*j+j^2-n,0,1)))
    
  • PARI
    A088534(n,d)=sum(x=0,sqrt(n\3),sum(y=max(x,sqrtint(n-x^2)\2),sqrtint(n-2*x^2),x^2+x*y+y^2==n&&(!d||!printf("%d",[x,y]))))\\ Set 2nd arg = 1 to print all decompositions, with 0 <= x <= y. - M. F. Hasler, Mar 05 2018
    
  • Python
    def A088534(n):
        c = 0
        for y in range(n+1):
            if y**2 > n:
                break
            for x in range(y+1):
                z = x*(x+y)+y**2
                if z > n:
                    break
                elif z == n:
                    c += 1
        return c # Chai Wah Wu, May 16 2022

Formula

a(A003136(n)) > 0; a(A034020(n)) = 0;
a(A118886(n)) > 1; a(A198772(n)) = 1;
a(A198773(n)) = 2; a(A198774(n)) = 3;
a(A198775(n)) = 4;
a(A198799(n)) = n and a(m) <> n for m < A198799(n). - Reinhard Zumkeller, Oct 30 2011, corrected by M. F. Hasler, Mar 05 2018
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, 0 <= x <= y is floor((Product_{p_i in S_1} (e_i + 1) + 1) / 2) if all e_j are even and 0 otherwise. E.g. a(1729) = 4 since 1729 = 7^1*13^1*19^1 and floor(((1+1)*(1+1)*(1+1)+1)/2) = 4. - Seth A. Troisi, Jul 02 2020
a(n) = ceiling(A004016(n)/12) = (A002324(n) + A145377(n)) / 2. - Andrey Zabolotskiy, Dec 23 2021

Extensions

Edited by M. F. Hasler, Mar 05 2018

A087943 Numbers n such that 3 divides sigma(n).

Original entry on oeis.org

2, 5, 6, 8, 10, 11, 14, 15, 17, 18, 20, 22, 23, 24, 26, 29, 30, 32, 33, 34, 35, 38, 40, 41, 42, 44, 45, 46, 47, 49, 50, 51, 53, 54, 55, 56, 58, 59, 60, 62, 65, 66, 68, 69, 70, 71, 72, 74, 77, 78, 80, 82, 83, 85, 86, 87, 88, 89, 90, 92, 94, 95, 96, 98, 99, 101, 102, 104, 105, 106
Offset: 1

Views

Author

Yuval Dekel (dekelyuval(AT)hotmail.com), Oct 27 2003

Keywords

Comments

Numbers n such that in the prime factorization n = Product_i p_i^e_i, there is some p_i == 1 (mod 3) with e_i == 2 (mod 3) or some p_i == 2 (mod 3) with e_i odd. - Robert Israel, Nov 09 2016

Crossrefs

Programs

  • Maple
    select(n -> numtheory:-sigma(n) mod 3 = 0, [$1..1000]); # Robert Israel, Nov 09 2016
  • Mathematica
    Select[Range[1000],Mod[DivisorSigma[1,#],3]==0&] (* Enrique Pérez Herrero, Sep 03 2013 *)
  • PARI
    is(n)=sigma(n)%3==0 \\ Charles R Greathouse IV, Sep 04 2013
    
  • PARI
    is(n)=forprime(p=2,997,my(e=valuation(n,p)); if(e && Mod(p,3*p-3)^(e+1)==1, return(1), n/=p^e)); sigma(n)%3==0 \\ Charles R Greathouse IV, Sep 04 2013

Formula

a(n) << n^k for any k > 1, where << is the Vinogradov symbol. - Charles R Greathouse IV, Sep 04 2013
a(n) ~ n as n -> infinity: since Sum_{primes p == 2 (mod 3)} 1/p diverges, asymptotically almost every number is divisible by some prime p == 2 (mod 3) but not by p^2. - Robert Israel, Nov 09 2016
Because sigma(n) and sigma(3n)=A144613(n) differ by a multiple of 3, these are also the numbers n such that n divides sigma(3n). - R. J. Mathar, May 19 2020

Extensions

More terms from Benoit Cloitre and Ray Chandler, Oct 27 2003

A302056 Numbers k such that the coefficient of x^k in the expansion of Product_{j>=1} (1 - x^j)^4 is zero.

Original entry on oeis.org

9, 14, 19, 24, 31, 34, 39, 42, 44, 49, 53, 59, 64, 65, 69, 74, 75, 82, 84, 86, 89, 94, 97, 99, 108, 109, 111, 114, 116, 119, 124, 130, 133, 134, 139, 144, 149, 150, 152, 157, 159, 163, 164, 167, 169, 174, 180, 184, 185, 189, 194, 196, 198, 199, 201, 203, 207, 209
Offset: 1

Views

Author

Ilya Gutkovskiy, Mar 31 2018

Keywords

Comments

Numbers k such that number of partitions of k into an even number of distinct parts equals number of partitions of k into an odd number of distinct parts, with 4 types of each part.
From Jianing Song, Feb 09 2021: (Start)
The following are equivalent:
- k is in this sequence;
- At least one prime congruent to 5 modulo 6 divides 6*k+1 with an odd exponent;
- 6*k+1 is not of the form x^2 + x*y + y^2, i.e., 6*k+1 is in A034020. (End)

Crossrefs

Numbers k such that the coefficient of x^k in the expansion of Product_{j>=1} (1 - x^j)^m is zero: A090864 (m = 1), A213250 (m = 2), A014132 (m = 3), this sequence (m = 4), A302057 (m = 5), A020757 (m = 6), A322430 (m = 8), A322431 (m = 10), A322432 (m = 14), A322043 (m = 15), A322433 (m = 26).

Programs

  • Mathematica
    Flatten[Position[nmax = 210; Rest[CoefficientList[Series[QPochhammer[x]^4, {x, 0, nmax}], x]], 0]]
    Flatten[Position[nmax = 210; Rest[CoefficientList[Series[Sum[(-1)^j x^(j (3 j + 1)/2), {j, -nmax, nmax}]^4, {x, 0, nmax}], x]], 0]]
    Flatten[Position[nmax = 210; Rest[CoefficientList[Series[Exp[-4 Sum[DivisorSigma[1, j] x^j/j, {j, 1, nmax}]], {x, 0, nmax}], x]], 0]]
  • PARI
    x='x+O('x^999); v=Vec(eta(x)^4 - 1); for(k=1, #v, if(v[k]==0, print1(k, ", "))); \\ Altug Alkan, Mar 31 2018, after Joerg Arndt at A213250

A198799 Smallest m such that m can be written in exactly n ways as x^2 + xy + y^2 with 0 <= x <= y.

Original entry on oeis.org

2, 0, 49, 637, 1729, 8281, 12103, 1529437, 53599, 157339, 593047, 19882681, 375193, 68574961, 2989441, 7709611, 1983163, 47738317081, 4877509, 21169376772835837, 18384457, 377770939, 69771386503, 146482609, 13882141, 1302924259, 3418797938647, 92672671
Offset: 0

Views

Author

Reinhard Zumkeller, Oct 30 2011

Keywords

Comments

10^12 < a(19) <= 21169376772835837. a(20) = 18384457. a(21) = 377770939. - Donovan Johnson, Nov 07 2011

Examples

			a(0) = A034020(1) = 2;
a(1) = A198772(1) = 0;
a(2) = A198773(1) = A118886(1) = 49;
a(3) = A198774(1) = A118886(28) = 637;
a(4) = A198775(1) = A118886(97) = 1729;
a(5) = 8281 = A118886(569) = 0 + 0*91 + 91^2 = 11^2 + 11*85 + 85^2 = 19^2 + 19*80 + 80^2 = 39^2 + 39*65 + 65^2 = 49^2 + 49*56 + 56^2;
a(6) = 12103 = A118886(862) = 2^2 + 2*109 + 109^2 = 21^2 + 21*98 + 98^2 = 27^2 + 27*94 + 94^2 = 34^2 + 34*89 + 89^2 = 49^2 + 49*77 + 77^2 = 61^2 + 61*66 + 66^2.
405769 = Q(0, 637) = Q(77, 595) = Q(133, 560) = Q(145, 552) = Q(200, 513) = Q(208, 507) = Q(273, 455) = Q(343, 392), where Q(x, y) = x^2 + xy + y^2 but it is not a(7) since sequence definition focuses 'exactly'. - _M. F. Hasler_, Mar 06 2018
		

Crossrefs

Cf. A300419 (analog, with x,y >= 1).

Programs

  • Haskell
    import Data.List (elemIndex)
    import Data.Maybe (fromJust)
    a198799 n = fromJust $ elemIndex n a088534_list
    
  • PARI
    a(n)=for(k=0,oo,A088534(k)==n&&return(k)) \\ M. F. Hasler, Mar 06 2018

Formula

A088534(a(n)) = n and A088534(m) <> n for m < a(n).

Extensions

a(7)-a(18) from Donovan Johnson, Nov 07 2011
More terms from Seth A. Troisi, Apr 23 2022

A232436 Numbers which are uniquely decomposable into x^2+xy+y^2, the unique decomposition being with two distinct nonzero x and y.

Original entry on oeis.org

7, 13, 19, 21, 28, 31, 37, 39, 43, 52, 57, 61, 63, 67, 73, 76, 79, 84, 93, 97, 103, 109, 111, 112, 117, 124, 127, 129, 139, 148, 151, 156, 157, 163, 171, 172, 175, 181, 183, 189, 193, 199, 201, 208, 211, 219, 223, 228, 229, 237, 241, 244, 252, 268
Offset: 1

Views

Author

Jean-Christophe Hervé, Nov 23 2013

Keywords

Comments

These are the primitive elements of A024606, the integers which are expressible as x^2 + xy + y^2 with distinct nonzero x and y.
As a subsequence of A003136 (Loeschian numbers), the sequence is related with the triangular lattice: circles with radius sqrt(a(n)) centered at a grid point in this lattice hit exactly 12 points, cf. A004016.
Numbers with exactly one prime factor of form 6k+1 with multiplicity one and no prime factor of form 3k+2 with odd multiplicity, that is a(n) is of form 3^a*p*q^2, with a>=0, p a prime of form 6k+1, and q an integer with all its prime factors of form 3k+2. There is thus no square in the sequence.
From a(n) = 3^a*p*q^2, it is easily seen that sigma(a(n)) = 2 mod 6,
thus this sequence is a subsequence of A074628: the two sequences are equal up to a(308) = 1723; then A074628(309)= 1729 = a(1)*a(2)*a(3), the famous Ramanujan's taxi number, and a(309) = A074628(310) = 1731.
The square of these numbers is also uniquely decomposable into the form x^2 + xy + y^2 with x and y > 0, thus this sequence is a subsequence of A232437.

Examples

			a(1)= 7 = 2^2+2+1, a(2)= 13 = 3^2+3+1. However 3 = 1+1+1 and 4 = 2^2+0*2+0 are not in the sequence because the unique decomposition of these numbers is not with two distinct nonzero numbers; 49, 147 are also excluded because there are two decompositions of these numbers (including one with equal or zero components x and y).
		

Crossrefs

Cf. (Analog for the square lattice) A230779, A001481, A004431, A002144, A004018, A084645.

Programs

  • Mathematica
    r[k_] := Reduce[x != 0 && y != 0 && x != y && k == x^2 + x y + y^2, {x, y}, Integers];
    selQ[k_] := If[IntegerQ[Sqrt[k]], False, Which[rk = r[k]; rk === False, False, rk[[0]] === And && Length[rk] == 2, True, rk[[0]] === Or && Length[rk] == 12, True, True, False]];
    Select[Range[1000], selQ] (* Jean-François Alcover, Feb 20 2020 *)

Formula

Terms are obtained by the products A230781(k)*A002476(p) for k, p > 0, ordered by increasing values.
A004016(a(n))=12.

A383785 Numbers not occurring as norms of vectors in any regular planar lattice.

Original entry on oeis.org

6, 11, 14, 15, 22, 23, 24, 30, 33, 35, 38, 42, 44, 46, 47, 51, 54, 55, 56, 59, 60, 62, 66, 69, 70, 71, 77, 78, 83, 86, 87, 88, 92, 94, 95, 96, 99, 102, 105, 107, 110, 114, 115, 118, 119, 120, 123, 126, 131, 132, 134, 135, 138, 140, 141, 142, 143, 150, 152, 154
Offset: 1

Views

Author

C. S. Davis, May 09 2025

Keywords

Comments

The norms of Hurwitz quaternions strictly noncoplanar with the origin and any nonopposing pair of unit Hurwitz quaternions, due to Lagrange's four-square theorem and the complement's representation of every coplanar Hurwitz quaternion norm. - C. S. Davis, May 19 2025

Crossrefs

Intersection of A022544 and A034020.
Complement of A383784.
Supersequence of A055039.
Showing 1-10 of 11 results. Next