cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-5 of 5 results.

A084865 Primes of the form 2x^2 + 3y^2.

Original entry on oeis.org

2, 3, 5, 11, 29, 53, 59, 83, 101, 107, 131, 149, 173, 179, 197, 227, 251, 269, 293, 317, 347, 389, 419, 443, 461, 467, 491, 509, 557, 563, 587, 653, 659, 677, 683, 701, 773, 797, 821, 827, 941, 947, 971, 1013, 1019, 1061, 1091, 1109, 1163, 1181, 1187
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 10 2003

Keywords

Comments

Subsequence of A084864; A084863(a(n))>0.
Conjecture: A084863(a(n))=1?
Is it true that a(n) = A019338(n+1)?
Comment: The truth of the conjecture A084863(a(n))=1 follows from the genus theory of quadratic forms (see Cox, page 61). By comparing enough terms, we see that the conjecture a(n) = A019338(n+1) is false. - T. D. Noe, May 02 2008
Appears to be the primes p such that (p mod 6)*(Fibonacci(p) mod 6)=25. - Gary Detlefs, May 26 2014

Examples

			A000040(17) = 59 = 32 + 27 = 2*4^2 + 3*3^2, therefore 59 is a term.
		

References

  • David A. Cox, Primes of the Form x^2 + n y^2, Wiley, 1989.

Crossrefs

Programs

  • Mathematica
    QuadPrimes2[2, 0, 3, 10000] (* see A106856 *)
  • PARI
    list(lim)=my(v=List(),w,t); for(x=0, sqrtint(lim\2), w=2*x^2; for(y=0, sqrtint((lim-w)\3), if(isprime(t=w+3*y^2), listput(v,t)))); Set(v) \\ Charles R Greathouse IV, Feb 09 2017

Formula

The primes are congruent to {2, 3, 5, 11} (mod 24). - T. D. Noe, May 02 2008

A046113 Coefficients in expansion of theta_3(q) * theta_3(q^6) in powers of q.

Original entry on oeis.org

1, 2, 0, 0, 2, 0, 2, 4, 0, 2, 4, 0, 0, 0, 0, 4, 2, 0, 0, 0, 0, 0, 4, 0, 2, 6, 0, 0, 4, 0, 0, 4, 0, 4, 0, 0, 2, 0, 0, 0, 4, 0, 4, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 2, 8, 0, 0, 4, 0, 4, 0, 0, 4, 2, 0, 0, 0, 0, 0, 8, 0, 0, 4, 0, 0, 0, 0, 0, 4, 0, 2, 0, 0, 0, 0, 0, 4, 4, 0, 4, 0, 0
Offset: 0

Views

Author

N. J. A. Sloane, May 18 2002

Keywords

Comments

Number of representations of n as a sum of six times a square and a square. - Ralf Stephan, May 14 2007
a(n) < 2 if and only if n is in A002480. a(n) > 0 if and only if n is in A002481. - Michael Somos, Mar 01 2011

Examples

			G.f. = 1 + 2*x + 2*x^4 + 2*x^6 + 4*x^7 + 2*x^9 + 4*x^10 + 4*x^15 + 2*x^16 + ...
		

References

  • J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p 102 eq 9.

Crossrefs

Programs

  • Mathematica
    a[ n_] := SeriesCoefficient[ EllipticTheta[ 3, 0, q] EllipticTheta[ 3, 0, q^6], {q, 0, n}]; (* Michael Somos, Apr 19 2015 *)
  • PARI
    {a(n) = my(G); if( n<0, 0, G = [ 1, 0; 0, 6]; polcoeff( 1 + 2 * x * Ser( qfrep( G, n)), n))}; /* Michael Somos, Mar 01 2011 */

Formula

G.f.: Sum_{ i, j = -oo..+oo } q^(i^2 + 6*j^2).
a(n) = A000377(n) + A115660(n). - Michael Somos, Mar 01 2011
a(0) = 1, a(n) = (1+(-1)^t)*b(n) for n > 0, where t is the number of prime factors of n, counting multiplicity, which are == 2,3,5,11 (mod 24), and b() is multiplicative with b(p^e) = (e+1) for primes p == 1,5,7,11 (mod 24) and b(p^e) = (1+(-1)^e)/2 for primes p == 13,17,19,23 (mod 24). (This formula is Corollary 4.2 in the Berkovich-Yesilyurt paper). - Jeremy Lovejoy, Nov 14 2024

A108563 Number of representations of n as sum of twice a square plus thrice a square.

Original entry on oeis.org

1, 0, 2, 2, 0, 4, 0, 0, 2, 0, 0, 4, 2, 0, 4, 0, 0, 0, 2, 0, 4, 4, 0, 0, 0, 0, 0, 2, 0, 4, 4, 0, 2, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 0, 2, 0, 6, 0, 0, 4, 0, 0, 4, 0, 0, 4, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 2, 0, 0, 6, 0, 8, 0, 0, 4, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 6, 4, 0, 4
Offset: 0

Views

Author

Ralf Stephan, May 13 2007

Keywords

Comments

Number of solutions to n = 2*a^2 + 3*b^2 in integers.
Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
a(n) > 0 if and only if n is in A002480. a(n) < 2 if n is in A002481. - Michael Somos, Mar 01 2011

Examples

			G.f. = 1 + 2*x^2 + 2*x^3 + 4*x^5 + 2*x^8 + 4*x^11 + 2*x^12 + 4*x^14 + 2*x^18 + ...
a(0) = 1 since 0 = 2*0^2 + 3*0^2, a(5) = 4 since 5 = 2*1^2 + 3*1^2 = 2*(-1)^2 + 3*1^2 = 2*1^2 + 3*(-1)^2 = 2*(-1^2) + 3*(-1)^2.
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := SeriesCoefficient[ EllipticTheta[ 3, 0, q^2] EllipticTheta[ 3, 0, q^3], {q, 0, n}]; (* Michael Somos, Apr 19 2015 *)
    a[n_] := Module[{a, b, r}, r = Reduce[n == 2a^2 + 3b^2, {a, b}, Integers]; Which[r === False, 0, r[[0]] === And, 1, r[[0]] === Or, Length[r]]];
    Table[a[n], {n, 0, 105}] (* Jean-François Alcover, Jan 09 2019 *)
  • PARI
    for(n=0,120,print1(if(n<1,n==0,qfrep([2,0;0,3],n)[n]*2),","))
    
  • PARI
    {a(n) = my(G); if( n<0, 0, G = [2, 0; 0, 3]; polcoeff( 1 + 2 * x * Ser( qfrep( G, n)), n))}; /* Michael Somos, Mar 01 2011 */
    
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x^4 + A)^5 * eta(x^6 + A)^5 / (eta(x^2 + A)^2 * eta(x^3 + A)^2 * eta(x^8 + A)^2 * eta(x^12 + A)^2), n))}; /* Michael Somos, Jan 20 2017 */
    
  • Sage
    Q = DiagonalQuadraticForm(ZZ,[3, 2])
    Q.representation_number_list(102) # Peter Luschny, Jun 20 2014

Formula

G.f.: 1 + Sum_{k>0} x^k * (1 + x^(4*k)) * (1 + x^(6*k)) / (1 + x^(12*k)) - Sum_{k>0} Kronecker( k, 3) * x^k * (1 - x^(2*k)) / (1 + x^(4*k)).
G.f.: Sum_{i, j in Z} x^(2*i^2 + 3*j^2). - Michael Somos, Mar 01 2011
Expansion of phi(q^2) * phi(q^3) in powers of q where phi() is a Ramanujan theta function. - Michael Somos, Mar 01 2011
A115660(n) = A000377(n) - a(n). - Michael Somos, Mar 01 2011
Euler transform of period 24 sequence [0, 2, 2, -3, 0, -1, 0, -1, 2, 2, 0, -4, 0, 2, 2, -1, 0, -1, 0, -3, 2, 2, 0, -2, ...]. - Michael Somos, Jan 20 2017
Expansion of eta(q^4)^5 * eta(q^6)^5 / (eta(q^2)^2 * eta(q^3)^2 * eta(q^8)^2 * eta(q^12)^2) in powers of q. - Michael Somos, Jan 20 2017
a(0) = 1, a(n) = (1-(-1)^t)*b(n) for n > 0, where t is the number of prime factors of n, counting multiplicity, which are == 2,3,5,11 (mod 24), and b() is multiplicative with b(p^e) = (e+1) for primes p == 1,5,7,11 (mod 24) and b(p^e) = (1+(-1)^e)/2 for primes p == 13,17,19,23 (mod 24). (This formula is Corollary 4.2 in the Berkovich-Yesilyurt paper). - Jeremy Lovejoy, Nov 14 2024

Extensions

Edited by Charles R Greathouse IV, Oct 28 2009
Edited by N. J. A. Sloane, Mar 04 2011

A000075 Number of positive integers <= 2^n of form 2 x^2 + 3 y^2.

Original entry on oeis.org

0, 1, 2, 4, 7, 14, 23, 42, 76, 139, 258, 482, 907, 1717, 3269, 6257, 12020, 23171, 44762, 86683, 168233, 327053, 636837, 1241723, 2424228, 4738426, 9271299, 18157441, 35591647, 69820626, 137068908, 269270450, 529312241, 1041093048, 2048825748, 4034059456
Offset: 0

Views

Author

Keywords

Examples

			a(3)=4 since 2^3=8 and 2=2*1^2, 3=3*1^2, 5=2*1^2+3*1^2, 8=2*2^2.
		

References

  • 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

Cf. A002480.

Programs

  • PARI
    a(n)=if(n<0,0,sum(k=1,2^n,0
    				
  • Python
    import math
    def A000075(n):
        return len(set([2*x**2+3*y**2 for x in range(1+int(math.floor(2**((n-1)/2)))) for y in range(1+int(math.floor(math.sqrt((2**n-2*x**2)/3)))) if 0 < 2*x**2+3*y**2 <= 2**n]))
    # Chai Wah Wu, Aug 20 2014

A370268 Intersection of A189715 and A370267.

Original entry on oeis.org

1, 4, 6, 7, 9, 10, 15, 16, 22, 24, 25, 28, 31, 33, 36, 40, 42, 49, 54, 55, 58, 60, 63, 64, 70, 73, 79, 81, 87, 88, 90, 96, 97, 100, 103, 105, 106, 112, 118, 121, 124, 127, 132, 135, 144, 145, 150, 151, 154, 159, 160, 166, 168, 169, 175, 177, 186, 193, 196, 198, 199, 202, 214, 216, 217, 220, 223, 225, 231, 232, 240, 241, 247
Offset: 1

Views

Author

Peter Munn, Feb 13 2024

Keywords

Comments

A189715 and A370267 are closely related in that they may be generated by the same process, but starting from numbers of the form 6m+1 and 8m+1 respectively - see A370267 for details.
Independent definition: numbers with an even number of prime factors not of the form 3m+1 and an even number of prime factors not of the form 8m+-1 (counting repetitions).
The sequence starts with the first 72 nonzero numbers of the form x^2 + 6y^2 (see A002481). After the absence of 0, this sequence next differs from A002481 by including 247, 391, 442, ... . From these early intermittent differences, the densities of the two sequences diverge progressively, driven by the absence from A002481 of many of the squarefree composite numbers that are present here though their prime factors are not. (Both sequences are closed under multiplication.) Asymptotic densities are 1/4 and 0 respectively.
Likewise, if we list the even terms halved, we find a similar relationship to the nonzero terms of A002480. The first 66 terms match, then we find we have generated intermittent extra terms: 221, 299, 323, ... .
Numbers whose squarefree part is congruent to {1,7} mod 24, {10,22} mod 48, {15,33} mod 72, or {6,42} mod 144. (Each congruence describes a coset of A334832 under A059897(.,.) as described in A334832. This sequence corresponds to the subgroup of the quotient group generated by {6,7,10}.)

Crossrefs

Intersection of A189715 and A370267.
A002481\{0}, A334832 are subsequences.

Programs

  • PARI
    isok(k) = {c = core(k); c%24 == 1 || c%24 == 7 || c%48 == 10 || c%48 == 22 || c%72 == 15 || c%72 == 33 || c%144 == 6 || c%144 == 42}

Formula

{a(n) : n >= 1} = {A059897(i,j*k) : i in A334832, j in {1,7}, k in {1,6,10,15}}.
Showing 1-5 of 5 results.