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 10 results.

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

Views

Author

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

A006134 a(n) = Sum_{k=0..n} binomial(2*k,k).

Original entry on oeis.org

1, 3, 9, 29, 99, 351, 1275, 4707, 17577, 66197, 250953, 956385, 3660541, 14061141, 54177741, 209295261, 810375651, 3143981871, 12219117171, 47564380971, 185410909791, 723668784231, 2827767747951, 11061198475551, 43308802158651, 169719408596403, 665637941544507
Offset: 0

Views

Author

Keywords

Comments

The expression a(n) = B^n*Sum_{ k=0..n } binomial(2*k,k)/B^k gives A006134 for B=1, A082590 (B=2), A132310 (B=3), A002457 (B=4), A144635 (B=5). - N. J. A. Sloane, Jan 21 2009
T(n+1,1) from table A045912 of characteristic polynomial of negative Pascal matrix. - Michael Somos, Jul 24 2002
p divides a((p-3)/2) for p=11, 13, 23, 37, 47, 59, 61, 71, 73, 83, 97, 107, 109, 131, 157, 167, ...: A097933. Also primes congruent to {1, 2, 3, 11} mod 12 or primes p such that 3 is a square mod p (excluding 2 and 3) A038874. - Alexander Adamchuk, Jul 05 2006
Partial sums of the even central binomial coefficients. For p prime >=5, a(p-1) = 1 or -1 (mod p) according as p = 1 or -1 (mod 3) (see Pan and Sun link). - David Callan, Nov 29 2007
First column of triangle A187887. - Michel Marcus, Jun 23 2013
From Gus Wiseman, Apr 20 2023: (Start)
Also the number of nonempty subsets of {1,...,2n+1} with median n+1, where the median of a multiset is either the middle part (for odd length), or the average of the two middle parts (for even length). The odd/even-length cases are A000984 and A006134(n-1). For example, the a(0) = 1 through a(2) = 9 subsets are:
{1} {2} {3}
{1,3} {1,5}
{1,2,3} {2,4}
{1,3,4}
{1,3,5}
{2,3,4}
{2,3,5}
{1,2,4,5}
{1,2,3,4,5}
Alternatively, a(n-1) is the number of nonempty subsets of {1,...,2n-1} with median n.
(End)

Examples

			1 + 3*x + 9*x^2 + 29*x^3 + 99*x^4 + 351*x^5 + 1275*x^6 + 4707*x^7 + 17577*x^8 + ...
		

References

  • Marko Petkovsek, Herbert Wilf and Doron Zeilberger, A=B, A K Peters, 1996, p. 22.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A000984 (first differences), A097933, A038874, A132310.
Equals A066796 + 1.
Odd bisection of A100066.
Row sums of A361654 (also column k = 2).
A007318 counts subsets by length, A231147 by median, A013580 by integer median.
A359893 and A359901 count partitions by median.

Programs

  • MATLAB
    n=10; x=pascal(n); trace(x)
    
  • Magma
    &cat[ [&+[ Binomial(2*k, k): k in [0..n]]]: n in [0..30]]; // Vincenzo Librandi, Aug 13 2015
  • Maple
    A006134 := proc(n) sum(binomial(2*k,k),k=0..n); end;
    a := n -> -binomial(2*(n+1),n+1)*hypergeom([1,n+3/2],[n+2], 4) - I/sqrt(3):
    seq(simplify(a(n)), n=0..24); # Peter Luschny, Oct 29 2015
    # third program:
    A006134 := series(exp(2*x)*BesselI(0, 2*x) + exp(x)*int(BesselI(0, 2*x)*exp(x), x), x = 0, 25):
    seq(n!*coeff(A006134, x, n), n=0..24); # Mélika Tebni, Feb 27 2024
  • Mathematica
    Table[Sum[((2k)!/(k!)^2),{k,0,n}], {n,0,50}] (* Alexander Adamchuk, Jul 05 2006 *)
    a[ n_] := (4/3) Binomial[ 2 n, n] Hypergeometric2F1[ 1/2, 1, -n + 1/2, -1/3] (* Michael Somos, Jun 20 2012 *)
    Accumulate[Table[Binomial[2n,n],{n,0,30}]] (* Harvey P. Dale, Jan 11 2015 *)
    CoefficientList[Series[1/((1 - x) Sqrt[1 - 4 x]), {x, 0, 33}], x] (* Vincenzo Librandi, Aug 13 2015 *)
  • Maxima
    makelist(sum(binomial(2*k,k),k,0,n),n,0,12); /* Emanuele Munarini, Mar 15 2011 */
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( charpoly( matrix( n+1, n+1, i, j, -binomial( i+j-2, i-1))), 1))} \\ Michael Somos, Jul 10 2002
    
  • PARI
    {a(n)=binomial(2*n,n)*sum(k=0,2*n,(-1)^k*polcoeff((1+x+x^2)^n,k)/binomial(2*n,k))} \\ Paul D. Hanna, Aug 21 2007
    
  • PARI
    my(x='x+O('x^100)); Vec(1/((1-x)*sqrt(1-4*x))) \\ Altug Alkan, Oct 29 2015
    

Formula

From Alexander Adamchuk, Jul 05 2006: (Start)
a(n) = Sum_{k=0..n} (2k)!/(k!)^2.
a(n) = A066796(n) + 1, n>0. (End)
G.f.: 1/((1-x)*sqrt(1-4*x)).
D-finite with recurrence: (n+2)*a(n+2) - (5*n+8)*a(n+1) + 2*(2*n+3)*a(n) = 0. - Emanuele Munarini, Mar 15 2011
a(n) = C(2n,n) * Sum_{k=0..2n} (-1)^k*trinomial(n,k)/C(2n,k) where trinomial(n,k) = [x^k] (1 + x + x^2)^n. E.g. a(2) = C(4,2)*(1/1 - 2/4 + 3/6 - 2/4 + 1/1) = 6*(3/2) = 9 ; a(3) = C(6,3)*(1/1 - 3/6 + 6/15 - 7/20 + 6/15 - 3/6 + 1/1) = 20*(29/20) = 29. - Paul D. Hanna, Aug 21 2007
From Alzhekeyev Ascar M, Jan 19 2012: (Start)
a(n) = Sum_{ k=0..n } b(k)*binomial(n+k,k), where b(k)=0 for n-k == 2 (mod 3), b(k)=1 for n-k == 0 or 1 (mod 6), and b(k)=-1 for n-k== 3 or 4 (mod 6).
a(n) = Sum_{ k=0..n-1 } c(k)*binomial(2n,k) + binomial(2n,n), where c(k)=0 for n-k == 0 (mod 3), c(k)=1 for n-k== 1 (mod 3), and c(k)=-1 for n-k==2 (mod 3). (End)
a(n) ~ 2^(2*n+2)/(3*sqrt(Pi*n)). - Vaclav Kotesovec, Nov 06 2012
G.f.: G(0)/2/(1-x), where G(k)= 1 + 1/(1 - 2*x*(2*k+1)/(2*x*(2*k+1) + (k+1)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 24 2013
G.f.: G(0)/(1-x), where G(k)= 1 + 4*x*(4*k+1)/( (4*k+2) - x*(4*k+2)*(4*k+3)/(x*(4*k+3) + (k+1)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 26 2013
a(n) = Sum_{k = 0..n} binomial(n+1,k+1)*A002426(k). - Peter Bala, Oct 29 2015
a(n) = -binomial(2*(n+1),n+1)*hypergeom([1,n+3/2],[n+2], 4) - i/sqrt(3). - Peter Luschny, Oct 29 2015
a(n) = binomial(2*n, n)*hypergeom([1,-n], [1/2-n], 1/4). - Peter Luschny, Mar 16 2016
From Gus Wiseman, Apr 20 2023: (Start)
a(n+1) - a(n) = A000984(n).
a(n) = A013580(2n+1,n+1) (conjectured).
a(n) = 2*A024718(n) - 1.
a(n) = A100066(2n+1).
a(n) = A231147(2n+1,n+1) (conjectured). (End)
a(n) = Sum_{k=0..floor(n/3)} 3^(n-3*k) * binomial(n-k,2*k) * binomial(2*k,k) (Sawhney, 2017). - Amiram Eldar, Feb 24 2024
From Mélika Tebni, Feb 27 2024: (Start)
Limit_{n -> oo} a(n) / A281593(n) = 2.
E.g.f.: exp(2*x)*BesselI(0,2*x) + exp(x)*integral( BesselI(0,2*x)*exp(x) ) dx. (End)
a(n) = [(x*y)^n] 1/((1 - (x + y))*(1 - x*y)). - Stefano Spezia, Feb 16 2025
a(n) = Sum_{k=0..floor(n/2)} (-1)^k*binomial(2*n+1-k, n-2*k). - Michael Weselcouch, Jun 17 2025
a(n) = binomial(1+2*n, n)*hypergeom([1, (1-n)/2, -n/2], [-1-2*n, 2+n], 4). - Stefano Spezia, Jun 18 2025

Extensions

Simpler definition from Alexander Adamchuk, Jul 05 2006

A097933 Primes p that divide 3^((p-1)/2) - 1.

Original entry on oeis.org

11, 13, 23, 37, 47, 59, 61, 71, 73, 83, 97, 107, 109, 131, 157, 167, 179, 181, 191, 193, 227, 229, 239, 241, 251, 263, 277, 311, 313, 337, 347, 349, 359, 373, 383, 397, 409, 419, 421, 431, 433, 443, 457, 467, 479, 491, 503, 541, 563, 577, 587, 599, 601, 613
Offset: 1

Views

Author

Cino Hilliard, Sep 04 2004

Keywords

Comments

Rational primes that decompose in the field Q[sqrt(3)]. - N. J. A. Sloane, Dec 26 2017
For all primes p > 2 and integers gcd(x, y, p) = 1, x^((p-1)/2) +- y^((p-1)/2) is divisible by p. This is because (x^((p-1)/2) - y^((p-1)/2))(x^((p-1)/2) + y^((p-1)/2)) = x^(p-1) - y^(p-1) is divisible by p according to Fermat's Little Theorem (FLT). This sequence lists p that divides 3^((p-1)/2) - 1^((p-1)/2), and A003630 lists the '+' case.
Apart from initial terms, this and A038874 are the same. - N. J. A. Sloane, May 31 2009
Primes in A091998. - Reinhard Zumkeller, Jan 07 2012
Also, primes congruent to 1 or 11 (mod 12). - Vincenzo Librandi, Mar 23 2013
Conjecture: Let r(n) = (a(n) - 1)/(a(n) + 1) if a(n) mod 4 = 1, (a(n) + 1)/(a(n) - 1) otherwise; then Product_{n>=1} r(n) = (6/5) * (6/7) * (12/11) * (18/19) * ... = 2/sqrt(3). - Dimitris Valianatos, Mar 27 2017
Primes p such that Kronecker(12,p) = +1 (12 is the discriminant of Q[sqrt(3)]), that is, odd primes that have 3 as a quadratic residue. - Jianing Song, Nov 21 2018
Comment from Richard R. Forberg, Feb 07 2023: (Start)
Conjecture: These are the exclusive prime factors of the set of integers d > 1 such that there exist primitive Heronian triangles with sides {b, b+d, b+2d} for one or more integers b.
Also b is always > d. For d=11 the b values begin {15, 17, 65, 75, 267, 305, 1025, ...}. For d=1 (not prime, thus not listed) the b values are given by A016064. (End)

Examples

			For p = 5, 3^2 - 1 = 8 <> 3*k for any integer k, so 5 is not in this sequence.
For p = 11, 3^5 - 1 = 242 = 11*22, so 11 is in this sequence.
		

Crossrefs

Programs

  • Haskell
    a097933 n = a097933_list !! (n-1)
    a097933_list = [x | x <- a091998_list, a010051 x == 1]
    -- Reinhard Zumkeller, Jan 07 2012
    
  • Magma
    [p: p in PrimesUpTo(1000) | p mod 24 in [1, 11, 13, 23]]; // Vincenzo Librandi, Mar 23 2013
  • Mathematica
    Select[Prime[Range[300]], MemberQ[{1, 11, 13, 23}, Mod[#, 24]]&] (* Vincenzo Librandi, Mar 23 2013 *)
    Select[Prime[Range[2,200]],PowerMod[3,(#-1)/2,#]==1&] (* Harvey P. Dale, Jun 02 2020 *)
  • PARI
    /* s = +-1, d=diff */ ptopm1d2(n,x,d,s) = { forprime(p=3,n,p2=(p-1)/2; y=x^p2 + s*(x-d)^p2; if(y%p==0,print1(p","))) }
    
  • PARI
    {a(n)= local(m, c); if(n<1, 0, c=0; m=0; while( cMichael Somos, Aug 28 2006 */
    

A045331 Primes congruent to {1, 2, 3} mod 6; or, -3 is a square mod p.

Original entry on oeis.org

2, 3, 7, 13, 19, 31, 37, 43, 61, 67, 73, 79, 97, 103, 109, 127, 139, 151, 157, 163, 181, 193, 199, 211, 223, 229, 241, 271, 277, 283, 307, 313, 331, 337, 349, 367, 373, 379, 397, 409, 421, 433, 439, 457, 463, 487, 499, 523, 541, 547, 571, 577, 601, 607, 613
Offset: 1

Views

Author

Keywords

Comments

-3 is a quadratic residue mod a prime p iff p is in this sequence.

Crossrefs

Apart from initial term, same as A007645; apart from initial two terms, same as A002476.
Subsequence of A047246.

Programs

  • Haskell
    a045331 n = a045331_list !! (n-1)
    a045331_list = filter ((< 4) . (`mod` 6)) a000040_list
    -- Reinhard Zumkeller, Jan 15 2013
  • Magma
    [p: p in PrimesUpTo(700) | p mod 6 in [1, 2, 3]]; // Vincenzo Librandi, Aug 08 2012
    
  • Mathematica
    Select[Prime[Range[200]],MemberQ[{1,2,3},Mod[#,6]]&]  (* Harvey P. Dale, Mar 31 2011 *)
    Join[{2,3},Select[Range[7,10^3,6],PrimeQ]] (* Zak Seidov, May 20 2011 *)
  • PARI
    select(n->n%6<5,primes(100)) \\ Charles R Greathouse IV, May 20 2011
    

Extensions

More terms from Henry Bottomley, Aug 10 2000

A057125 Numbers n such that 3 is a square mod n.

Original entry on oeis.org

1, 2, 3, 6, 11, 13, 22, 23, 26, 33, 37, 39, 46, 47, 59, 61, 66, 69, 71, 73, 74, 78, 83, 94, 97, 107, 109, 111, 118, 121, 122, 131, 138, 141, 142, 143, 146, 157, 166, 167, 169, 177, 179, 181, 183, 191, 193, 194, 213, 214, 218, 219, 222, 227, 229, 239, 241, 242
Offset: 1

Views

Author

Henry Bottomley, Aug 10 2000

Keywords

Comments

Numbers that are not multiples of 4 or 9 and for which all prime factors greater than 3 are congruent to +/- 1 mod 12. - Eric M. Schmidt, Apr 21 2013

Examples

			3^2==3 (mod 6), so 6 is a member.
		

Crossrefs

Includes the primes in A038874 and these (primes congruent to {1, 2, 3, 11} mod 12) are the prime factors of the terms in this sequence. Cf. A008784, A057126, A057127, A057128, A057129.
Cf. A057759.

Programs

  • Magma
    [n: n in [1..300] | exists(t){x : x in ResidueClassRing(n) | x^2 eq 3}]; // Vincenzo Librandi, Feb 20 2016
  • Maple
    # Beware: Since 2007 at least and up to Maple 16 at least, the following Maple code returns the wrong answer for n = 6:
    with(numtheory): [seq(`if`(mroot(3,2,n)=FAIL,NULL,n), n=1..400)];
    # second Maple program:
    with(numtheory): mroot(3, 2, 6):=3:
    a:= proc(n) option remember; local m;
          for m from 1+`if`(n=1, 0, a(n-1))
          while mroot(3, 2, m)=FAIL do od; m
        end:
    seq(a(n), n=1..80);  # Alois P. Heinz, Feb 24 2017
  • Mathematica
    Prepend[ Select[ Range[300], Reduce[Mod[3 - k^2, #] == 0, k, Integers] =!= False &], 1]  (* Jean-François Alcover, Sep 20 2012 *)
  • PARI
    isok(n) = issquare(Mod(3,n)); \\ Michel Marcus, Feb 19 2016
    

Extensions

Edited by N. J. A. Sloane, Oct 25 2008 at the suggestion of R. J. Mathar.

A091338 a(n) = (3/n), where (k/n) is the Kronecker symbol.

Original entry on oeis.org

1, -1, 0, 1, -1, 0, -1, -1, 0, 1, 1, 0, 1, 1, 0, 1, -1, 0, -1, -1, 0, -1, 1, 0, 1, -1, 0, -1, -1, 0, -1, -1, 0, 1, 1, 0, 1, 1, 0, 1, -1, 0, -1, 1, 0, -1, 1, 0, 1, -1, 0, 1, -1, 0, -1, 1, 0, 1, 1, 0, 1, 1, 0, 1, -1, 0, -1, -1, 0, -1, 1, 0, 1, -1, 0, -1, -1, 0, -1, -1, 0, 1, 1, 0, 1, 1, 0, -1, -1, 0, -1, 1, 0, -1, 1, 0, 1, -1, 0, 1, -1, 0
Offset: 1

Views

Author

Eric W. Weisstein, Dec 30 2003

Keywords

Comments

a(2n+1) has period 6, i.e., if n == 1 (mod 2) then a(n+12) = a(n). A.H.M. Smeets, Jan 23 2018

Programs

  • Magma
    [KroneckerSymbol(3,n): n in [1..100]]; // Vincenzo Librandi, Aug 16 2016
  • Maple
    A091338 := proc(n)
            numtheory[jacobi](3,n) ;
    end proc: # R. J. Mathar, Nov 03 2011
  • Mathematica
    Table[KroneckerSymbol[3, n], {n, 1, 100}] (* Vincenzo Librandi, Aug 16 2016 *)
  • PARI
    a(n)=kronecker(3,n)
    

Formula

If n==0 (mod 3) a(n)=0; for p ==1 or 11 (mod 12) (i.e., p>3 in A038874), a(p)=+1; for p==2, 5 or 7 (mod 12) (i.e., p in A038875), a(p)=-1. - Benoit Cloitre, Jan 03 2004
From A.H.M. Smeets, Aug 01 2018: (Start)
Conjecture:
a(n) = 0 if and only if (n mod 3 = 0),
a(n) = 1 if (n mod 12 = 1 or n mod 12 = 11 or n mod 48 = 4 or n mod 48 = 44),
a(n) = -1 if (n mod 12 = 5 or n mod 12 = 7 or n mod 48 = 20 or n mod 48 = 28),
a(2) = -1, a(12*n+10) = -a(12*n+2) and a(12*n+14) = a(12*n+10) for n >= 0,
a(24*n+8) = -a(12*n+4) and a(24*n+16) = -a(12*n+4) for n >= 0. (End)
From A.H.M. Smeets, Aug 01 2018: (Start)
a(2*n+1) = 1 if and only if (n mod 6 = 0 or n mod 6 = 5),
a(2*n+1) = -1 if and only if (n mod 6 = 2 or n mod 6 = 3),
a(2*n+1) = 0 if and only if n mod 3 = 1,
a(2*n) = -a(n). (End)

Extensions

More terms from Benoit Cloitre, Jan 03 2004

A040101 Primes p such that x^4 = 3 has a solution mod p.

Original entry on oeis.org

2, 3, 11, 13, 23, 47, 59, 71, 83, 107, 109, 131, 167, 179, 181, 191, 193, 227, 229, 239, 251, 263, 277, 311, 313, 347, 359, 383, 419, 421, 431, 433, 443, 467, 479, 491, 503, 541, 563, 577, 587, 599, 601, 647, 659
Offset: 1

Views

Author

Keywords

Comments

Union of 2, 3, A068231 (primes congruent to 11 modulo 12), primes p == 1 (mod 4) such that 3^((p-1)/4) == 1 (mod p). - Jianing Song, Jun 22 2025

Crossrefs

A subsequence of A038874.
A068231 < A385220 < A045317 < this sequence < A097933 (ignoring terms 2, 3), where Ax < Ay means that Ax is a subsequence of Ay.

Programs

  • Magma
    [p: p in PrimesUpTo(800) | exists(t){x : x in ResidueClassRing(p) | x^4 eq 3}]; // Vincenzo Librandi, Sep 11 2012
    
  • Mathematica
    ok [p_]:=Reduce[Mod[x^4- 3, p] == 0, x, Integers] =!= False;  Select[Prime[Range[200]], ok] (* Vincenzo Librandi, Sep 11 2012 *)
  • PARI
    isA040101(p) = isprime(p) && (p==2 || p==3 || p%12==11 || (p%4==1 && Mod(3, p)^((p-1)/4) == 1)) \\ Jianing Song, Jun 22 2025

A164624 Primes p such that p + Floor[p/2] + Floor[p/3] is prime.

Original entry on oeis.org

2, 3, 11, 13, 23, 37, 59, 83, 109, 131, 181, 191, 193, 229, 311, 337, 373, 383, 397, 443, 479, 541, 563, 599, 613, 743, 769, 877, 911, 983, 1019, 1021, 1031, 1091, 1093, 1129, 1153, 1163, 1237, 1283, 1297, 1319, 1381, 1451, 1453, 1489, 1523, 1559, 1571, 1597
Offset: 1

Views

Author

Keywords

Comments

11+5+3=19, 13+6+4=23, 23+11+7=41, ..

Crossrefs

Subsequence of A038874. Cf. A038874, A097933

Programs

  • Mathematica
    lst={};Do[p=Prime[n];If[PrimeQ[p+Floor[p/2]+Floor[p/3]],AppendTo[lst,p]],{n,2*6!}];lst

Extensions

Edited by Charles R Greathouse IV, Nov 02 2009

A164625 Primes p such that p+floor(p/2)+floor(p/3)+floor(p/5) is also prime.

Original entry on oeis.org

2, 3, 7, 19, 83, 89, 127, 137, 139, 181, 251, 257, 311, 317, 373, 379, 449, 491, 499, 503, 509, 673, 733, 797, 853, 857, 863, 919, 971, 983, 1033, 1039, 1049, 1093, 1151, 1201, 1217, 1399, 1453, 1579, 1583, 1627, 1697, 1741, 1871, 1933, 1993, 2129, 2237, 2281
Offset: 1

Views

Author

Keywords

Examples

			For p=7, 7+3+2+1=13 is prime, which admits 7=a(4) to the sequence.
For p=19, 19+9+6+3=37 is prime, which puts 19=a(5) into the sequence.
		

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=Prime[n];If[PrimeQ[p+Floor[p/2]+Floor[p/3]+Floor[p/5]],AppendTo[lst, p]],{n,2*6!}];lst
    Select[Prime[Range[350]],PrimeQ[Total[Floor[#/{2,3,5}]]+#]&] (* Harvey P. Dale, Feb 19 2012 *)

Extensions

Comments rephrased as examples by R. J. Mathar, Aug 20 2009

A296933 Primes p such that Legendre(3,p) = 0 or 1.

Original entry on oeis.org

3, 11, 13, 23, 37, 47, 59, 61, 71, 73, 83, 97, 107, 109, 131, 157, 167, 179, 181, 191, 193, 227, 229, 239, 241, 251, 263, 277, 311, 313, 337, 347, 349, 359, 373, 383, 397, 409, 419, 421, 431, 433, 443, 457, 467, 479, 491, 503, 541, 563, 577
Offset: 1

Views

Author

N. J. A. Sloane, Dec 26 2017

Keywords

Crossrefs

This is A038874 without the initial 2.

Programs

  • Maple
    # Load the Maple program HH given in A296920. Then run HH(3, 200); This produces A097933, A003630, this sequence, and A038875.
  • Mathematica
    Join[{3}, Select[Prime[Range[200]], JacobiSymbol[3, #] == 1 &]] (* Paolo Xausa, May 11 2024 *)
Showing 1-10 of 10 results.