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 31 results. Next

A002476 Primes of the form 6m + 1.

Original entry on oeis.org

7, 13, 19, 31, 37, 43, 61, 67, 73, 79, 97, 103, 109, 127, 139, 151, 157, 163, 181, 193, 199, 211, 223, 229, 241, 271, 277, 283, 307, 313, 331, 337, 349, 367, 373, 379, 397, 409, 421, 433, 439, 457, 463, 487, 499, 523, 541, 547, 571, 577, 601, 607, 613, 619
Offset: 1

Views

Author

Keywords

Comments

Equivalently, primes of the form 3m + 1.
Rational primes that decompose in the field Q(sqrt(-3)). - N. J. A. Sloane, Dec 25 2017
Primes p dividing Sum_{k=0..p} binomial(2k, k) - 3 = A006134(p) - 3. - Benoit Cloitre, Feb 08 2003
Primes p such that tau(p) == 2 (mod 3) where tau(x) is the Ramanujan tau function (cf. A000594). - Benoit Cloitre, May 04 2003
Primes of the form x^2 + xy - 2y^2 = (x+2y)(x-y). - N. J. A. Sloane, May 31 2014
Primes of the form x^2 - xy + 7y^2 with x and y nonnegative. - T. D. Noe, May 07 2005
Primes p such that p^2 divides Sum_{m=1..2(p-1)} Sum_{k=1..m} (2k)!/(k!)^2. - Alexander Adamchuk, Jul 04 2006
A006512 larger than 5 (Greater of twin primes) is a subsequence of this. - Jonathan Vos Post, Sep 03 2006
A039701(A049084(a(n))) = A134323(A049084(a(n))) = 1. - Reinhard Zumkeller, Oct 21 2007
Also primes p such that the arithmetic mean of divisors of p^2 is an integer: sigma_1(p^2)/sigma_0(p^2) = C. (A000203(p^2)/A000005(p^2) = C). - Ctibor O. Zizka, Sep 15 2008
Fermat knew that these numbers can also be expressed as x^2 + 3y^2 and are therefore not prime in Z[omega], where omega is a complex cubic root of unity. - Alonso del Arte, Dec 07 2012
Primes of the form x^2 + xy + y^2 with x < y and nonnegative. Also see A007645 which also applies when x=y, adding an initial 3. - Richard R. Forberg, Apr 11 2016
For any term p in this sequence, let k = (p^2 - 1)/6; then A016921(k) = p^2. - Sergey Pavlov, Dec 16 2016; corrected Dec 18 2016
For the decomposition p=x^2+3*y^2, x(n) = A001479(n+1) and y(n) = A001480(n+1). - R. J. Mathar, Apr 16 2024

Examples

			Since 6 * 1 + 1 = 7 and 7 is prime, 7 is in the sequence. (Also 7 = 2^2 + 3 * 1^2 = (2 + sqrt(-3))(2 - sqrt(-3)).)
Since 6 * 2 + 1 = 13 and 13 is prime, 13 is in the sequence.
17 is prime but it is of the form 6m - 1 rather than 6m + 1, and is therefore not in the sequence.
		

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.
  • David A. Cox, Primes of the Form x^2 + ny^2. New York: Wiley (1989): 8.
  • 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).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 261.

Crossrefs

For values of m see A024899. Primes of form 3n - 1 give A003627.
These are the primes arising in A024892, A024899, A034936.
A091178 gives prime index.
Subsequence of A016921 and of A050931.
Cf. A004611 (multiplicative closure).

Programs

  • GAP
    Filtered(List([0..110],k->6*k+1),n-> IsPrime(n)); # Muniru A Asiru, Mar 11 2019
  • Haskell
    a002476 n = a002476_list !! (n-1)
    a002476_list = filter ((== 1) . (`mod` 6)) a000040_list
    -- Reinhard Zumkeller, Jan 15 2013
    
  • J
    (#~ 1&p:) >: 6 * i.1000 NB. Stephen Makdisi, May 01 2018
    
  • Magma
    [n: n in [1..700 by 6] | IsPrime(n)]; // Vincenzo Librandi, Apr 05 2011
    
  • Maple
    a := [ ]: for n from 1 to 400 do if isprime(6*n+1) then a := [ op(a), n ]; fi; od: A002476 := n->a[n];
  • Mathematica
    Select[6*Range[100] + 1, PrimeQ[ # ] &] (* Stefan Steinerberger, Apr 06 2006 *)
  • PARI
    select(p->p%3==1,primes(100)) \\ Charles R Greathouse IV, Oct 31 2012
    

Formula

From R. J. Mathar, Apr 03 2011: (Start)
Sum_{n >= 1} 1/a(n)^2 = A175644.
Sum_{n >= 1} 1/a(n)^3 = A175645. (End)
a(n) = 6*A024899(n) + 1. - Zak Seidov, Aug 31 2016
From Vaclav Kotesovec, May 02 2020: (Start)
Product_{k>=1} (1 - 1/a(k)^2) = 1/A175646.
Product_{k>=1} (1 + 1/a(k)^2) = A334481.
Product_{k>=1} (1 - 1/a(k)^3) = A334478.
Product_{k>=1} (1 + 1/a(k)^3) = A334477. (End)
Legendre symbol (-3, a(n)) = +1 and (-3, A007528(n)) = -1, for n >= 1. For prime 3 one sets (-3, 3) = 0. - Wolfdieter Lang, Mar 03 2021

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)

A175646 Decimal expansion of the Product_{primes p == 1 (mod 3)} 1/(1 - 1/p^2).

Original entry on oeis.org

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

Views

Author

R. J. Mathar, Aug 01 2010

Keywords

Comments

The Euler product of the Riemann zeta function at 2 restricted to primes in A002476, which is the inverse of the infinite product (1-1/7^2)*(1-1/13^2)*(1-1/19^2)*...
There is a complementary Product_{primes p == 2 (mod 3)} 1/(1-1/p^2) = A333240 = 1.4140643908921476375655018190798... such that (this constant here)*1.4140643.../(1-1/3^2) = zeta(2) = A013661.
Because 1/(1-p^(-2)) = 1+1/(p^2-1), the complementary 1.414064... also equals Product_{primes p == 2 (mod 3)} (1+1/(p^2-1)), which appears in Eq. (1.8) of [Dence and Pomerance]. - R. J. Mathar, Jan 31 2013

Examples

			1.03401487541434188053903064441304762857896...
		

Crossrefs

Programs

  • Maple
    z := n -> Zeta(n)/Im(polylog(n, (-1)^(2/3))):
    x := n -> (z(2^n)*(3^(2^n)-1)*sqrt(3)/2)^(1/2^n) / 3:
    evalf(4*Pi^2 / (27*mul(x(n), n=1..8)), 106); # Peter Luschny, Jan 17 2021
  • Mathematica
    digits = 105;
    precision = digits + 5;
    prodeuler[p_, a_, b_, expr_] := Product[If[a <= p <= b, expr, 1], {p, Prime[Range[PrimePi[a], PrimePi[b]]]}];
    Lv3[s_] := prodeuler[p, 1, 2^(precision/s), 1/(1 - KroneckerSymbol[-3, p]*p^-s)] // N[#, precision]&;
    Lv4[s_] := 2*Im[PolyLog[s, Exp[2*I*Pi/3]]]/Sqrt[3];
    Lv[s_] := If[s >= 10000, Lv3[s], Lv4[s]];
    gv[s_] := (1 - 3^(-s))*Zeta[s]/Lv[s];
    pB = (3/4)*Product[gv[2^n*2]^(2^-(n+1)), {n, 0, 11}] // N[#, precision]&;
    pA = Pi^2/9/pB ;
    RealDigits[pA, 10, digits][[1]]
    (* Jean-François Alcover, Jan 11 2021, after PARI code due to Artur Jasinski *)
    S[m_, n_, s_] := (t = 1; sums = 0; difs = 1; While[Abs[difs] > 10^(-digits - 5) || difs == 0, difs = (MoebiusMu[t]/t) * Log[If[s*t == 1, DirichletL[m, n, s*t], Sum[Zeta[s*t, j/m]*DirichletCharacter[m, n, j]^t, {j, 1, m}]/m^(s*t)]]; sums = sums + difs; t++]; sums);
    P[m_, n_, s_] := 1/EulerPhi[m] * Sum[Conjugate[DirichletCharacter[m, r, n]] * S[m, r, s], {r, 1, EulerPhi[m]}] + Sum[If[GCD[p, m] > 1 && Mod[p, m] == n, 1/p^s, 0], {p, 1, m}];
    Z[m_, n_, s_] := (w = 1; sumz = 0; difz = 1; While[Abs[difz] > 10^(-digits - 5), difz = P[m, n, s*w]/w; sumz = sumz + difz; w++]; Exp[sumz]);
    $MaxExtraPrecision = 1000; digits = 121; RealDigits[Chop[N[Z[3,1,2], digits]], 10, digits-1][[1]] (* Vaclav Kotesovec, Jan 15 2021 *)
    z[n_] := Zeta[n] / Im[PolyLog[n, (-1)^(2/3)]];
    x[n_] := (z[2^n] (3^(2^n) - 1) Sqrt[3]/2)^(1/2^n) / 3;
    N[4 Pi^2 / (27 Product[x[n], {n, 8}]), 106] (* Peter Luschny, Jan 17 2021 *)

Formula

Equals 2*Pi^2 / (3^(7/2) * A301429^2). - Vaclav Kotesovec, May 12 2020
Equals Sum_{k>=1} 1/A004611(k)^2. - Amiram Eldar, Sep 27 2020

Extensions

More digits from Vaclav Kotesovec, May 12 2020 and Jun 27 2020

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

A050931 Numbers having a prime factor congruent to 1 mod 6.

Original entry on oeis.org

7, 13, 14, 19, 21, 26, 28, 31, 35, 37, 38, 39, 42, 43, 49, 52, 56, 57, 61, 62, 63, 65, 67, 70, 73, 74, 76, 77, 78, 79, 84, 86, 91, 93, 95, 97, 98, 103, 104, 105, 109, 111, 112, 114, 117, 119, 122, 124, 126, 127, 129, 130, 133, 134, 139, 140, 143, 146, 147, 148, 151
Offset: 1

Views

Author

Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Dec 30 1999

Keywords

Comments

Original definition: Solutions c of cot(2*Pi/3)*(-(a+b+c)*(-a+b+c)*(-a+b-c)*(a+b-c))^(1/2)=a^2+b^2-c^2, c>a,b integers.
Note cot(2*Pi/3) = -1/sqrt(3).
Also the c-values for solutions to c^2 = a^2 + ab + b^2 in positive integers. Also the numbers which occur as the longest side of some triangle with integer sides and a 120-degree angle. - Paul Boddington, Nov 05 2007
The sequence can also be defined as the numbers w which are Heronian means of two distinct positive integers u and v, i.e., w = [u+sqrt(uv)+v]/3. E.g., 28 is the Heronian mean of 4 and 64 (and also of 12 and 48). - Pahikkala Jussi, Feb 16 2008
From Jean-Christophe Hervé, Nov 24 2013: (Start)
This sequence is the analog of hypotenuse numbers A009003 for triangles with integer sides and a 120-degree angle. There are two integers a and b > 0 such that a(n)^2 = a^2 + ab + b^2, and a, b and a(n) are the sides of the triangle: a(n) is the sequence of lengths of the longest side of these triangles. A004611 is the same for primitive triangles.
a and b cannot be equal because sqrt(3) is not rational. Then the values a(n) are such that a(n)^2 is in A024606. It follows that a(n) is the sequence of multiples of primes of form 6k+1 A002476.
The sequence is closed under multiplication. The primitive elements are those with exactly one prime divisor of the form 6k+1 with multiplicity one, which are also those for which there exists a unique 120-degree integer triangle with its longest side equals to a(n).
(End)
Conjecture: Numbers m such that abs(Sum_{k=1..m} [k|m]*A008683(k)*(-1)^(2*k/3)) = 0. - Mats Granvik, Jul 06 2024

Crossrefs

Cf. A002476, A004611, A024606, A230780 (complement), A009003.
Cf. A027748.

Programs

  • Haskell
    a050931 n = a050931_list !! (n-1)
    a050931_list = filter (any (== 1) . map (flip mod 6) . a027748_row) [1..]
    -- Reinhard Zumkeller, Apr 09 2014
    
  • Mathematica
    Select[Range[2,200],MemberQ[Union[Mod[#,6]&/@FactorInteger[#][[All,1]]],1]&] (* Harvey P. Dale, Aug 24 2019 *)
  • PARI
    is_A050931(n)=n>6&&Set(factor(n)[,1]%6)[1]==1 \\ M. F. Hasler, Mar 04 2018

Formula

A005088(a(n)) > 0. Terms are obtained by the products A230780(k)*A004611(p) for k, p > 0, ordered by increasing values. - Jean-Christophe Hervé, Nov 24 2013
cot(2*Pi/3) = -1/sqrt(3) = -0.57735... = - A020760. - M. F. Hasler, Aug 18 2016

Extensions

Simpler definition from M. F. Hasler, Mar 04 2018

A004612 Numbers that are divisible only by primes congruent to 2 mod 3.

Original entry on oeis.org

1, 2, 4, 5, 8, 10, 11, 16, 17, 20, 22, 23, 25, 29, 32, 34, 40, 41, 44, 46, 47, 50, 53, 55, 58, 59, 64, 68, 71, 80, 82, 83, 85, 88, 89, 92, 94, 100, 101, 106, 107, 110, 113, 115, 116, 118, 121, 125, 128, 131, 136, 137
Offset: 1

Views

Author

Keywords

Comments

Square roots of numbers n such that n-th coefficient of eta(x)^3/eta(x^3)=-1, where eta(x) is given by A010815. - Benoit Cloitre, Oct 06 2005
Apparently the complement to A135412. - R. J. Mathar, Aug 21 2016

Examples

			2=2, 4=2^2, 5=5, 8=2^3, 10=2*5, 11=11, 16=2^4, 17=17, 20=2^2*5, 22 = 2*11, 23=23, 25=5^2, 29=29... (products of powers of elements of A003627). - _R. J. Mathar_, Jan 22 2021
		

Crossrefs

Programs

  • Magma
    [n: n in [1..300] | forall{d: d in PrimeDivisors(n) | d mod 3 eq 2}]; // Vincenzo Librandi, Aug 21 2012
  • Mathematica
    ok[1]=True;ok[n_]:=And@@(Mod[#,3]==2&)/@FactorInteger[n][[All,1]];Select[Range[200],ok] (* Vincenzo Librandi, Aug 21 2012 *)

A089025 Side of primitive equilateral triangle bearing at least one integral cevian that partitions an edge into two integral sections.

Original entry on oeis.org

8, 15, 21, 35, 40, 48, 55, 65, 77, 80, 91, 96, 99, 112, 117, 119, 133, 143, 153, 160, 168, 171, 176, 187, 207, 209, 221, 224, 225, 247, 253, 255, 264, 275, 280, 285, 299, 312, 319, 323, 325, 341, 345, 352, 360, 377, 391, 403, 408, 416, 425, 435, 437, 440, 448
Offset: 1

Views

Author

Lekraj Beedassy, Nov 12 2003

Keywords

Comments

The cevians are numbers divisible only by primes of form 6n+1:A002476 (i.e., correspond to entries of A004611).
Composite cevians c belong to more than one equilateral triangle, actually to 2^(omega(c)-1) of them, where omega(n)=A001221(n). For instance, cevian 1813=7^2*37, with omega(1813)=2, belongs to 2^(2-1)=2 equilateral triangles, their sides being 1927=255+1627 and 1960=343+1617, while cevian 1729=7*13*19, with omega(1729)=3, belongs to 2^(3-1)=4 equilateral triangles whose sides are 1775=96+1679, 1824=209+1615, 1840=249+1591, 1859=299+1560.
Given a triangle with integer side lengths a, b, c relatively prime with a < b, c < b, and angle opposite c of 60 degrees then a*a - a*b + b*b = c*c from law of cosines and called a primitive Eisenstein triple by Gordon. This sequence is the possible side lengths of b. - Michael Somos, Apr 11 2012

Examples

			The equilateral triangle with side 280, for instance, has cevian 247 partitioning an edge into 93+187, as well as cevian 271 that sections the edge into 19+261.
		

Crossrefs

Programs

  • Mathematica
    findPrimIntEquiSide[maxC_] :=
    Reap[Do[Do[
         With[{cevian = Abs[c E^((2 \[Pi] I)/6) - a]},
          If[FractionalPart[cevian] == 0 && GCD[a, c] == 1,
           Sow[c]; Break[]]], {a, Floor[c/2],
          1, -1}], {c, maxC}]][[2, 1]]
    (* Andrew Turner, Aug 04 2017 *)

A335893 Primitive triples for integer-sided triangles whose angles A < B < C are in arithmetic progression.

Original entry on oeis.org

3, 7, 8, 5, 7, 8, 7, 13, 15, 8, 13, 15, 5, 19, 21, 16, 19, 21, 11, 31, 35, 24, 31, 35, 7, 37, 40, 33, 37, 40, 13, 43, 48, 35, 43, 48, 16, 49, 55, 39, 49, 55, 9, 61, 65, 56, 61, 65, 32, 67, 77, 45, 67, 77, 17, 73, 80, 63, 73, 80, 40, 79, 91, 51, 79, 91, 11, 91, 96
Offset: 1

Views

Author

Bernard Schott, Jun 29 2020

Keywords

Comments

The triples are displayed in nondecreasing order of middle side, and if middle sides coincide then by increasing order of the largest side, hence, each triple (a, b, c) is in increasing order.
These three properties below are equivalent:
-> integer-sided triangles whose angles A < B < C are in arithmetic progression,
-> integer-sided triangles such that B = (A+C)/2 with A < C,
-> integer-sided triangles such that A < B < C with B = Pi/3.
When A < B < C are in arithmetic progression with B = A + phi and C = B + phi, then 0 < phi < Pi/3.
The corresponding metric relation between sides is b^2 = a^2 - a*c + c^2.
There exists such primitive triangle iff b^2 is an odd square term of A024612. Hence, the first few middle sides b are 7, 13, 19, 31, 37, 43, 49, 61, 67, ... and b is a term of A004611 \ {1}. Indeed, b cannot be even if the triple is primitive.
As B = Pi/3 and C runs from Pi/3 to 2*Pi/3, sin(C) gets a maximum when C = Pi/2 with sin(C) = 1, hence, from law of sines (see link): b/sin(B) = c/sin(C), and c < b/sin(Pi/3) = b * 2/sqrt(3) < 6*b/5. This bound is used in the PARI and Maple programs below.
When triple (a, b, c) is solution, then triple (c-a, b, c) is another solution. Hence, for each b odd solution, there exist 2 triples with same middle side b and same largest side c.
The common tangent to the nine-point circle and the incircle of a triangle ABC is parallel to the Euler line iff angles A < B < C are in arithmetic progression (see Crux Mathematicorum for Indian team selection). - Bernard Schott, Apr 14 2022
These triples are called (primitive) Eisenstein triples (Wikipedia). - Bernard Schott, Sep 21 2022

Examples

			(3, 7, 8) is a triple for this sequence because from law of cosines (see link), cos(A) = (7^2 + 8^2 - 3^2)/(2*7*8) = 13/14, cos(B) = (8^2 + 3^2 - 7^2)/(2*8*3) = 1/2 and cos(C) = (3^2 + 7^2 - 8^2)/(2*3*7) = -1/7; then, (A+C)/2 = ( arccos(13/14) + arccos(-1/7) )/2 = Pi/3 = B.
Also, arccos(13/14) ~ 21.787 degrees, arccos(1/2) = 60 degrees, arccos(-1/7) ~ 98.213 degrees, so B-A = C-B ~ 38.213 degrees, hence (A, B, C) are in arithmetic progression.
5^2 - 5*8 + 8^2 = 7^2, hence (5, 7, 8) is another triple for triangle whose angles A < B < C are in arithmetic progression.
		

References

  • V. Lespinard & R. Pernet, Trigonométrie, Classe de Mathématiques élémentaires, programme 1962, problème B-298 p. 124, André Desvigne.

Crossrefs

Cf. A335894 (smallest side), A335895 (middle side), A335896 (largest side), A335897 (perimeter).
Cf. A103606 (primitive Pythagorean triples), A335034 (primitive triples for triangles with two perpendicular medians).

Programs

  • Maple
    for b from 3 to 250 by 2 do
    for c from b+1 to 6*b/5 do
    a := (c - sqrt(4*b^2-3*c^2))/2;
    if gcd(a,b)=1 and issqr(4*b^2-3*c^2) then print(a,b,c,c-a,b,c); end if;
    end do;
    end do;
  • PARI
    lista(nn) = {forstep(b=1, nn, 2, for(c=b+1, 6*b\5, if (issquare(d=4*b^2 - 3*c^2), my(a = (c - sqrtint(d))/2); if ((denominator(a)==1) && (gcd(a, b) == 1), print(a, ", ", b, ", ", c, ", "); print(c-a, ", ", b, ", ", c, ", ");););););} \\ Michel Marcus, Jul 15 2020

A335895 Middle side of primitive triples, in nondecreasing order, for integer-sided triangles whose angles A < B < C are in arithmetic progression.

Original entry on oeis.org

7, 7, 13, 13, 19, 19, 31, 31, 37, 37, 43, 43, 49, 49, 61, 61, 67, 67, 73, 73, 79, 79, 91, 91, 91, 91, 97, 97, 103, 103, 109, 109, 127, 127, 133, 133, 133, 133, 139, 139, 151, 151, 157, 157, 163, 163, 169, 169, 181, 181, 193, 193, 199, 199, 211, 211, 217, 217, 217, 217
Offset: 1

Views

Author

Bernard Schott, Jul 04 2020

Keywords

Comments

Equivalently, lengths of the middle side b of primitive non-equilateral triangles that have an angle of Pi/3; indeed, this side is opposite to angle B = Pi/3.
Also solutions b of the Diophantine equation b^2 = a^2 - a*c + c^2 with a < b and gcd(a,b) = 1.
For the corresponding primitive triples and miscellaneous properties and references, see A335893.
When (a, b, c) is a triple or a solution, then (c-a, b, c) is another solution, so every b in the data is present an even number of times (see examples).
From Bernard Schott, Apr 02 2021: (Start)
Terms are primes of the form 6k+1, or products of primes of the form 6k+1. Three observations:
-> The lengths b are in A004611 \ {1} without repetition, 1 corresponds to the equilateral triangle (1, 1, 1).
-> Every term appears 2^k (k>0) times consecutively and the smallest term that appears 2^k times is precisely A121940(k); see examples.
-> The terms that appear precisely twice consecutively are in A133290. (End)

Examples

			b = 7 appears twice because A121940(1) = 7 and:
  7^2 = 3^2 - 3*8 + 8^2, with triple (3, 7, 8),
  7^2 = 5^2 - 5*8 + 8^2, with triple (5, 7, 8).
b = 91 appears four times because A121940(2) = 91 and:
  91^2 = 11^2 - 11*96 + 96^2, with triple (11, 91, 96),
  91^2 = 85^2 - 85*96 + 96^2, with triple (85, 91, 96),
  91^2 = 19^2 - 19*99 + 99^2, with triple (19, 91, 99),
  91^2 = 80^2 - 80*99 + 99^2, with triple (80, 91, 99).
b = 1729 appears eight times because A121940(3) = 1729 and the triples of these 2^3 = 8 triangles are (96, 1729, 1775), (1679, 1729, 1775), (249, 1729, 1840), (1591, 1729, 1840), (656, 1729, 1961), (1305, 1729, 1961), (799, 1729, 1984), (1185, 1729, 1984).
		

Crossrefs

Cf. A335893 (triples), A335894 (smallest side), this sequence (middle side), A335896 (largest side), A335897 (perimeter).

Programs

  • Maple
    for b from 3 to 100 by 2 do
    for a from 1 to b-1 do
    c := (a+ sqrt(4*b^2-3*a^2))/2;
    if igcd(a, b) = 1 and issqr(4*b^2-3*a^2) then print(b); end if;
    end do;
    end do;
  • PARI
    lista(nn) = {forstep(b=1, nn, 2, for(a=1, b-1, if (gcd(a, b) == 1, my(d = 4*b^2 - 3*a^2); if (issquare(d), my(c = (a + sqrtint(d))/2); if (denominator(c)==1, print1(b, ", "));););););} \\ Michel Marcus, Jul 05 2020

Formula

a(n) = A335893(n, 2).
b is such that b^2 = a^2 - a*c + c^2 with gcd(a,b) = 1 and a < b.

A248909 Completely multiplicative with a(p) = p if p = 6k+1 and a(p) = 1 otherwise.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 13, 7, 1, 1, 1, 1, 19, 1, 7, 1, 1, 1, 1, 13, 1, 7, 1, 1, 31, 1, 1, 1, 7, 1, 37, 19, 13, 1, 1, 7, 43, 1, 1, 1, 1, 1, 49, 1, 1, 13, 1, 1, 1, 7, 19, 1, 1, 1, 61, 31, 7, 1, 13, 1, 67, 1, 1, 7, 1, 1, 73, 37, 1, 19, 7, 13, 79, 1, 1
Offset: 1

Views

Author

Tom Edgar, Mar 06 2015

Keywords

Comments

To compute a(n) replace primes not of the form 6k+1 in the prime factorization of n by 1.
The first place this sequence differs from A170824 is at n = 49.
For p prime, a(p) = p if p is a term in A002476 and a(p) = 1 if p = 2, p = 3 or p is a term in A007528.
a(n) is the largest term of A004611 that divides n. - Peter Munn, Mar 06 2021

Examples

			a(49) = 49 because 49 = 7^2 and 7 = 6*1 + 1.
a(15) = 1 because 15 = 3*5 and neither of these primes is of the form 6k+1.
a(62) = 31 because 62 = 31*2, 31 = 6*5 + 1, and 2 is not of the form 6k+1.
		

Crossrefs

Sequences used in a definition of this sequence: A002476, A004611, A007528, A020639, A028234, A032742.
Equivalent sequence for distinct prime factors: A170824.
Equivalent sequences for prime factors of other forms: A000265 (2k+1), A343430 (3k-1), A170818 (4k+1), A097706 (4k-1), A343431 (6k-1), A065330 (6k+/-1), A065331 (<= 3).

Programs

  • Maple
    A248909 := proc(n)
        local a,pf;
        a := 1 ;
        for pf in ifactors(n)[2] do
            if modp(op(1,pf),6) = 1 then
                a := a*op(1,pf)^op(2,pf) ;
            end if;
        end do:
        a ;
    end proc: # R. J. Mathar, Mar 14 2015
  • Mathematica
    f[p_, e_] := If[Mod[p, 6] == 1, p^e, 1]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 19 2020 *)
  • PARI
    a(n) = {my(f = factor(n)); for (i=1, #f~, if ((f[i,1] - 1) % 6, f[i, 1] = 1);); factorback(f);} \\ Michel Marcus, Mar 11 2015
    
  • Python
    from sympy import factorint
    def A248909(n):
        y = 1
        for p,e in factorint(n).items():
            y *= (1 if (p-1) % 6 else p)**e
        return y # Chai Wah Wu, Mar 15 2015
    
  • Sage
    n=100; sixnplus1Primes=[x for x in primes_first_n(100) if (x-1)%6==0]
    [prod([(x^(x in sixnplus1Primes))^y for x,y in factor(n)]) for n in [1..n]]
    
  • Scheme
    (define (A248909 n) (if (= 1 n) n (* (if (= 1 (modulo (A020639 n) 6)) (A020639 n) 1) (A248909 (A032742 n))))) ;; Antti Karttunen, Jul 09 2017

Formula

a(1) = 1; for n > 1, if A020639(n) = 1 (mod 6), a(n) = A020639(n) * a(A032742(n)), otherwise a(n) = a(A028234(n)). - Antti Karttunen, Jul 09 2017
a(n) = a(A065330(n)). - Peter Munn, Mar 06 2021
Showing 1-10 of 31 results. Next