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

A002332 Numbers x such that p = x^2 + 2y^2, with prime p = A033203(n).

Original entry on oeis.org

0, 1, 3, 3, 1, 3, 5, 3, 7, 1, 9, 9, 5, 3, 9, 9, 3, 11, 1, 9, 11, 7, 15, 15, 13, 3, 15, 9, 11, 17, 5, 13, 7, 3, 15, 19, 3, 11, 9, 19, 21, 21, 13, 15, 21, 7, 3, 19, 23, 15, 21, 11, 17, 3, 9, 23, 15, 13, 21, 25, 9, 5, 21, 23, 17, 27, 11, 25, 3, 19, 27, 27, 29, 9, 1, 5, 27, 17, 15, 21, 27
Offset: 1

Views

Author

Keywords

Comments

For p>2, x and y are uniquely determined [Frei, Th. 3]. - N. J. A. Sloane, May 30 2014
The corresponding y numbers are given in A002333.

References

  • A. J. C. Cunningham, Quadratic Partitions. Hodgson, London, 1904, p. 1.
  • D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, p. 55.
  • 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. A002333.

Programs

  • Mathematica
    f[ p_ ] := For[ y=1, True, y++, If[ IntegerQ[ x=Sqrt[ p-2y y ] ], Return[ x ] ] ]; f/@Select[ Prime/@Range[ 1, 200 ], Mod[ #, 8 ]<4& ]

Extensions

More terms from Dean Hickerson, Oct 07 2001

A002333 Numbers y such that p = x^2 + 2y^2, with prime p = A033203(n).

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 3, 5, 3, 6, 1, 2, 6, 7, 4, 5, 8, 3, 9, 7, 6, 9, 1, 2, 6, 11, 4, 10, 9, 3, 12, 9, 12, 13, 8, 3, 14, 12, 13, 6, 1, 2, 12, 11, 5, 15, 16, 9, 3, 13, 8, 15, 12, 17, 16, 6, 14, 15, 10, 3, 17, 18, 11, 9, 15, 4, 18, 9, 20, 15, 7, 8, 3, 20, 21, 21, 10, 18, 19, 16, 11, 22, 18
Offset: 1

Views

Author

Keywords

Comments

The corresponding x numbers are given in A002332.

References

  • A. J. C. Cunningham, Quadratic Partitions. Hodgson, London, 1904, p. 1.
  • D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, p. 55.
  • 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. A002332.

Programs

  • Mathematica
    g[p_] := For[y=1, True, y++, If[IntegerQ[Sqrt[p-2y y]], Return[y]]]; g/@Select[Prime/@Range[1, 200], Mod[ #, 8]<4&]

Extensions

More terms from Dean Hickerson, Oct 07 2001

A379350 Triangle read by rows in which row n lists numbers k such that the greatest prime factor of k^2 + 2 is A033203(n), the n-th prime not congruent to 5 or 7 mod 8.

Original entry on oeis.org

0, 1, 2, 4, 5, 22, 3, 8, 14, 19, 140, 7, 10, 24, 41, 58, 265, 707, 6, 13, 25, 32, 44, 63, 146, 184, 602, 3407, 21362, 11, 30, 52, 71, 112, 194, 298, 481, 503, 2695, 3433, 4991, 16, 27, 59, 70, 102, 113, 317, 500, 586, 1048, 2951, 3424, 4972, 8240, 12658, 83834, 686210, 1306066
Offset: 1

Views

Author

Andrew Howroyd, Dec 22 2024

Keywords

Comments

For any prime p, there are finitely many x such that x^2 + 2 has p as its greatest prime factor.

Examples

			Irregular triangle begins:
   p | {k}
-----+------------------
   2 | {0}
   3 | {1, 2, 4, 5, 22}
  11 | {3, 8, 14, 19, 140}
  17 | {7, 10, 24, 41, 58, 265, 707}
  19 | {6, 13, 25, 32, 44, 63, 146, 184, 602, 3407, 21362}
  41 | {11, 30, 52, 71, 112, 194, 298, 481, 503, 2695, 3433, 4991}
  ...
		

Crossrefs

Cf. A033203, A379351, A379352 (first terms), A185397 (last terms), A379349 (row lengths).

A185397 Largest number x such that the greatest prime factor of x^2+2 is A033203(n), the n-th prime not congruent to 5 or 7 mod 8.

Original entry on oeis.org

22, 140, 707, 21362, 4991, 1306066, 137965, 2294636, 31768298, 1557652, 340064590, 38439662, 105080665, 273502688, 543164542, 9575480365630, 391890109484, 14629598023, 80849485336, 1241646894380
Offset: 1

Views

Author

Keywords

Comments

For any prime p, there are finitely many x such that x^2+2 has p as its largest prime factor.

Crossrefs

Equivalents for other polynomials: A175607 (x^2 - 1), A145606 (x^2 + x), A185389 (x^2 + 1), A185396 (x^2 - 2).

A379349 Number of integers of the form k^2 + 2 whose greatest prime factor is A033203(n), the n-th prime not congruent to 5 or 7 mod 8.

Original entry on oeis.org

1, 5, 5, 7, 11, 12, 18, 18, 21, 25, 30, 47, 39, 45, 62, 63, 83, 81, 107, 105, 130
Offset: 1

Views

Author

Andrew Howroyd, Dec 22 2024

Keywords

Comments

See A379350 for additional information.

Examples

			Table showing n, p = A033203(n) and a(n):
   1    2    1
   2    3    5
   3   11    5
   4   17    7
   5   19   11
   6   41   12
   7   43   18
   8   59   18
   9   67   21
  10   73   25
  ...
		

Crossrefs

Row lengths of A379350.

A379352 a(n) is the smallest nonnegative integer k such the greatest prime factor of k^2 + 2 is A033203(n), the n-th prime not congruent to 5 or 7 mod 8.

Original entry on oeis.org

0, 1, 3, 7, 6, 11, 16, 23, 20, 12, 9, 40, 17, 31, 26, 28, 51, 50, 18, 78, 34, 93, 15, 109, 38, 91, 68, 29, 127, 108, 130, 75, 141, 107, 46, 120, 143, 35, 96, 69, 21, 214, 37, 126, 94, 67, 163, 56, 190, 261, 216, 153, 239, 207, 260, 104, 43, 288, 62, 206, 77, 262, 64, 151, 346
Offset: 1

Views

Author

Andrew Howroyd, Dec 22 2024

Keywords

Examples

			Table showing n, A033203(n), a(n), a(n)^2 + 2:
   1  2  0   2
   2  3  1   3
   3 11  3  11
   4 17  7  51 = 17*3
   5 19  6  38 = 19*2
   6 41 11 123 = 41*3
   7 43 16 258 = 43*3*2
   8 59 23 531 = 59*3^2
   9 67 20 402 = 67*3*2
  10 73 12 146 = 73*2
  ...
		

Crossrefs

Programs

  • PARI
    lista(n) = { my(L=List(),p=0); while(#L5&&r<>7, my(k=0); while(vecmax(factor(k^2 + 2)[,1]) <> p, k++); listput(L,k) )); Vec(L) }

A106856 Primes of the form x^2 + xy + 2y^2, with x and y nonnegative.

Original entry on oeis.org

2, 11, 23, 37, 43, 53, 71, 79, 107, 109, 127, 137, 149, 151, 163, 193, 197, 211, 233, 239, 263, 281, 317, 331, 337, 373, 389, 401, 421, 431, 443, 463, 487, 491, 499, 541, 547, 557, 569, 599, 613, 617, 641, 653, 659, 673, 683, 739, 743, 751, 757, 809, 821
Offset: 1

Views

Author

T. D. Noe, May 09 2005, Apr 28 2008

Keywords

Comments

Discriminant=-7. Binary quadratic forms ax^2 + bxy + cy^2 have discriminant d = b^2 - 4ac.
Consider sequences of primes produced by forms with -100
The Mathematica function QuadPrimes2 is useful for finding the primes less than "lim" represented by the positive definite quadratic form ax^2 + bxy + cy^2 for any a, b and c satisfying a>0, c>0, and discriminant d<0. It does this by examining all x>=0 and y>=0 in the ellipse ax^2 + bxy + cy^2 <= lim. To find the primes generated by positive and negative x and y, compute the union of QuadPrimes2[a,b,c,lim] and QuadPrimes2[a,-b,c,lim]. - T. D. Noe, Sep 01 2009
For other programs see the "Binary Quadratic Forms and OEIS" link.

References

  • David A. Cox, Primes of the Form x^2 + n y^2, Wiley, 1989.
  • L. E. Dickson, History of the Theory of Numbers, Vol. 3, Chelsea, 1923.

Crossrefs

Discriminants in the range -3 to -100: A007645 (d=-3), A002313 (d=-4), A045373, A106856 (d=-7), A033203 (d=-8), A056874, A106857 (d=-11), A002476 (d=-12), A033212, A106858-A106861 (d=-15), A002144, A002313 (d=-16), A106862-A106863 (d=-19), A033205, A106864-A106865 (d=-20), A106866-A106869 (d=-23), A033199, A084865 (d=-24), A002476, A106870 (d=-27), A033207 (d=-28), A033221, A106871-A106874 (d=-31), A007519, A007520, A106875-A106876 (d=-32), A106877-A106881 (d=-35), A040117, A068228, A106882 (d=-36), A033227, A106883-A106888 (d=-39), A033201, A106889 (d=-40), A106890-A106891 (d=-43), A033209, A106282, A106892-A106893 (d=-44), A033232, A106894-A106900 (d=-47), A068229 (d=-48), A106901-A106904 (d=-51), A033210, A106905-A106906 (d=-52), A033235, A106907-A106913 (d=-55), A033211, A106914-A106917 (d=-56), A106918-A106922 (d=-59), A033212, A106859 (d=-60), A106923-A106930 (d=-63), A007521, A106931 (d=-64), A106932-A106933 (d=-67), A033213, A106934-A106938 (d=-68), A033246, A106939-A106948 (d=-71), A106949-A106950 (d=-72), A033212, A106951-A106952 (d=-75), A033214, A106953-A106955 (d=-76), A033251, A106956-A106962 (d=-79), A047650, A106963-A106965 (d=-80), A106966-A106970 (d=-83), A033215, A102271, A102273, A106971-A106974 (d=-84), A033256, A106975-A106983 (d=-87), A033216, A106984 (d=-88), A106985-A106989 (d=-91), A033217 (d=-92), A033206, A106990-A107001 (d=-95), A107002-A107008 (d=-96), A107009-A107013 (d=-99).
Other collections of quadratic forms: A139643, A139827.
For a more comprehensive list of sequences giving numbers and/or primes represented by binary quadratic forms, see the "Binary Quadratic Forms and OEIS" link.
Cf. also A242660.

Programs

  • Mathematica
    QuadPrimes2[a_, b_, c_, lmt_] := Module[{p, d, lst = {}, xMax, yMax}, d = b^2 - 4a*c; If[a > 0 && c > 0 && d < 0, xMax = Sqrt[lmt/a]*(1+Abs[b]/Floor[Sqrt[-d]])]; Do[ If[ 4c*lmt + d*x^2 >= 0, yMax = ((-b)*x + Sqrt[4c*lmt + d*x^2])/(2c), yMax = 0 ]; Do[p = a*x^2 + b*x*y + c*y^2; If[ PrimeQ[ p]  && p <= lmt && !MemberQ[ lst, p], AppendTo[ lst, p]], {y, 0, yMax}], {x, 0, xMax}]; Sort[ lst]];
    QuadPrimes2[1, 1, 2, 1000]
    (This is a corrected version of the old, incorrect, program QuadPrimes. - N. J. A. Sloane, Jun 15 2014)
    max = 1000; Table[yy = {y, 1, Floor[Sqrt[8 max - 7 x^2]/4 - x/4]}; Table[ x^2 + x y + 2 y^2, yy // Evaluate], {x, 0, Floor[Sqrt[max]]}] // Flatten // Union // Select[#, PrimeQ]& (* Jean-François Alcover, Oct 04 2018 *)
  • PARI
    list(lim)=my(q=Qfb(1,1,2), v=List([2])); forprime(p=2, lim, if(vecmin(qfbsolve(q, p))>0, listput(v,p))); Vec(v) \\ Charles R Greathouse IV, Aug 05 2016

Extensions

Removed old Mathematica programs - T. D. Noe, Sep 09 2009
Edited (pointed out error in QuadPrimes, added new version of program, checked and extended b-file). - N. J. A. Sloane, Jun 06 2014

A002313 Primes congruent to 1 or 2 modulo 4; or, primes of form x^2 + y^2; or, -1 is a square mod p.

Original entry on oeis.org

2, 5, 13, 17, 29, 37, 41, 53, 61, 73, 89, 97, 101, 109, 113, 137, 149, 157, 173, 181, 193, 197, 229, 233, 241, 257, 269, 277, 281, 293, 313, 317, 337, 349, 353, 373, 389, 397, 401, 409, 421, 433, 449, 457, 461, 509, 521, 541, 557, 569, 577, 593, 601, 613, 617
Offset: 1

Keywords

Comments

Or, primes p such that x^2 - p*y^2 represents -1.
Primes which are not Gaussian primes (meaning not congruent to 3 mod 4).
Every Fibonacci prime (with the exception of F(4) = 3) is in the sequence. If p = 2n+1 is the prime index of the Fibonacci prime, then F(2n+1) = F(n)^2 + F(n+1)^2 is the unique representation of the prime as sum of two squares. - Sven Simon, Nov 30 2003
Except for 2, primes of the form x^2 + 4y^2. See A140633. - T. D. Noe, May 19 2008
Primes p such that for all p > 2, p XOR 2 = p + 2. - Brad Clardy, Oct 25 2011
Greatest prime divisor of r^2 + 1 for some r. - Michel Lagneau, Sep 30 2012
Empirical result: a(n), as a set, compose the prime factors of the family of sequences produced by A005408(j)^2 + A005408(j+k)^2 = (2j+1)^2 + (2j+2k+1)^2, for j >= 0, and a given k >= 1 for each sequence, with the addition of the prime factors of k if not already in a(n). - Richard R. Forberg, Feb 09 2015
Primes such that when r is a primitive root then p-r is also a primitive root. - Emmanuel Vantieghem, Aug 13 2015
Primes of the form (x^2 + y^2)/2. Note that (x^2 + y^2)/2 = ((x+y)/2)^2 + ((x-y)/2)^2 = a^2 + b^2 with x = a + b and y = a - b. More generally, primes of the form (x^2 + y^2) / A001481(n) for every fixed n > 1. - Thomas Ordowski, Jul 03 2016
Numbers n such that ((n-2)!!)^2 == -1 (mod n). - Thomas Ordowski, Jul 25 2016
Primes p such that (p-1)!! == (p-2)!! (mod p). - Thomas Ordowski, Jul 28 2016
The product of 2 different terms (x^2 + y^2)(z^2 + v^2) = (xz + yv)^2 + (xv - yz)^2 is sum of 2 squares (A000404) because (xv - yz)^2 > 0. If x were equal to yz/v then (x^2 + y^2)/(z^2 + v^2) would be equal to ((yz/v)^2 + y^2)/(z^2 + v^2) = y^2/v^2 which is not possible because (x^2 + y^2) and (z^2 + v^2) are prime numbers. For example, (2^2 + 5^2)(4^2 + 9^2) = (2*4 + 5*9)^2 + (2*9 - 5*4)^2. - Jerzy R Borysowicz, Mar 21 2017

Examples

			13 is in the sequence since it is prime and 13 = 4*3 + 1.  Also 13 = 2^2 + 3^2.  And -1 is a square (mod 13): -1 + 2*13 = 25 = 5^2.  Of course, only the first term is congruent to 2 (mod 4). - _Michael B. Porter_, Jul 04 2016
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 872.
  • David A. Cox, "Primes of the Form x^2 + n y^2", Wiley, 1989.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, p. 219, th. 251, 252.
  • 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

Apart from initial term, same as A002144. For values of x and y see A002330 and A002331.

Programs

  • Haskell
    a002313 n = a002313_list !! (n-1)
    a002313_list = filter ((`elem` [1,2]) . (`mod` 4)) a000040_list
    -- Reinhard Zumkeller, Feb 04 2014
    
  • Magma
    [p: p in PrimesUpTo(700) | p mod 4 in {1,2}]; // Vincenzo Librandi, Feb 18 2015
  • Maple
    with(numtheory): for n from 1 to 300 do if ithprime(n) mod 4 = 1 or ithprime(n) mod 4 = 2 then printf(`%d,`,ithprime(n)) fi; od:
    # alternative
    A002313 := proc(n)
        option remember ;
        local a;
        if n = 1 then
            2;
        elif n = 2 then
            5;
        else
            for a from procname(n-1)+4 by 4 do
                if isprime(a) then
                    return a ;
                end if;
            end do:
        end if;
    end proc:
    seq(A002313(n),n=1..100) ; # R. J. Mathar, Feb 01 2024
  • Mathematica
    Select[ Prime@ Range@ 115, Mod[#, 4] != 3 &] (* Robert G. Wilson v *)
    fQ[n_] := Solve[x^2 + 1 == n*y^2, {x, y}, Integers] == {}; Select[ Prime@ Range@ 115, fQ] (* Robert G. Wilson v, Dec 19 2013 *)
  • PARI
    select(p->p%4!=3, primes(1000)) \\ Charles R Greathouse IV, Feb 11 2011
    

Formula

a(n) ~ 2n log n. - Charles R Greathouse IV, Jul 04 2016
a(n) = A002331(n)^2 + A002330(n)^2. See crossrefs. - Wolfdieter Lang, Dec 11 2016

Extensions

More terms from Henry Bottomley, Aug 10 2000
More terms from James Sellers, Aug 22 2000

A002479 Numbers of the form x^2 + 2*y^2.

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 8, 9, 11, 12, 16, 17, 18, 19, 22, 24, 25, 27, 32, 33, 34, 36, 38, 41, 43, 44, 48, 49, 50, 51, 54, 57, 59, 64, 66, 67, 68, 72, 73, 75, 76, 81, 82, 83, 86, 88, 89, 96, 97, 98, 99, 100, 102, 107, 108, 113, 114, 118, 121, 123, 128, 129, 131
Offset: 1

Keywords

Comments

A positive number k belongs to this sequence if and only if every prime p == 5, 7 (mod 8) dividing k occurs to an even power. - Sharon Sela (sharonsela(AT)hotmail.com), Mar 23 2002
Norms of numbers in Z[sqrt(-2)]. - Alonso del Arte, Sep 23 2014
Euler (E256) shows that these numbers are closed under multiplication, according to the Euler Archive. - Charles R Greathouse IV, Jun 16 2016
In addition to the previous comment: The proof was already given 1100 years before Euler by Brahmagupta's identity (a^2 + m*b^2)*(c^2 + m*d^2) = (a*c - m*b*d)^2 + m*(a*d + b*c)^2. - Klaus Purath, Oct 07 2023

References

  • L. Euler, (E388) Vollstaendige Anleitung zur Algebra, Zweiter Theil, reprinted in: Opera Omnia. Teubner, Leipzig, 1911, Series (1), Vol. 1, p. 421.
  • D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, p. 59.
  • 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

Complement of A097700. Subsequence of A000408. For primes see A033203.

Programs

  • Haskell
    a002479 n = a002479_list !! (n-1)
    a002479_list = 0 : filter f [1..] where
       f x = all (even . snd) $ filter ((`elem` [5,7]) . (`mod` 8) . fst) $
                                zip (a027748_row x) (a124010_row x)
    -- Reinhard Zumkeller, Feb 20 2014
    
  • Magma
    [n: n in [0..131] | NormEquation(2, n) eq true]; // Arkadiusz Wesolowski, May 11 2016
    
  • Maple
    lis:={}; M:=50; M2:=M^2;
    for x from 0 to M do for y from 0 to M do
    if x^2+2*y^2 <= M2 then lis:={op(lis),x^2+2*y^2}; fi; od: od:
    sort(convert(lis,list)); # N. J. A. Sloane, Apr 30 2015
  • Mathematica
    q = 16; imax = q^2; Select[Union[Flatten[Table[x^2 + 2y^2, {y, 0, q/Sqrt[2]}, {x, 0, q}]]], # <= imax &] (* Vladimir Joseph Stephan Orlovsky, Apr 20 2011 *)
    Union[#[[1]]+2#[[2]]&/@Tuples[Range[0,10]^2,2]] (* Harvey P. Dale, Nov 24 2014 *)
  • PARI
    is(n)=my(f=factor(n));for(i=1,#f[,1],if(f[i,1]%8>4 && f[i,2]%2, return(0)));1 \\ Charles R Greathouse IV, Nov 20 2012
    
  • PARI
    list(lim)=my(v=List()); for(a=0,sqrtint(lim\=1), for(b=0,sqrtint((lim-a^2)\2), listput(v,a^2+2*b^2))); Set(v) \\ Charles R Greathouse IV, Jun 16 2016
    
  • Python
    from itertools import count, islice
    from sympy import factorint
    def A002479_gen(): # generator of terms
        return filter(lambda n:all(p & 7 < 5 or e & 1 == 0 for p, e in factorint(n).items()),count(0))
    A002479_list = list(islice(A002479_gen(),30)) # Chai Wah Wu, Jun 27 2022

A003628 Primes congruent to {5, 7} mod 8.

Original entry on oeis.org

5, 7, 13, 23, 29, 31, 37, 47, 53, 61, 71, 79, 101, 103, 109, 127, 149, 151, 157, 167, 173, 181, 191, 197, 199, 223, 229, 239, 263, 269, 271, 277, 293, 311, 317, 349, 359, 367, 373, 383, 389, 397, 421, 431, 439
Offset: 1

Keywords

Comments

Inert rational odd primes in the field Q(sqrt(-2)).
Primes p such that p XOR 5 = p - 5. - Brad Clardy, Jul 22 2012
Terms m in A047566 with A010051(m) = 1. - Reinhard Zumkeller, Dec 29 2012
This sequence gives the primes p which satisfy norm(rho(p)) = - 1 with rho(p) := 2*cos(Pi/p) (the length ratio (smallest diagonal)/side in the regular p-gon). The norm of an algebraic number (over Q) is the product over all zeros of its minimal polynomial. Here norm(rho(p)) = (-1)^delta(p)* C(p, 0), with the degree delta(p) = A055034(p) = (p-1)/2. For p == 5 (mod 8) the norm is C(p, 0) (see a comment on 2*A230076) and for p == 7 (mod 8) the norm is -C(p, 0) (see a comment on A186302). For the primes with norm(rho(p)) = +1 see A033200. - Wolfdieter Lang, Oct 24 2013

References

  • H. Hasse, Number Theory, Springer-Verlag, NY, 1980, p. 498.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A000040, A039706, A033203 (complement with respect to A000040).

Programs

  • Haskell
    a003628 n = a003628_list !! (n-1)
    a003628_list = filter ((== 1) . a010051) a047566_list
    -- Reinhard Zumkeller, Dec 29 2012, Jan 22 2012
    
  • Magma
    [ p: p in PrimesUpTo(600) | p mod 8 in {5, 7}]; // Vincenzo Librandi, Aug 22 2012
  • Mathematica
    Select[Prime[Range[200]],MemberQ[{5,7},Mod[#,8]]&] (* Harvey P. Dale, Oct 24 2011 *)
  • PARI
    {a(n) = local( cnt, m ); if( n<1, return( 0 )); while( cnt < n, if( isprime( m++) && kronecker( -2, m )==-1, cnt++ )); m} /* Michael Somos, Aug 14 2012 */
    

Formula

a(n) ~ 2n log n. - Charles R Greathouse IV, Feb 24 2023
Showing 1-10 of 28 results. Next