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

A155566 Intersection of A001481 and A002481: N = a^2 + b^2 = c^2 + 6d^2 for some integers a,b,c,d.

Original entry on oeis.org

0, 1, 4, 9, 10, 16, 25, 36, 40, 49, 58, 64, 73, 81, 90, 97, 100, 106, 121, 144, 145, 160, 169, 193, 196, 202, 225, 232, 241, 250, 256, 265, 289, 292, 298, 313, 324, 337, 346, 360, 361, 388, 394, 400, 409, 424, 433, 441, 457, 484, 490, 505, 522, 529, 538, 576
Offset: 1

Views

Author

M. F. Hasler, Jan 25 2009

Keywords

Comments

Contains A155576 as a subsequence (obtained by restricting a,b,c,d to be nonzero). Also contains A000290 (squares) as subsequence.

Crossrefs

Programs

  • PARI
    isA155566(n,/* use optional 2nd arg to get other analogous sequences */c=[6,1]) = { for(i=1,#c, for(b=0,sqrtint(n\c[i]), issquare(n-c[i]*b^2) & next(2)); return);1}
    for( n=1,600, isA155566(n) & print1(n","))

A155569 Intersection of A002479 inter A002481: N = a^2 + 2b^2 = c^2 + 6d^2 for some integers a,b,c,d.

Original entry on oeis.org

0, 1, 4, 6, 9, 16, 22, 24, 25, 33, 36, 49, 54, 64, 73, 81, 88, 96, 97, 100, 118, 121, 132, 144, 150, 166, 169, 177, 193, 196, 198, 214, 216, 225, 241, 249, 256, 262, 289, 292, 294, 297, 313, 321, 324, 337, 352, 358, 361, 384, 388, 393, 400, 409, 433, 438, 441
Offset: 1

Views

Author

M. F. Hasler, Jan 25 2009

Keywords

Comments

Contains A155709 as a subsequence (obtained by restricting a,b,c,d to be nonzero). Also contains A000290 (squares) as subsequence.

Crossrefs

Programs

  • PARI
    isA155569(n,/* use optional 2nd arg to get other analogous sequences */c=[6,2]) = { for(i=1,#c, for(b=0,sqrtint(n\c[i]), issquare(n-c[i]*b^2) & next(2)); return);1}
    for( n=0,500, isA155569(n) & print1(n","))

A155716 Numbers of the form N = a^2 + 6b^2 for some positive integers a,b.

Original entry on oeis.org

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

Views

Author

M. F. Hasler, Jan 25 2009

Keywords

Comments

Subsequence of A002481 (which allows for a and b to be zero).
Primes are in A033199. - Bernard Schott, Sep 20 2019

Crossrefs

Programs

  • Mathematica
    With[{upto=240},Select[Union[#[[1]]^2+6#[[2]]^2&/@Tuples[ Range[Sqrt[ upto]], 2]],#<=upto&]] (* Harvey P. Dale, Aug 05 2016 *)
  • PARI
    isA155716(n,/* optional 2nd arg allows us to get other sequences */c=6) = { for(b=1,sqrtint((n-1)\c), issquare(n-c*b^2) & return(1))}
    for( n=1,999, isA155716(n) & print1(n","))
    
  • PARI
    upto(n) = my(res=List()); for(i=1,sqrtint(n),for(j=1, sqrtint((n - i^2) \ 6), listput(res, i^2 + 6*j^2))); listsort(res,1); res \\ David A. Corneth, Sep 18 2019

A033199 Primes of form x^2+6*y^2.

Original entry on oeis.org

7, 31, 73, 79, 97, 103, 127, 151, 193, 199, 223, 241, 271, 313, 337, 367, 409, 433, 439, 457, 463, 487, 577, 601, 607, 631, 673, 727, 751, 769, 823, 919, 937, 967, 991, 1009, 1033, 1039, 1063, 1087, 1129, 1153, 1201, 1231, 1249, 1279, 1297, 1303, 1321, 1327, 1399, 1423, 1447, 1471, 1489, 1543
Offset: 1

Views

Author

Keywords

Comments

Appears to also be the primes p such that p mod 6 = 1 and Fibonacci(p) mod 6 = 1. - Gary Detlefs, May 26 2014

Crossrefs

Cf. A139643, primes in A002481. Cf. A107006, A107008.

Programs

  • Magma
    [p: p in PrimesUpTo(1600) | NormEquation(6,p) eq true]; // Bruno Berselli, Jul 03 2016
  • Mathematica
    f[x_, y_] := x^2 + 6*y^2; lst = {}; Do[p = f[x, y]; If[ PrimeQ[ p], AppendTo[ lst, p]], {y, 20}, {x, 50}]; Take[ Union[ lst], 50] (* Vladimir Joseph Stephan Orlovsky, Aug 04 2009 *)
  • PARI
    select(n->n%24==1||n%24==7, primes(100)) \\ Charles R Greathouse IV, Nov 09 2012
    

Formula

Same as primes congruent to 1 or 7 mod 24. See e.g. Cox, p. 36.
a(n) ~ 4n log n. - Charles R Greathouse IV, Nov 09 2012

Extensions

Removed defective Mma program; extended the b-file using Charles R Greathouse's PARI program. - N. J. A. Sloane, Jun 06 2014

A002480 Numbers of the form 2x^2 + 3y^2.

Original entry on oeis.org

0, 2, 3, 5, 8, 11, 12, 14, 18, 20, 21, 27, 29, 30, 32, 35, 44, 45, 48, 50, 53, 56, 59, 62, 66, 72, 75, 77, 80, 83, 84, 93, 98, 99, 101, 107, 108, 110, 116, 120, 125, 126, 128, 131, 140, 146, 147, 149, 155, 158, 162
Offset: 1

Views

Author

Keywords

References

  • L. Euler, (E388) Vollstaendige Anleitung zur Algebra, Zweiter Theil, reprinted in: Opera Omnia. Teubner, Leipzig, 1911, Series (1), Vol. 1, p. 425.
  • 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

For primes see A084865.
Cf. A000075 (growth), A002481, A108563.

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

A370267 Numbers with an even number of prime factors not of the form 8m+-1 (counting repetitions).

Original entry on oeis.org

1, 4, 6, 7, 9, 10, 15, 16, 17, 22, 23, 24, 25, 26, 28, 31, 33, 36, 38, 39, 40, 41, 42, 47, 49, 54, 55, 57, 58, 60, 63, 64, 65, 68, 70, 71, 73, 74, 79, 81, 86, 87, 88, 89, 90, 92, 95, 96, 97, 100, 102, 103, 104, 105, 106, 111, 112, 113, 118, 119, 121, 122, 124, 127, 129
Offset: 1

Views

Author

Peter Munn, Feb 13 2024

Keywords

Comments

Construction by subgroup generation: (Start)
The set of numbers congruent to 1 modulo 8 (A017077) contains all the odd squares and generates a subgroup of the positive rational numbers (under multiplication) that contains no additional integers. The subgroup has an infinite number of cosets. The rest of the construction process extends the subgroup, reducing the number of cosets to 2, by choosing additional generators that are semiprime.
First we extend the subgroup to include all nonzero integer squares. As we already have the odd squares, we need only add 4, the square of the smallest prime, as a generator. The extended subgroup has only 8 cosets and its integer members are listed in A234000. To achieve a subgroup with 2 cosets we now add squarefree semiprime generators. The 2 smallest, 6 and 10, suffice.
The resulting subgroup has this sequence's terms as its integer members.
(End)
The equivalent process starting with numbers congruent to 1 modulo 3 (or 1 modulo 6) produces A189715. If we take its intersection with this sequence we get A370268, which starts with the first 72 nonzero numbers of the form x^2 + 6y^2 (see A002481). Similarly, if we start with numbers congruent to 1 modulo 5 (or 1 modulo 10) and take the resulting set's intersection with this sequence we get a set starting with the first 32 nonzero numbers of the form x^2 - 10y^2 (see A242664).
The construction process leads to a number of properties:
- The sequence is closed under multiplication and all integer ratios between terms are in the sequence.
- The sequence and its complement have the property that the terms of one can be generated by halving the even terms of the other. Each has asymptotic density 1/2.
Numbers whose squarefree part is congruent to {1,7} mod 8 or {6,10} mod 16.

Examples

			7 is prime, so 7 is its only prime factor, which has the form 8m-1. So 7 has an even number (zero) of prime factors not of the form 8m+-1, and therefore is in the sequence. In terms of the subgroup generators described at the start of the comments, (13*8+1) * 4 / (6*10) = 105 * 4/60 = 7.
110 = 2 * 5 * 11, so it has 3 prime factors and all 3 do not have the form 8m+-1. 3 is odd, so 110 is not in the sequence.
		

Crossrefs

Disjoint union of A004215, A055042, A055043 and A234000.
See the comments for the relationships with A002481, A017077, A189715, A242664, A370268.
Cf. A042999 (primes), A059897.

Programs

  • PARI
    isok(k) = {c = core(k); c%8 == 1 || c%8 == 7 || c%16 == 6 || c%16 == 10}
    
  • Python
    def A370267(n):
        def f(x): return n+x-sum(((y:=x>>(i<<1))-7>>3)+(y-1>>3)+2 for i in range((x.bit_length()>>1)+1))-sum(((z:=x>>(i<<1)+1)-5>>3)+(z-3>>3)+2 for i in range(x.bit_length()-1>>1))
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m # Chai Wah Wu, Mar 19 2025

Formula

{a(n) : n >= 1} = {A059897(i,j) : i in A234000, j in {1, 6, 10, 15}}.

A155564 Intersection of A002479 and A003136: N = a^2 + 2b^2 = c^2 + 3d^2 for some integers a,b,c,d.

Original entry on oeis.org

0, 1, 3, 4, 9, 12, 16, 19, 25, 27, 36, 43, 48, 49, 57, 64, 67, 73, 75, 76, 81, 97, 100, 108, 121, 129, 139, 144, 147, 163, 169, 171, 172, 192, 193, 196, 201, 211, 219, 225, 228, 241, 243, 256, 268, 283, 289, 291, 292, 300, 304, 307, 313, 324, 331, 337, 361, 363
Offset: 1

Views

Author

M. F. Hasler, Jan 25 2009

Keywords

Comments

Contains A155574 as a subsequence (obtained by restricting a,b,c,d to be nonzero). Also contains A000290 (squares) as subsequence.

Crossrefs

Programs

  • PARI
    isA155564(n,/* use optional 2nd arg to get other analogous sequences */c=[3,2]) = { for(i=1,#c, for(b=0,sqrtint(n\c[i]), issquare(n-c[i]*b^2) & next(2)); return);1}
    for( n=1,500, isA155564(n) & print1(n","))

A155565 Intersection of A001481 and A020669: N = a^2 + b^2 = c^2 + 5d^2 for some integers a,b,c,d.

Original entry on oeis.org

0, 1, 4, 5, 9, 16, 20, 25, 29, 36, 41, 45, 49, 61, 64, 80, 81, 89, 100, 101, 109, 116, 121, 125, 144, 145, 149, 164, 169, 180, 181, 196, 205, 225, 229, 241, 244, 245, 256, 261, 269, 281, 289, 305, 320, 324, 349, 356, 361, 369, 389, 400, 401, 404, 405, 409, 421
Offset: 1

Views

Author

M. F. Hasler, Jan 25 2009

Keywords

Comments

Contains A155575 as a subsequence (obtained by restricting a,b,c,d to be nonzero). Also contains A000290 (squares) as subsequence.

Crossrefs

Programs

  • PARI
    isA155565(n,/* use optional 2nd arg to get other analogous sequences */c=[5,1]) = { for(i=1,#c, for(b=0,sqrtint(n\c[i]), issquare(n-c[i]*b^2) & next(2)); return);1}
    for( n=1,500, isA155565(n) & print1(n","))
Showing 1-10 of 17 results. Next