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

A000926 Euler's "numerus idoneus" (or "numeri idonei", or idoneal, or suitable, or convenient numbers).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 15, 16, 18, 21, 22, 24, 25, 28, 30, 33, 37, 40, 42, 45, 48, 57, 58, 60, 70, 72, 78, 85, 88, 93, 102, 105, 112, 120, 130, 133, 165, 168, 177, 190, 210, 232, 240, 253, 273, 280, 312, 330, 345, 357, 385, 408, 462, 520, 760, 840, 1320, 1365, 1848
Offset: 1

Views

Author

Keywords

Comments

There are many equivalent definitions of these numbers. Based on Cox, Theorem 3.22 and Proposition 3.24 and a comment by Eric Rains (rains(AT)caltech.edu), we can say that a positive number n belongs to this sequence if and only if any of the following equivalent statements is true:
(1) Let m > 1 be an odd number relatively prime to n which can be written in the form x^2 + n*y^2 with x, y relatively prime. If the equation m = x^2 + n*y^2 has only one solution with x, y >= 0, then m is a prime number. [Euler]
(2) Every genus of quadratic forms of discriminant -4n consists of a single class. [Gauss]
(3) If a*x^2 + b*x*y + c*y^2 is a reduced quadratic form of discriminant -4n, then either b=0, a=b or a = c. [Cox]
(4) Two quadratic forms of discriminant -4n are equivalent if and only if they are properly equivalent. [Cox]
(5) The class group C(-4n) is isomorphic to (Z/2Z)^m for some integer m. [Cox]
(6) n is not of the form ab+ac+bc with 0 < a < b < c. (See proof in link below.) [Rains]
It is conjectured that the list given here is complete. Chowla showed that the list is finite and Weinberger showed that there is at most one further term.
If an additional term exists it is > 100000000. - Jud McCranie, Jun 27 2005
The terms shown are the union of {1,2,3,4,7}, A033266, A033267, A033268 and A033269 (corresponding to class numbers 1, 2, 4, 8 and 16 respectively).
Note that for n in this sequence, n+1 is either a prime, twice a prime, the square of a prime, 8 or 16. - T. D. Noe, Apr 08 2004. [This is a general theorem that is not hard to prove using genus theory. The "32" in the original comment was an error. - Tom Hagedorn (hagedorn(AT)tcnj.edu), Dec 29 2008]
Also numbers n such that for all primes p such that p is a quadratic residue (mod 4*n) and p-n is a quadratic residue (mod 4*n), p can be uniquely written into the form as x^2+n*y^2. - V. Raman, Nov 25 2013

References

  • Albert H. Beiler, Recreations in the theory of numbers, New York, Dover, (2nd ed.) 1966. See Table 97 at p. 272.
  • Z. I. Borevich and I. R. Shafarevich, Number Theory. Academic Press, NY, 1966, pp. 425-430.
  • David A. Cox, "Primes of the Form x^2 + n y^2", Wiley, 1989, Section 3.
  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 1848, p. 146, Ellipses, Paris 2008.
  • C. F. Gauss, Disquisitiones Arithmeticae, 1801. English translation: Yale University Press, New Haven, CT, 1966, Sections 329-334.
  • G. B. Mathews, Theory of Numbers, Chelsea, no date, p. 263.
  • Paulo Ribenboim, My Numbers, My Friends, Chapter 11, Springer-Verlag, NY, 2000.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 142-143.
  • 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 103.
  • A. Weil, Number theory: an approach through history; from Hammurapi to Legendre, Birkhäuser, Boston, 1984; see pp. 188, 219-226.

Crossrefs

Sequence A025052 is a subsequence.
Cf. A139642 (congruences for idoneal quadratic forms).

Programs

  • Mathematica
    noSol={}; Do[lim=Ceiling[(n-2)/3]; found=False; Do[If[n>a*b && Mod[n-a*b, a+b]==0 && Quotient[n-a*b, a+b]>b, found=True; Break[]], {a, 1, lim-1}, {b, a+1, lim}]; If[ !found, AppendTo[noSol, n]], {n, 10000}]; noSol (* T. D. Noe, Apr 08 2004 *)
  • PARI
    A000926(Nmax=1e9)={for(n=1,Nmax,for(a=1,sqrtint(n\3),for(b=a+1,(n-a)\(3*a+2),n-a<(2*a+1+b)*b & break;(n-a*b)%(a+b)==0 & next(3)));print1(n", "))} \\ M. F. Hasler, Dec 04 2007
    
  • PARI
    ok(n)=!#select(k->k<>2, quadclassunit(-4*n).cyc) \\ Andrew Howroyd, Jun 08 2018

Extensions

Edited by N. J. A. Sloane, Dec 07 2007

A025052 Numbers not of form ab + bc + ca for 1<=a<=b<=c (probably the list is complete).

Original entry on oeis.org

1, 2, 4, 6, 10, 18, 22, 30, 42, 58, 70, 78, 102, 130, 190, 210, 330, 462
Offset: 1

Views

Author

Keywords

Comments

According to Borwein and Choi, if the Generalized Riemann Hypothesis is true, then this sequence has no larger terms, otherwise there may be one term greater than 10^11. - T. D. Noe, Apr 08 2004
Note that n+1 must be prime for all n in this sequence. - T. D. Noe, Apr 28 2004
Borwein and Choi prove (Theorem 6.2) that the equation N=xy+xz+yz has an integer solution x,y,z>0 if N contains a square factor and N is not 4 or 18. In the following simple proof explicit solutions are given. Let N=mn^2, m,n integer, m>0, n>1. If n3: x=6, y=n-3, z=n^2-4n+6. If n>m+1: if n=0 (mod m+1): x=m+1, y=m(m+1), z=m(n^2/(m+1)^2-1), if n=k (mod m+1), 0

Crossrefs

Subsequence of A000926 (numbers not of the form ab+ac+bc, 0A006093.
Cf. A093669 (numbers having a unique representation as ab+ac+bc, 0A093670 (numbers having a unique representation as ab+ac+bc, 0<=a<=b<=c).

Programs

  • Mathematica
    n=500; lim=Ceiling[(n-1)/2]; lst={}; Do[m=a*b+a*c+b*c; If[m<=n, lst=Union[lst, {m}]], {a, lim}, {b, lim}, {c, lim}]; Complement[Range[n], lst]

Extensions

Corrected by R. H. Hardin

A025060 Numbers of the form i*j + j*k + k*i, where 1 <= i < j < k.

Original entry on oeis.org

11, 14, 17, 19, 20, 23, 26, 27, 29, 31, 32, 34, 35, 36, 38, 39, 41, 43, 44, 46, 47, 49, 50, 51, 52, 53, 54, 55, 56, 59, 61, 62, 63, 64, 65, 66, 67, 68, 69, 71, 73, 74, 75, 76, 77, 79, 80, 81, 82, 83, 84, 86, 87, 89, 90, 91, 92, 94, 95, 96, 97, 98, 99, 100, 101, 103, 104, 106, 107, 108, 109
Offset: 1

Keywords

Comments

A025058 without duplicates.
Non-Idoneal Numbers. [Artur Jasinski, Oct 27 2008]
Conjecture: If i, j and k are allowed to be negative, but not zero, and are still distinct, then the sequence is all the integers. - Jon Perry, Apr 21 2013

Crossrefs

Cf. A000926 (complement), A025058, A093669.

Programs

  • Maple
    N:= 200: # to get all terms <= N
    sort(convert({seq(seq(seq(i*j + j*k + i*k, i=1..min(j-1, (N-j*k)/(j+k))),j=2..min(k-1,(N-k)/(1+k))),k=3..(N-2)/3)},list)); # Robert Israel, Sep 06 2016
  • Mathematica
    aa = {}; Do[Do[Do[k = a b + b c + c a; AppendTo[aa, a b + b c + c a], {a, 1, b - 1}], {b, 2, c - 1}], {c, 3, 10}]; Union[aa] (* Artur Jasinski, Oct 27 2008 *)
  • Python
    def aupto(N):
        aset = set()
        for i in range(1, N-1):
            for j in range(i+1, N//i + 1):
                p, s = i*j, i+j
                for k in range(j+1, (N-p)//s + 1):
                    aset.add(p + s*k)
        return sorted(aset)
    print(aupto(109)) # Michael S. Branicky, Nov 14 2021

A094376 Least number having exactly n representations as ab+ac+bc with 0 < a < b < c.

Original entry on oeis.org

1, 11, 23, 41, 47, 59, 71, 116, 119, 131, 164, 425, 191, 236, 239, 446, 335, 419, 311, 404, 431, 584, 647, 524, 479, 1019, 831, 776, 671, 944, 719, 1076, 839, 1004, 959, 1889, 1196, 2099, 1271, 1856, 1151, 1931, 1391, 1676, 1319, 1616, 1751, 3275, 1511
Offset: 0

Author

T. D. Noe and Robert G. Wilson v, Apr 28 2004

Keywords

Comments

Note that the Mathematica program computes A094376, A094377 and A094378, but outputs only this sequence.

Examples

			a(2) = 23 because 23 is the least number with 2 representations: (a,b,c) = (1,2,7) and (1,3,5).
		

References

Crossrefs

Cf. A000926 (n having no representations), A093669 (n having one representation), A025052, A094377, A094378.

Programs

  • Maple
    f:= proc(n) local a, t, s;
      t:= 0;
      for a from 1 to floor(sqrt(n/3)) do
        t:= t + nops(select(s -> s > 2*a and n+a^2 > s^2, numtheory:-divisors(n+a^2)))
      od;
      t
    end proc:
    N:= 200: # for a(0)..a(N)
    V:= Array(0..N): count:= 0:
    for n from 1 while count < N+1 do
       v:= f(n); if v <= N and V[v] = 0 then
          count:= count+1; V[v]:= n; fi
    od:
    seq(V[i],i=0..N); # Robert Israel, May 05 2021
  • Mathematica
    cntMax=10; nSol=Table[{0, 0, 0}, {cntMax+1}]; Do[lim=Ceiling[(n-2)/3]; cnt=0; Do[If[n>a*b && Mod[n-a*b, a+b]==0 && Quotient[n-a*b, a+b]>b, cnt++; If[cnt>cntMax, Break[]]], {a, 1, lim-1}, {b, a+1, lim}]; If[cnt<=cntMax, If[nSol[[cnt+1, 1]]==0, nSol[[cnt+1, 1]]=n]; nSol[[cnt+1, 2]]=n; nSol[[cnt+1, 3]]++;], {n, 10000}]; Table[nSol[[i, 1]], {i, cntMax+1}]

A094377 Greatest number having exactly n representations as ab+ac+bc with 0 < a < b < c.

Original entry on oeis.org

1848, 193, 1012, 862, 3040, 2062, 4048, 3217, 7392, 4162, 7837, 8002, 12397, 13297, 14722, 16417, 21253, 21058, 30493, 27358, 34357, 34318, 47338, 40177, 50317, 39502, 61462, 62302, 73117, 83218, 106177, 67138, 92698, 102958, 134773, 111577, 112942, 121522, 104938, 96958, 151237, 166798, 150382, 139393, 190513, 129838
Offset: 0

Author

T. D. Noe, Apr 28 2004

Keywords

Comments

Numbers up to 250,000 were checked. Note that the Mathematica program computes A094376, A094377 and A094378, but outputs only this sequence.

Examples

			a(1) = 193 because 193 is the largest number with a unique representation: (a,b,c) = (4,7,15).
		

References

Crossrefs

Cf. A000926 (n having no representations), A093669 (n having one representation), A094376, A094378.

Programs

  • Mathematica
    cntMax=10; nSol=Table[{0, 0, 0}, {cntMax+1}]; Do[lim=Ceiling[(n-2)/3]; cnt=0; Do[If[n>a*b && Mod[n-a*b, a+b]==0 && Quotient[n-a*b, a+b]>b, cnt++; If[cnt>cntMax, Break[]]], {a, 1, lim-1}, {b, a+1, lim}]; If[cnt<=cntMax, If[nSol[[cnt+1, 1]]==0, nSol[[cnt+1, 1]]=n]; nSol[[cnt+1, 2]]=n; nSol[[cnt+1, 3]]++;], {n, 10000}]; Table[nSol[[i, 2]], {i, cntMax+1}]

Extensions

More terms (using limit 10^6) from Joerg Arndt, Oct 01 2017

A094378 Number of numbers having exactly n representations as ab+ac+bc with 0 < a < b < c.

Original entry on oeis.org

65, 23, 91, 40, 197, 39, 195, 56, 298, 87, 217, 60, 512, 97, 327, 77, 562, 125, 433, 88, 712, 125, 484, 115, 924, 121
Offset: 0

Author

T. D. Noe, Apr 28 2004

Keywords

Comments

Numbers up to 250,000 were checked. Note that there seem to be many more numbers having an even number of representations. Note that the Mathematica program computes A094376, A094377 and A094378, but outputs only this sequence.

Examples

			a(1) = 23 because there are 23 numbers (A093669) with unique representations.
		

References

Crossrefs

Cf. A000926 (n having no representations), A093669 (n having one representation), A094376, A094377.

Programs

  • Mathematica
    cntMax=10; nSol=Table[{0, 0, 0}, {cntMax+1}]; Do[lim=Ceiling[(n-2)/3]; cnt=0; Do[If[n>a*b && Mod[n-a*b, a+b]==0 && Quotient[n-a*b, a+b]>b, cnt++; If[cnt>cntMax, Break[]]], {a, 1, lim-1}, {b, a+1, lim}]; If[cnt<=cntMax, If[nSol[[cnt+1, 1]]==0, nSol[[cnt+1, 1]]=n]; nSol[[cnt+1, 2]]=n; nSol[[cnt+1, 3]]++;], {n, 10000}]; Table[nSol[[i, 3]], {i, cntMax+1}]

A025058 Numbers of form i*j + j*k + k*i, where 1 <=i < j < k, including repetitions.

Original entry on oeis.org

11, 14, 17, 19, 20, 23, 23, 26, 26, 27, 29, 29, 31, 31, 32, 34, 35, 35, 36, 38, 38, 39, 39, 41, 41, 41, 43, 44, 44, 44, 46, 47, 47, 47, 47, 49, 50, 50, 51, 51, 52, 53, 53, 54, 54, 55, 55, 56, 56, 56, 59, 59, 59, 59, 59, 61, 61, 62, 62, 62, 63, 63, 64, 65, 65
Offset: 1

Keywords

Examples

			11 is in the sequence because 11 = 1*2 + 2*3 + 3*1.
23 appears twice because 23 = 1*3 + 3*5 + 5*1 = 1*2 + 2*7 + 7*1.
		

Crossrefs

Cf. A025060 (without repetitions), A093669.

Programs

  • Python
    def aupto(N):
        alst = []
        for i in range(1, N-1):
            for j in range(i+1, N//i + 1):
                p, s = i*j, i+j
                for k in range(j+1, (N-p)//s + 1):
                    alst.append(p + s*k)
        return sorted(alst)
    print(aupto(65)) # Michael S. Branicky, Nov 14 2021

A290870 a(n) is the number of ways to represent n as n = x*y + y*z + z*x where 0 < x < y < z.

Original entry on oeis.org

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

Author

Joerg Arndt, Aug 13 2017

Keywords

Comments

a(n) = 0 if and only if n is a term of A000926.
a(n) = 1 if and only if n is a term of A093669.

Examples

			For (x, y, z) = (1, 3, 5), we have x * y + y * z + z * x = 1 * 3 + 3 * 5 + 5 * 1 = 23 and similarily for (x, y, z) = (1, 2, 7), we have x * y + y * z + z * x = 23. Those 2 triples are all for n=23, so a(23) = 2. - _David A. Corneth_, Oct 01 2017
		

Crossrefs

Cf. A066955 (ways to represent n as n = x*y + y*z + z*x where 0 <= x <= y <= z).
Cf. A094377 (greatest number having exactly n representations).
Cf. A094376 (indices of records).

Programs

  • PARI
    N=10^3; V=vector(N);
    { for (x=1, N,
        for (y=x+1, N, t=x*y; if( t > N, break() );
          for (z=y+1, N,
            tt = t + y*z + z*x;  if( tt > N, break() );
            V[tt]+=1;
    ); ); ); }
    V \\ Joerg Arndt, Oct 01 2017
    
  • PARI
    a(n) = {my(res = 0);
    for(x = 1, sqrtint(n\3), for(y = x + 1, (n - x^2) \ (2 * x), z = (n - x*y) / (x + y); if(z > y && z == z\1, res++))); res} \\ David A. Corneth, Oct 01 2017

Formula

For the triples (x,y,z) we have x < sqrt(n / 3), y < (n - x^2) / (2 * x), z = (n - x*y) / (x + y) which must be integer. - David A. Corneth, Oct 01 2017
Showing 1-8 of 8 results.