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

A232532 Positive numbers not of the form x^2 - 3*y^2; complement of A084916.

Original entry on oeis.org

2, 3, 5, 7, 8, 10, 11, 12, 14, 15, 17, 18, 19, 20, 21, 23, 26, 27, 28, 29, 30, 31, 32, 34, 35, 38, 39, 40, 41, 42, 43, 44, 45, 47, 48, 50, 51, 53, 55, 56, 57, 58, 59, 60, 62, 63, 65, 66, 67, 68, 70, 71, 72, 74, 75, 76, 77, 79, 80, 82, 83, 84, 85, 86, 87, 89, 90, 91, 92, 93, 95, 98, 99
Offset: 1

Views

Author

V. Raman, Nov 25 2013

Keywords

Comments

Previous name was: Numbers j such that the equation a^2 + 3*j*b^2 = 3*c^2 + j*d^2 has no solutions in positive integers for a, b, c, d.
If j is in the sequence, so is j*k^2 for any positive integer k. - Charles R Greathouse IV, Dec 13 2013

Crossrefs

Cf. A084916 (complement).

Programs

  • PARI
    for(n=1,99, if ([]==qfbsolve(Qfb(1,0,-3),n,2),print1(n,", "))); \\ Joerg Arndt, Jun 05 2022

Extensions

Six more terms from V. Raman, Dec 13 2013
Edited by and better name from Jon E. Schoenfield and Joerg Arndt, Jun 05 2022

A068228 Primes congruent to 1 (mod 12).

Original entry on oeis.org

13, 37, 61, 73, 97, 109, 157, 181, 193, 229, 241, 277, 313, 337, 349, 373, 397, 409, 421, 433, 457, 541, 577, 601, 613, 661, 673, 709, 733, 757, 769, 829, 853, 877, 937, 997, 1009, 1021, 1033, 1069, 1093, 1117, 1129, 1153, 1201, 1213, 1237, 1249, 1297
Offset: 1

Views

Author

Ferenc Adorjan (fadorjan(AT)freemail.hu), Feb 22 2002

Keywords

Comments

This has several equivalent definitions (cf. the Tunnell link)
Also primes of the form x^2 + 9y^2 (discriminant -36). - T. D. Noe, May 07 2005 [corrected by Klaus Purath, Jan 18 2023]
Also primes of the form x^2 - 12y^2 (discriminant 48). Cf. A140633. - T. D. Noe, May 19 2008 [corrected by Klaus Purath, Jan 18 2023]
Also primes of the form x^2 + 4*x*y + y^2.
Also primes of the form x^2 + 2*x*y - 2*y^2 (cf. A084916).
Also primes of the form x^2 + 6*x*y - 3*y^2.
Also primes of the form 4*x^2 + 8*x*y + y^2.
Also primes of the form u^2 - 3v^2 (use the transformation {u,v} = {x+2y,y}). - Tito Piezas III, Dec 28 2008
Sequence lists generalized cuban primes (A007645) that are the sum of 2 nonzero squares. - Altug Alkan, Nov 25 2015
Yasutoshi Kohmoto observes that prevprime(a(n)) is more frequently congruent to 3 (mod 4) than to 1. This bias can be explained by the possible prime constellations and gaps: To have the same residue mod 4 as a prime in the list, the previous prime must be at a gap of 4 or 8 or 12 ..., but a gap of 4 is impossible because 12k + 1 - 4 is divisible by 3, and gaps >= 12 are very rare for small primes. To have the residue 3 (mod 4) the previous prime can be at a gap of 2 or 6 with no a priori divisibility property. However, this bias tends to disappear as the primes (and average prime gaps) grow bigger: for primes < 10^5, the ratio is about 35% vs. 65% as the above simple explanation suggests, but considering primes up to 10^8 yields a ratio of about 41% vs. 59%. It can be expected that the ratio asymptotically tends to 1:1. - M. F. Hasler, Sep 01 2017
Also primes of the form x^2 - 27*y^2. - Klaus Purath, Jan 18 2023

References

  • Z. I. Borevich and I. R. Shafarevich, Number Theory. Academic Press, NY, 1966.
  • David A. Cox, Primes of the Form x^2 + n y^2, Wiley, 1989.

Crossrefs

Subsequence of A084916.
Subsequence of A007645.
Also primes in A084916, A020672.
Cf. A141123 (d=12), A141111, A141112 (d=65), A141187 (d=48) A038872 (d=5), A038873 (d=8), A038883 (d=13), A038889 (d=17).
For a list of sequences giving numbers and/or primes represented by binary quadratic forms, see the "Binary Quadratic Forms and OEIS" link.

Programs

  • Magma
    [p: p in PrimesUpTo(1400) | p mod 12 in {1}]; // Vincenzo Librandi, Jul 14 2012
    For other programs see the "Binary Quadratic Forms and OEIS" link.
  • Maple
    select(isprime, [seq(i,i=1..10000, 12)]); # Robert Israel, Nov 27 2015
  • Mathematica
    Select[Prime/@Range[250], Mod[ #, 12]==1&]
    Select[Range[13, 10^4, 12], PrimeQ] (* Zak Seidov, Mar 21 2011 *)
  • PARI
    for(i=1,250, if(prime(i)%12==1, print(prime(i))))
    
  • PARI
    forstep(p=13,10^4,12,isprime(p)&print(p)); \\ Zak Seidov, Mar 21 2011
    

Extensions

Edited by Dean Hickerson, Feb 27 2002
Entry revised by N. J. A. Sloane, Oct 18 2014 (Edited, merged with A141122, submitted by Laura Caballero Fernandez, Lourdes Calvo Moguer, Maria Josefa Cano Marquez, Oscar Jesus Falcon Ganfornina and Sergio Garrido Morales (oscfalgan(AT)yahoo.es), Jun 05 2008).

A031363 Positive numbers of the form x^2 + xy - y^2; or, of the form 5x^2 - y^2.

Original entry on oeis.org

1, 4, 5, 9, 11, 16, 19, 20, 25, 29, 31, 36, 41, 44, 45, 49, 55, 59, 61, 64, 71, 76, 79, 80, 81, 89, 95, 99, 100, 101, 109, 116, 121, 124, 125, 131, 139, 144, 145, 149, 151, 155, 164, 169, 171, 176, 179, 180, 181, 191, 196, 199, 205, 209, 211, 220, 225, 229, 236
Offset: 1

Views

Author

Keywords

Comments

5x^2 - y^2 has discriminant 20, x^2 + xy - y^2 has discriminant 5. - N. J. A. Sloane, May 30 2014
Representable as x^2 + 3xy + y^2 with 0 <= x <= y. - Benoit Cloitre, Nov 16 2003
Numbers k such that x^2 - 3xy + y^2 + k = 0 has integer solutions. - Colin Barker, Feb 04 2014
Numbers k such that x^2 - 7xy + y^2 + 9k = 0 has integer solutions. - Colin Barker, Feb 10 2014
Also positive numbers of the form x^2 - 5y^2. - Jon E. Schoenfield, Jun 03 2022

References

  • M. Baake, "Solution of coincidence problem ...", in R. V. Moody, ed., Math. of Long-Range Aperiodic Order, Kluwer 1997, pp. 9-44.

Crossrefs

Numbers representable as x^2 + k*x*y + y^2 with 0 <= x <= y, for k=0..9: A001481(k=0), A003136(k=1), A000290(k=2), this sequence, A084916(k=4), A243172(k=5), A242663(k=6), A243174(k=7), A243188(k=8), A316621(k=9).
See A035187 for number of representations.
Primes in this sequence: A038872, also A141158.
For a list of sequences giving numbers and/or primes represented by binary quadratic forms, see the "Binary Quadratic Forms and OEIS" link.
See also the related sequence A263849 based on a theorem of Maass.

Programs

  • Maple
    select(t -> nops([isolve(5*x^2-y^2=t)])>0, [$1..1000]); # Robert Israel, Jun 12 2014
  • Mathematica
    ok[n_] := Resolve[Exists[{x, y}, Element[x|y, Integers], n == 5*x^2-y^2]]; Select[Range[236], ok]
    (* or, for a large number of terms: *)
    max = 60755 (* max=60755 yields 10000 terms *); A031363 = {}; xm = 1;
    While[T = A031363; A031363 = Table[5*x^2 - y^2, {x, 1, xm}, {y, 0, Floor[ x*Sqrt[5]]}] // Flatten // Union // Select[#, # <= max&]&; A031363 != T, xm = 2*xm]; A031363  (* Jean-François Alcover, Mar 21 2011, updated Mar 17 2018 *)
  • PARI
    select(x -> x, direuler(p=2,101,1/(1-(kronecker(5,p)*(X-X^2))-X)), 1) \\ Fixed by Andrey Zabolotskiy, Jul 30 2020, after hints by Colin Barker, Jun 18 2014, and Michel Marcus
    
  • PARI
    is(n)=#bnfisintnorm(bnfinit(z^2-z-1),n) \\ Ralf Stephan, Oct 18 2013
    
  • PARI
    seq(M,k=3) = { \\ assume k >= 0
    setintersect([1..M], setbinop((x,y)->x^2 + k*x*y + y^2, [0..1+sqrtint(M)]));
    };
    seq(236) \\ Gheorghe Coserea, Jul 29 2018
    
  • Python
    from itertools import count, islice
    from sympy import factorint
    def A031363_gen(): # generator of terms
        return filter(lambda n:all(not((1 < p % 5 < 4) and e & 1) for p, e in factorint(n).items()),count(1))
    A031363_list = list(islice(A031363_gen(),30)) # Chai Wah Wu, Jun 28 2022

Formula

Consists exactly of numbers in which primes == 2 or 3 mod 5 occur with even exponents.
Indices of the nonzero terms in expansion of Dirichlet series Product_p (1-(Kronecker(m, p)+1)*p^(-s)+Kronecker(m, p)*p^(-2s))^(-1) for m = 5.

Extensions

More terms from Erich Friedman
b-file corrected and extended by Robert Israel, Jun 12 2014

A243655 Positive numbers that are primitively represented by the indefinite quadratic form x^2 - 3y^2 of discriminant 12.

Original entry on oeis.org

1, 6, 13, 22, 33, 37, 46, 61, 69, 73, 78, 94, 97, 109, 118, 121, 141, 142, 157, 166, 169, 177, 181, 193, 213, 214, 222, 229, 241, 249, 253, 262, 277, 286, 313, 321, 334, 337, 349, 358, 366, 373, 382, 393, 397, 409, 421, 429, 433, 438, 454, 457, 478, 481
Offset: 1

Views

Author

N. J. A. Sloane, Jun 11 2014

Keywords

Comments

x^2+2xy-2y^2 is an equivalent form.

Crossrefs

Cf. A084916 (all numbers represented), A068228.

Programs

  • Mathematica
    Reap[For[n = 1, n < 500, n++, r = Reduce[x^2 - 3 y^2 == n, {x, y}, Integers]; If[r =!= False, If[AnyTrue[{x, y} /. {ToRules[r /. C[1] -> 0]}, CoprimeQ @@ # &], Print[n]; Sow[n]]]]][[2, 1]] (* Jean-François Alcover, Oct 31 2016 *)

A264732 Löschian numbers (A003136) which are the sum of 2 nonzero squares.

Original entry on oeis.org

13, 25, 37, 52, 61, 73, 97, 100, 109, 117, 148, 157, 169, 181, 193, 208, 225, 229, 241, 244, 277, 289, 292, 313, 325, 333, 337, 349, 373, 388, 397, 400, 409, 421, 433, 436, 457, 468, 481, 541, 549, 577, 592, 601, 613, 625, 628, 637, 657, 661, 673, 676, 709, 724, 733
Offset: 1

Views

Author

Altug Alkan, Nov 22 2015

Keywords

Comments

n is in the sequence iff 4*n is.
If a(n) is a prime number, a(n) mod 12 = 1.
Prime terms of sequence are listed in A068228 that lists generalized cuban primes (A007645) which are the sum of 2 nonzero squares.
Also positive numbers of the form x^2 - 3*y^2 (A084916) that are the sum of 2 nonzero squares. - Frank M Jackson, Oct 13 2019

Examples

			a(1) = 13 because 13 = 3^2 + 3*1 + 1^2 = 3^2 + 2^2.
a(2) = 25 because 25 = 5^2 + 5*0 + 0^2 = 4^2 + 3^2.
a(3) = 37 because 37 = 4^2 + 4*3 + 3^2 = 6^2 + 1^2.
		

Crossrefs

Programs

A316621 Numbers of the form x^2 + 9*x*y + y^2, 0 <= x <= y.

Original entry on oeis.org

0, 1, 4, 9, 11, 16, 23, 25, 36, 37, 44, 49, 53, 64, 67, 71, 81, 91, 92, 99, 100, 113, 119, 121, 133, 137, 144, 148, 163, 169, 176, 179, 191, 196, 207, 212, 221, 225, 247, 253, 256, 268, 275, 284, 287, 289, 317, 323, 324, 331, 333, 361, 364, 368, 379, 389, 396, 400, 401, 407, 421, 427, 441, 443, 449
Offset: 1

Views

Author

Gheorghe Coserea, Jul 29 2018

Keywords

Comments

Discriminant 77.
In general, for k>=0 the positive part of the set S = {x^2 - k*x*y + y^2: x,y in Z} is given by the numbers of the form x^2 + k*x*y + y^2 with 0 <= x <= y natural numbers.

Crossrefs

Numbers representable as x^2 + k*x*y + y^2 with 0 <= x <= y, for k=0..9: A001481(k=0), A003136(k=1), A000290(k=2), A031363(k=3), A084916(k=4), A243172(k=5), A242663(k=6), A243174(k=7), A243188(k=8), this sequence.

Programs

  • PARI
    seq(M,k=9) = { \\ assume k >= 0
    setintersect([1..M], setbinop((x,y)->x^2 + k*x*y + y^2, [0..1+sqrtint(M)]));
    };
    concat(0, seq(449))
Showing 1-6 of 6 results.