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.

User: V. Raman

V. Raman's wiki page.

V. Raman has authored 353 sequences. Here are the ten most recent ones:

A234288 Number of letters and blanks in Super Scrabble (English version).

Original entry on oeis.org

16, 4, 6, 8, 24, 4, 5, 5, 13, 2, 2, 7, 6, 13, 15, 4, 2, 13, 10, 15, 7, 3, 4, 2, 4, 2, 4
Offset: 1

Author

V. Raman, Jan 06 2014

Keywords

Comments

When compared to original Scrabble version, Super Scrabble is played with 200 tiles (4 of which are blanks), which is double original Scrabble version's distribution, and 21 X 21 square board, as compared to 15 X 15 square board in the original Scrabble version, with quadruple letter scoring and quadruple word scoring places available. Super scrabble has same face value of letter tiles as in original Scrabble (see A080993), and blanks are worth zero points each.

Crossrefs

A234287 Number of distinct quadratic forms of discriminant -4n by which some prime can be represented.

Original entry on oeis.org

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

Author

V. Raman, Dec 22 2013

Keywords

Comments

This is similar to A232551, except that this includes non-primitive quadratic forms like 2x^2+2xy+4y^2 and 2x^2+4y^2 because the prime 2 can be represented by both of them. But unlike A067752, we do not include quadratic forms like 4x^2+2xy+4y^2 and 4x^2+4xy+4y^2 by which no prime can be represented.
So, when n == 3 (mod 4), this includes the additional non-primitive quadratic form 2x^2+2xy+((n+1)/2)y^2 and when p^2 divides n, where p is prime, this includes the additional non-primitive quadratic form px^2+(n/p)y^2.
If p is a prime and if p^2 does not divide n, then there exist a unique non-primitive quadratic form of discriminant = -4n by which p can be represented if and only if -n is a quadratic residue (mod p) and there exists a multiple of p which can be written in the form x^2+ny^2 in which p appears raised to an odd power, except when p = 2 and n == 3 (mod 8).

Crossrefs

A234002 4n/A234001(n).

Original entry on oeis.org

1, 1, 4, 4, 1, 1, 2, 4, 3, 1, 4, 4, 1, 1, 2, 8, 1, 3, 4, 4, 1, 1, 2, 4, 5, 1, 36, 4, 1, 1, 2, 16, 1, 1, 4, 12, 1, 1, 2, 4, 1, 1, 4, 4, 3, 1, 2, 8, 7, 5, 4, 4, 1, 9, 2, 4, 1, 1, 4, 4, 1, 1, 6, 32, 1, 1, 4, 4, 1, 1, 2, 12, 1, 1, 20, 4, 1, 1, 2, 8, 27, 1, 4, 4, 1, 1, 2, 4, 1, 3, 4, 4, 1, 1, 2
Offset: 1

Author

V. Raman, Dec 18 2013

Keywords

Comments

Please look into A234001 for a more detailed description.
If n is squarefree and n == 1 (mod 4) or n == 2 (mod 4), then a(n) = 1.
If p^2 divides n for some prime p, a(n) is a multiple of p.
If n == 3 (mod 8), then a(n) is a multiple of 4 because numbers of the form x^2+n*y^2 cannot have any prime factors that are congruent to 2+n (mod 2n) raised to an odd power.
If n == 7 (mod 8), then a(n) is a multiple of 2 because numbers of the form x^2+n*y^2 can have prime factors that are congruent to 2+n (mod 2n) raised to an odd power, but they cannot be congruent to 2 (mod 4). So, we need to characterize the prime factor of 2 from the remaining prime factors that are congruent to 2+n (mod 2n) separately.

Crossrefs

A234001 Lowest common modulus to which the set of residue classes (mod 4n) that all the primes represented by a certain quadratic form of discriminant = -4n belong to, can be simplified to, for all quadratic forms of discriminant = -4n.

Original entry on oeis.org

4, 8, 3, 4, 20, 24, 14, 8, 12, 40, 11, 12, 52, 56, 30, 8, 68, 24, 19, 20, 84, 88, 46, 24, 20, 104, 3, 28, 116, 120, 62, 8, 132, 136, 35, 12, 148, 152, 78, 40, 164, 168, 43, 44, 60, 184, 94, 24, 28, 40, 51, 52, 212, 24, 110, 56, 228, 232, 59, 60, 244, 248, 42, 8, 260, 264, 67, 68, 276, 280
Offset: 1

Author

V. Raman, Dec 18 2013

Keywords

Comments

If n is a convenient number (A000926), the set of residue classes (mod 4n) that a prime p represented by x^2+n*y^2 belong to are those for which p is a quadratic residue (mod 4n) or p-n is a quadratic residue (mod 4n), assuming that p^2 does not divide n. For non-convenient numbers n, some of the primes in these set of residue classes (mod 4n) can be represented by x^2+n*y^2, but not all.
A prime p such that p^2 does not divide n, can be represented by some primitive quadratic form of discriminant = -4n, if and only if -n is a quadratic residue (mod p).
A prime p can be represented by some quadratic form of discriminant = -4n if and only if there is a multiple of p that can be written in the x^2+n*y^2 form, in which prime factor of p appears raised to an odd power or if p = 2 and n == 3 (mod 4).
a(n) is always a divisor of 4n.
If n is squarefree and n == 1 (mod 4) or n == 2 (mod 4), then a(n) = 4n.
If p^2 divides n for some prime p, a(n) is a divisor of (4n)/p.
If n == 3 (mod 8), then a(n) is a divisor of n because numbers of the form x^2+n*y^2 cannot have any prime factors that are congruent to 2+n (mod 2n) raised to an odd power.
If n == 7 (mod 8), then a(n) is a divisor of 2n because numbers of the form x^2+n*y^2 can have prime factors that are congruent to 2+n (mod 2n) raised to an odd power, but they cannot be congruent to 2 (mod 4). So, we need to characterize the prime factor of 2 from the remaining prime factors that are congruent to 2+n (mod 2n) separately.

Examples

			For n = 7, consider the set of all residue classes to which a prime represented by the quadratic form x^2+7*y^2 belong to, {1, 9, 11, 15, 23, 25} mod 28. This can be simplified to {1, 9, 11} mod 14 and this is the lowest modulo this set of residue classes can be simplified to. So, a(7) = 14. x^2+7*y^2 is the only primitive quadratic form of discriminant = -28.
For n = 15, there are two quadratic forms of discriminant = -60, x^2+15*y^2 and 3*x^2+5*y^2. x^2+15*y^2 can be used to represent all primes in set of residue classes {1, 4} mod 15. 3*x^2+5*y^2 can be used to represent all primes in set of residue classes {3, 5, 17, 23} mod 30. The lowest common modulo is 30, because {1, 4} mod 15 can also be written as {1, 4, 16, 19} mod 30, and so a(15) = 30.
		

Crossrefs

A233999 Values of n such that numbers of the form x^2+n*y^2 for some integers x, y cannot have prime factor of 7 raised to an odd power.

Original entry on oeis.org

1, 2, 4, 8, 9, 11, 15, 16, 18, 22, 23, 25, 29, 30, 32, 36, 37, 39, 43, 44, 46, 49, 50, 51, 53, 57, 58, 60, 64, 65, 67, 71, 72, 74, 78, 79, 81, 85, 86, 88, 92, 93, 95, 98, 99, 100, 102, 106, 107, 109, 113, 114, 116, 120, 121, 123, 127, 128, 130, 134, 135, 137, 141, 142, 144, 148, 149
Offset: 1

Author

V. Raman, Dec 18 2013

Keywords

Comments

Equivalently, numbers of the form 49^n*(7m+1), 49^n*(7m+2), or 49^n*(7m+4). [Corrected by Charles R Greathouse IV, Jan 12 2017]
From Peter Munn, Feb 08 2024: (Start)
Numbers whose squarefree part is congruent to a (nonzero) quadratic residue modulo 7.
The integers in a subgroup of the positive rationals under multiplication. As such the sequence is closed under multiplication and - where the result is an integer - under division. The subgroup has index 4 and is generated by the primes congruent to a quadratic residue (1, 2 or 4) modulo 7, the square of 7, and 3 times the other primes; that is a generator corresponding to each prime: 2, 3*3, 3*5, 7^2, 11, 3*13, 3*17, 3*19, 23, 29, 3*31, ... .
(End)

Crossrefs

Numbers whose squarefree part is congruent to a coprime quadratic residue modulo k: A003159 (k=2), A055047 (k=3), A277549 (k=4), A352272 (k=6), A234000 (k=8), A334832 (k=24).
First differs from A047350 by including 49.

Programs

  • PARI
    is(n)=n/=49^valuation(n, 49); n%7==1||n%7==2||n%7==4 \\ Charles R Greathouse IV and V. Raman, Dec 19 2013
    
  • PARI
    is_A233999(n)=bittest(22,n/49^valuation(n, 49)%7) \\ - M. F. Hasler, Jan 02 2014
    
  • PARI
    list(lim)=my(v=List(),t,u); forstep(k=1,lim\=1,[1,2,4], listput(v,k)); for(e=1,logint(lim,49), u=49^e; for(i=1,#v, t=u*v[i]; if(t>lim, break); listput(v,t))); Set(v) \\ Charles R Greathouse IV, Jan 12 2017
    
  • Python
    from sympy import integer_log
    def A233999(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x):
            c = n+x
            for i in range(integer_log(x,49)[0]+1):
                m = x//49**i
                c -= (m-1)//7+(m-2)//7+(m-4)//7+3
            return c
        return bisection(f,n,n) # Chai Wah Wu, Feb 14 2025

Formula

a(n) = 16n/7 + O(log n). - Charles R Greathouse IV, Jan 12 2017

A233998 Values of n such that numbers of the form x^2+n*y^2 for some integers x, y cannot have prime factor of 5 raised to an odd power.

Original entry on oeis.org

2, 3, 7, 8, 12, 13, 17, 18, 22, 23, 27, 28, 32, 33, 37, 38, 42, 43, 47, 48, 50, 52, 53, 57, 58, 62, 63, 67, 68, 72, 73, 75, 77, 78, 82, 83, 87, 88, 92, 93, 97, 98, 102, 103, 107, 108, 112, 113, 117, 118, 122, 123, 127, 128, 132, 133, 137, 138, 142, 143, 147, 148, 152, 153, 157, 158
Offset: 1

Author

V. Raman, Dec 18 2013

Keywords

Comments

Equivalently, this sequence is the union of numbers of the form 25^n*(5*n+2) and numbers of the form 25^n*(5*n+3).

Crossrefs

Programs

  • PARI
    is(n)=n/=25^valuation(n, 25); n%5==2||n%5==3 \\ Charles R Greathouse IV and V. Raman, Dec 19 2013
    
  • Python
    from sympy import integer_log
    def A233998(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return n+x-sum(((m:=x//25**i)-2)//5+(m-3)//5+2 for i in range(integer_log(x,25)[0]+1))
        return bisection(f,n,n) # Chai Wah Wu, Mar 19 2025

Formula

a(n) = 2.4 n + O(log n). - Charles R Greathouse IV, Dec 19 2013

A234000 Numbers of the form 4^i*(8*j+1).

Original entry on oeis.org

1, 4, 9, 16, 17, 25, 33, 36, 41, 49, 57, 64, 65, 68, 73, 81, 89, 97, 100, 105, 113, 121, 129, 132, 137, 144, 145, 153, 161, 164, 169, 177, 185, 193, 196, 201, 209, 217, 225, 228, 233, 241, 249, 256, 257, 260, 265, 272, 273, 281, 289, 292, 297, 305, 313, 321, 324, 329, 337, 345
Offset: 1

Author

V. Raman, Dec 18 2013

Keywords

Comments

Squares modulo all powers of 2. - Robert Israel, Aug 26 2014
From Peter Munn, Dec 11 2019: (Start)
Closed under multiplication.
Contains all even powers of primes.
A subgroup of the positive integers under the binary operation A059897(.,.). For all n, a(n) has no Fermi-Dirac factor of 2 and if m_k denotes the number of Fermi-Dirac factors of a(n) that are congruent to k modulo 8, m_3, m_5 and m_7 have the same parity. It can further be shown (1) all numbers that meet these requirements are in the sequence and (2) this implies closure under A059897(.,.).
(End)

Crossrefs

Cf. A055046 (Numbers of the form 4^i*(8*j+3)).
Cf. A055045 (Numbers of the form 4^i*(8*j+5)).
Cf. A004215 (Numbers of the form 4^i*(8*j+7)).

Programs

  • Maple
    N:= 1000: # to get all terms <= N
    {seq(seq(4^i*(8*k+1), k = 0 .. floor((N * 4^(-i)-1)/8)),i=0..floor(log[4](N)))}; # Robert Israel, Aug 26 2014
  • PARI
    is_A234000(n)=(n/4^valuation(n, 4))%8==1 \\ Charles R Greathouse IV and V. Raman, Dec 19 2013; minor improvement by M. F. Hasler, Jan 02 2014
    
  • PARI
    list(lim)=my(v=List(),t); for(e=0,logint(lim\1,4), t=4^e; forstep(k=t, lim, 8*t, listput(v,k))); Set(v) \\ Charles R Greathouse IV, Jan 12 2017
    
  • Python
    from itertools import count, islice
    def A234000_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda n:not (m:=(~n&n-1).bit_length())&1 and (n>>m)&7==1,count(max(startvalue,1)))
    A234000_list = list(islice(A234000_gen(),30)) # Chai Wah Wu, Jul 09 2022
    
  • Python
    def A234000(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return n+x-sum(((x>>(i<<1))-1>>3)+1 for i in range((x.bit_length()>>1)+1))
        return bisection(f,n,n) # Chai Wah Wu, Feb 14 2025

Formula

a(n) = 6n + O(log n). - Charles R Greathouse IV, Dec 19 2013
a(n) = A055044(n)/2. - Chai Wah Wu, Mar 19 2025

A232551 Number of distinct primitive quadratic forms of discriminant -4n that exist such that every prime p for which -n is a quadratic residue mod p can be represented by one of them.

Original entry on oeis.org

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

Author

V. Raman, Nov 26 2013

Keywords

Comments

This is closely related to the class number problem.
A quadratic form is primitive if the GCD of the coefficients is 1. For example, the quadratic form 2*x^2+4*y^2 is not primitive.
Two quadratic forms f(x,y) = a*x^2+b*x*y+c*y^2 and g(x,y) = p*x^2+q*x*y+r*y^2 are distinct (or inequivalent) if and only if one cannot be obtained by a linear transformation (of the variables x, y) from the other. For example, the three quadratic forms u(x,y) = 3*x^2+2*x*y+3*y^2, v(x,y) = 3*x^2+4*x*y+4*y^2 and w(x,y) = 3*x^2+10*x*y+11*y^2 are equivalent because v(x,y) = u(x+y,-y) and w(x,y) = v(x+y,y). Also, w(x,y) = u(x+2*y,-y). Similarly, the two quadratic forms s(x,y) = 8*x^2+9*y^2 and t(x,y) = 17*x^2+50*x*y+41*y^2 are equivalent because t(x,y) = s(x+2*y,x+y).
The quadratic form x^2+n*y^2 is one such form and the only such form if n = 1, 2, 3, 4, 7.
a(n) = 1 if and only if n = 1, 2, 3, 4, 7.
If n is a squarefree convenient number (A000926), a(n) represents the class number of the ring Z[sqrt(n)] if n == 1 (mod 4) or if n == 2 (mod 4) and the class number of the ring Z[(1+sqrt(n))/2] if n == 3 (mod 4) and this class number is a power of 2.
Any prime p such that -n is a quadratic residue mod p can be represented by exactly one of the a(n) distinct primitive quadratic forms of discriminant = -4n in at most four different ways (if n >= 2) or in at most eight different ways (if n = 1).
If n is a prime congruent to 3 (mod 4), then a(n) = A232550(n).
If p is a prime, p^2 does not divide n, and p > 2 if n == 3 (mod 8), then there is a multiple of p in which p is raised to an odd power which can be written in the form x^2+n*y^2 if and only if -n is a quadratic residue mod p.
The product of two numbers (prime or composite, same or different) which can be represented by the same quadratic form of discriminant = -4n can be written in the form x^2+n*y^2, as the following identity shows:
(X*a^2+Y*a*b+Z*b^2)*(X*c^2+Y*c*d+Z*d^2) = (a*c*X+b*d*Z+a*d*(Y/2)+b*c*(Y/2))^2 + ((X*Z)-(Y^2/4))*(a*d-b*c)^2.
(X*a^2+Y*a*b+Z*b^2)*(X*c^2+Y*c*d+Z*d^2) = (a*c*X+b*d*((Y^2/(2*X))-Z)+a*d*(Y/2)+b*c*(Y/2))^2 + ((X*Z)-(Y^2/4))*(b*d*(Y/X)+a*d+b*c)^2.
Note that for the latter equation, (a*c*X+b*d*((Y^2/(2*X))-Z)+a*d*(Y/2)+b*c*(Y/2)) and (b*d*(Y/X)+a*d+b*c) need not always be integers. If they are both integers, then it will be a second representation of the product of (X*a^2+Y*a*b+Z*b^2) and (X*c^2+Y*c*d+Z*d^2) in the form x^2+((X*Z)-(Y^2/4))*y^2.
This sequence is the same as taking every fourth number in A107628. - T. D. Noe, Jan 02 2014

Examples

			If n = 1, 2, 3, 4 or 7, then the only such available quadratic form is x^2+n*y^2.
For n = 5, every prime that is congruent to {1, 2, 3, 5, 7, 9} mod 20 can be represented by either of the two distinct primitive quadratic forms of discriminant = -20: x^2+5*y^2 or 2*x^2+2*x*y+3*y^2.
For n = 6, every prime that is congruent to {1, 2, 3, 5, 7, 11} mod 24 can be represented by either of the two distinct primitive quadratic forms of discriminant = -24: x^2+6*y^2 or 2*x^2+3*y^2.
For n = 10, every prime that is congruent to {1, 2, 5, 7, 9, 11, 13, 19, 23, 37} mod 40 can be represented by either of the two distinct primitive quadratic forms of discriminant = -40: x^2+10*y^2 or 2*x^2+5*y^2.
		

Crossrefs

Cf. A000003, A000926, A232529, A232530, A232550 (Number of distinct primitive quadratic forms of discriminant = -4*n needed to generate all primes p for which p is a quadratic residue (mod 4*n) or p-n is a quadratic residue (mod 4*n)).

A232550 Number of distinct primitive quadratic forms of discriminant = -4n that exist such that every prime p for which p is a quadratic residue (mod 4n) or p-n is a quadratic residue (mod 4n) can be represented by one of them.

Original entry on oeis.org

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

Author

V. Raman, Nov 26 2013

Keywords

Comments

A quadratic form is primitive if the GCD of the coefficients is 1. For example, the quadratic form 2*x^2+4*y^2 is not primitive.
Two quadratic forms f(x,y) = a*x^2+b*x*y+c*y^2 and g(x,y) = p*x^2+q*x*y+r*y^2 are distinct (or inequivalent) if and only if one cannot be obtained by a linear transformation (of the variables x, y) from the other. For example, the three quadratic forms u(x,y) = 3*x^2+2*x*y+3*y^2, v(x,y) = 3*x^2+4*x*y+4*y^2 and w(x,y) = 3*x^2+10*x*y+11*y^2 are equivalent because v(x,y) = u(x+y,-y) and w(x,y) = v(x+y,y). Also, w(x,y) = u(x+2*y,-y). Similarly, the two quadratic forms s(x,y) = 8*x^2+9*y^2 and t(x,y) = 17*x^2+50*x*y+41*y^2 are equivalent because t(x,y) = s(x+2*y,x+y).
The quadratic form x^2+n*y^2 is one such form and the only such form if n is a convenient number (A000926).
a(n) = 1 if and only if n is a convenient number (A000926).
Any prime p such that p is a quadratic residue (mod 4n) or p-n is a quadratic residue (mod 4n) can be represented by exactly one of the a(n) distinct primitive quadratic forms of discriminant = -4n in at most four different ways (if n >= 2) or in at most eight different ways (if n = 1).
If a prime p can be written in the form x^2+n*y^2, then either p is a quadratic residue (mod 4n) or p-n is a quadratic residue (mod 4n), assuming that p^2 does not divide n.
For primes p such that p is a quadratic residue (mod 4n) or p-n is a quadratic residue (mod 4n), there is a lowest square m^2 such that m^2*p can be written in form x^2+n*y^2, where x and y are nonnegative integers (see A232529 and A232530).
If n is a prime congruent to 3 (mod 4), then a(n) = A232551(n).
The product of two numbers (prime or composite, same or different) which can be represented by the same quadratic form of discriminant = -4n can be written in the form x^2+n*y^2, as the following identity shows.
(X*a^2+Y*a*b+Z*b^2)*(X*c^2+Y*c*d+Z*d^2) = (a*c*X+b*d*Z+a*d*(Y/2)+b*c*(Y/2))^2 + ((X*Z)-(Y^2/4))*(a*d-b*c)^2.
(X*a^2+Y*a*b+Z*b^2)*(X*c^2+Y*c*d+Z*d^2) = (a*c*X+b*d*((Y^2/(2*X))-Z)+a*d*(Y/2)+b*c*(Y/2))^2 + ((X*Z)-(Y^2/4))*(b*d*(Y/X)+a*d+b*c)^2.
Note that for the latter equation, (a*c*X+b*d*((Y^2/(2*X))-Z)+a*d*(Y/2)+b*c*(Y/2)) and (b*d*(Y/X)+a*d+b*c) need not always be integers. If they are both integers, then it will be a second representation of the product of (X*a^2+Y*a*b+Z*b^2) and (X*c^2+Y*c*d+Z*d^2) in the form x^2+((X*Z)-(Y^2/4))*y^2.

Examples

			If n is a convenient number (A000926), then the only such available quadratic form is x^2+n*y^2.
For n = 11, every prime that is congruent to {0, 1, 3, 4, 5, 9} mod 11 can be represented by either of the two distinct primitive quadratic forms of discriminant = -44: x^2+11*y^2 or 3*x^2+2*x*y+4*y^2.
For n = 14, every prime that is congruent to {1, 2, 7, 9, 15, 23, 25, 39} mod 56 can be represented by either of the two distinct primitive quadratic forms of discriminant = -56: x^2+14*y^2 or 2*x^2+7*y^2.
For n = 17, every prime that is congruent to {1, 2, 9, 13, 17, 21, 25, 33, 49, 53} mod 68 can be represented by either of the two distinct primitive quadratic forms of discriminant = -68: x^2+17*y^2 or 2*x^2+2*x*y+9*y^2.
For n = 19, every prime that is congruent to {0, 1, 4, 5, 6, 7, 9, 11, 16, 17} mod 19 can be represented by either of the two distinct primitive quadratic forms of discriminant = -76: x^2+19*y^2 or 4*x^2+2*x*y+5*y^2.
For n = 20, every prime that is congruent to {1, 5, 9} mod 20 can be represented by either of the two distinct primitive quadratic forms of discriminant = -80: x^2+20*y^2 or 4*x^2+5*y^2.
		

Crossrefs

Cf. A000003, A000926, A232529, A232530, A232551 (Number of distinct primitive quadratic forms of discriminant = -4*n needed to generate all primes p for which -n is a quadratic residue (mod p)).

A232530 Least square m^2 such that for all primes p where p and p-n are quadratic residues (mod 4*n), (m^2)*p can be written as x^2+n*y^2.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 9, 1, 1, 9, 1, 4, 4, 1, 1, 9, 1, 1, 9, 4, 1, 9, 1, 16, 4, 1, 25, 4, 4, 1, 9, 16, 1, 81, 1, 4, 9, 1, 25, 64, 1, 25, 9, 4, 4, 9, 9, 16, 9, 1, 1, 36, 1, 25, 81, 9, 4, 9, 25, 4, 36, 25, 1, 144, 1, 49, 81, 4, 16, 9, 1, 64, 9, 9, 49, 36, 4, 1, 81, 16, 1, 225, 9, 4, 9, 1, 625, 64, 4, 49
Offset: 1

Author

V. Raman, Nov 25 2013

Keywords

Comments

If n is a convenient number (A000926) then a(n) = 1.
m^2 is also the smallest positive square that can be generated by using all the inequivalent primitive quadratic forms of discriminant = -4n.

Examples

			For n = 11, all primes p such that p such that p is a quadratic residue (mod 4*n) and p-n is a quadratic residue (mod 4*n) are either of the form x^2+11*y^2 or 3*x^2+2*x*y+4*y^2.
4*(x^2+11*y^2) = (2*x)^2+11*(2*y)^2, 4*(3*x^2+2*x*y+4*y^2) = (x+4*y)^2+11*x^2. Also, 4 is the smallest square to satisfy this condition. So, a(11) = 4.
For n = 14, all primes p such that p such that p is a quadratic residue (mod 4*n) and p-n is a quadratic residue (mod 4*n) are either of the form x^2+14*y^2 or 2*x^2+7*y^2.
9*(x^2+14*y^2) = (3*x)^2+14*(3*y)^2, 9*(2*x^2+7*y^2) = (2*x+7*y)^2+14*(x-y)^2 = (2*x-7*y)^2+14*(x+y)^2. Also, 9 is the smallest square to satisfy this condition. So, a(14) = 9.
For n = 17, all primes p such that p such that p is a quadratic residue (mod 4*n) and p-n is a quadratic residue (mod 4*n) are either of the form x^2+17*y^2 or 2*x^2+2*x*y+9*y^2.
9*(x^2+17*y^2) = (3*x)^2+17*(3*y)^2, 9*(2*x^2+2*x*y+9*y^2) = (x+9*y)^2+17*x^2. Also, 9 is the smallest square to satisfy this condition. So, a(17) = 9.
For n = 19, all primes p such that p such that p is a quadratic residue (mod 4*n) and p-n is a quadratic residue (mod 4*n) are either of the form x^2+19*y^2 or 4*x^2+2*x*y+5*y^2.
4*(x^2+19*y^2) = (2*x)^2+19*(2*y)^2, 4*(4*x^2+2*x*y+5*y^2) = (4*x+y)^2+19*y^2. Also, 4 is the smallest square to satisfy this condition. So, a(19) = 4.
For n = 20, all primes p such that p such that p is a quadratic residue (mod 4*n) and p-n is a quadratic residue (mod 4*n) are either of the form x^2+20*y^2 or 4*x^2+5*y^2.
4*(x^2+20*y^2) = (2*x)^2+20*(2*y)^2, 4*(4*x^2+5*y^2) = (4*x)^2+20*y^2. Also, 4 is the smallest square to satisfy this condition. So, a(20) = 4.
		

Crossrefs

Formula

a(n)=A232529(n)^2.