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

A007519 Primes of form 8n+1, that is, primes congruent to 1 mod 8.

Original entry on oeis.org

17, 41, 73, 89, 97, 113, 137, 193, 233, 241, 257, 281, 313, 337, 353, 401, 409, 433, 449, 457, 521, 569, 577, 593, 601, 617, 641, 673, 761, 769, 809, 857, 881, 929, 937, 953, 977, 1009, 1033, 1049, 1097, 1129, 1153, 1193, 1201, 1217, 1249, 1289, 1297, 1321, 1361
Offset: 1

Views

Author

Keywords

Comments

Discriminant is 32, class is 2. Binary quadratic forms ax^2 + bxy + cy^2 have discriminant d = b^2 - 4ac and gcd(a, b, c) = 1.
Integers n (n > 9) of form 4k + 1 such that binomial(n-1, (n-1)/4) == 1 (mod n) - Benoit Cloitre, Feb 07 2004
Primes of the form x^2 + 8y^2. - T. D. Noe, May 07 2005
Also primes of the form x^2 + 16y^2. See A140633. - T. D. Noe, May 19 2008
Is this the same sequence as A141174?
Being a subset of A001132 and also a subset of A038873, this is also a subset of the primes of the form u^2 - 2v^2. - Tito Piezas III, Dec 28 2008
These primes p are only which possess the property: for every integer m from interval [0, p) with the Hamming distance D(m, p) = 2, there exists an integer h from (m, p) with D(m, h) = 2. - Vladimir Shevelev, Apr 18 2012
Primes p such that p XOR 6 = p + 6. - Brad Clardy, Jul 22 2012
Odd primes p such that -1 is a 4th power mod p. - Eric M. Schmidt, Mar 27 2014
There are infinitely many primes of this form. See Brubaker link. - Alonso del Arte, Jan 12 2017
These primes split in Z[sqrt(2)]. For example, 17 = (-1)(1 - 3*sqrt(2))(1 + 3*sqrt(2)). This is also true of primes of the form 8n - 1. - Alonso del Arte, Jan 26 2017

Examples

			a(1) = 17 = 2 * 8 + 1 = (10001)_2. All numbers m from [0, 17) with the Hamming distance D(m, 17) = 2 are 0, 3, 5, 9. For m = 0, we can take h = 3, since 3 is drawn from (0, 17) and D(0, 3) = 2; for m = 3, we can take h = 5, since 5 from (3, 17) and D(3, 5) = 2; for m = 5, we can take h = 6, since 6 from (5, 17) and D(5, 6) = 2; for m = 9, we can take h = 10, since 10 is drawn from (9, 17) and D(9, 10) = 2. - _Vladimir Shevelev_, Apr 18 2012
		

References

  • Milton Abramowitz and Irene A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 870.
  • Z. I. Borevich and I. R. Shafarevich, Number Theory.
  • 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 261.

Crossrefs

Subsequence of A017077 and of A038873.
Cf. A139643. Complement in primes of A154264. Cf. A042987.
Cf. A038872 (d = 5). A038873 (d = 8). A068228, A141123 (d = 12). A038883 (d = 13). A038889 (d = 17). A141111, A141112 (d = 65).
Cf. also A242663.
For a list of sequences giving numbers and/or primes represented by binary quadratic forms, see the "Binary Quadratic Forms and OEIS" link.

Programs

  • Haskell
    a007519 n = a007519_list !! (n-1)
    a007519_list = filter ((== 1) . a010051) [1,9..]
    -- Reinhard Zumkeller, Mar 06 2012
    
  • Magma
    [p: p in PrimesUpTo(2000) | p mod 8 eq 1 ]; // Vincenzo Librandi, Aug 21 2012
    
  • Mathematica
    Select[1 + 8 Range@ 170, PrimeQ] (* Robert G. Wilson v *)
  • PARI
    forprime(p=2,1e4,if(p%8==1,print1(p", "))) \\ Charles R Greathouse IV, Jun 16 2011
    
  • PARI
    forprimestep(p=17,10^4,8, print1(p", ")) \\ Charles R Greathouse IV, Jul 17 2024
    
  • PARI
    lista(nn)= my(vpr = []); for (x = 0, nn, y = 0; while ((v = x^2+6*x*y+y^2) < nn, if (isprime(v), if (! vecsearch(vpr, v), vpr = concat(vpr, v); vpr = vecsort(vpr););); y++;);); vpr; \\ Michel Marcus, Feb 01 2014
    
  • PARI
    A007519_upto(N, start=1)=select(t->t%8==1,primes([start,N]))
    #A7519=A007519_upto(10^5)
    A007519(n)={while(#A7519A007519_upto(N*3\2, N+1))); A7519[n]} \\ M. F. Hasler, May 22 2025
    
  • SageMath
    # uses[binaryQF]
    # The function binaryQF is defined in the link 'Binary Quadratic Forms'.
    Q = binaryQF([1, 4, -4])
    print(Q.represented_positives(1361, 'prime'))  # Peter Luschny, Jan 26 2017

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

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