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

A002476 Primes of the form 6m + 1.

Original entry on oeis.org

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, 619
Offset: 1

Views

Author

Keywords

Comments

Equivalently, primes of the form 3m + 1.
Rational primes that decompose in the field Q(sqrt(-3)). - N. J. A. Sloane, Dec 25 2017
Primes p dividing Sum_{k=0..p} binomial(2k, k) - 3 = A006134(p) - 3. - Benoit Cloitre, Feb 08 2003
Primes p such that tau(p) == 2 (mod 3) where tau(x) is the Ramanujan tau function (cf. A000594). - Benoit Cloitre, May 04 2003
Primes of the form x^2 + xy - 2y^2 = (x+2y)(x-y). - N. J. A. Sloane, May 31 2014
Primes of the form x^2 - xy + 7y^2 with x and y nonnegative. - T. D. Noe, May 07 2005
Primes p such that p^2 divides Sum_{m=1..2(p-1)} Sum_{k=1..m} (2k)!/(k!)^2. - Alexander Adamchuk, Jul 04 2006
A006512 larger than 5 (Greater of twin primes) is a subsequence of this. - Jonathan Vos Post, Sep 03 2006
A039701(A049084(a(n))) = A134323(A049084(a(n))) = 1. - Reinhard Zumkeller, Oct 21 2007
Also primes p such that the arithmetic mean of divisors of p^2 is an integer: sigma_1(p^2)/sigma_0(p^2) = C. (A000203(p^2)/A000005(p^2) = C). - Ctibor O. Zizka, Sep 15 2008
Fermat knew that these numbers can also be expressed as x^2 + 3y^2 and are therefore not prime in Z[omega], where omega is a complex cubic root of unity. - Alonso del Arte, Dec 07 2012
Primes of the form x^2 + xy + y^2 with x < y and nonnegative. Also see A007645 which also applies when x=y, adding an initial 3. - Richard R. Forberg, Apr 11 2016
For any term p in this sequence, let k = (p^2 - 1)/6; then A016921(k) = p^2. - Sergey Pavlov, Dec 16 2016; corrected Dec 18 2016
For the decomposition p=x^2+3*y^2, x(n) = A001479(n+1) and y(n) = A001480(n+1). - R. J. Mathar, Apr 16 2024

Examples

			Since 6 * 1 + 1 = 7 and 7 is prime, 7 is in the sequence. (Also 7 = 2^2 + 3 * 1^2 = (2 + sqrt(-3))(2 - sqrt(-3)).)
Since 6 * 2 + 1 = 13 and 13 is prime, 13 is in the sequence.
17 is prime but it is of the form 6m - 1 rather than 6m + 1, and is therefore not in the sequence.
		

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. 870.
  • David A. Cox, Primes of the Form x^2 + ny^2. New York: Wiley (1989): 8.
  • 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).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 261.

Crossrefs

For values of m see A024899. Primes of form 3n - 1 give A003627.
These are the primes arising in A024892, A024899, A034936.
A091178 gives prime index.
Subsequence of A016921 and of A050931.
Cf. A004611 (multiplicative closure).

Programs

  • GAP
    Filtered(List([0..110],k->6*k+1),n-> IsPrime(n)); # Muniru A Asiru, Mar 11 2019
  • Haskell
    a002476 n = a002476_list !! (n-1)
    a002476_list = filter ((== 1) . (`mod` 6)) a000040_list
    -- Reinhard Zumkeller, Jan 15 2013
    
  • J
    (#~ 1&p:) >: 6 * i.1000 NB. Stephen Makdisi, May 01 2018
    
  • Magma
    [n: n in [1..700 by 6] | IsPrime(n)]; // Vincenzo Librandi, Apr 05 2011
    
  • Maple
    a := [ ]: for n from 1 to 400 do if isprime(6*n+1) then a := [ op(a), n ]; fi; od: A002476 := n->a[n];
  • Mathematica
    Select[6*Range[100] + 1, PrimeQ[ # ] &] (* Stefan Steinerberger, Apr 06 2006 *)
  • PARI
    select(p->p%3==1,primes(100)) \\ Charles R Greathouse IV, Oct 31 2012
    

Formula

From R. J. Mathar, Apr 03 2011: (Start)
Sum_{n >= 1} 1/a(n)^2 = A175644.
Sum_{n >= 1} 1/a(n)^3 = A175645. (End)
a(n) = 6*A024899(n) + 1. - Zak Seidov, Aug 31 2016
From Vaclav Kotesovec, May 02 2020: (Start)
Product_{k>=1} (1 - 1/a(k)^2) = 1/A175646.
Product_{k>=1} (1 + 1/a(k)^2) = A334481.
Product_{k>=1} (1 - 1/a(k)^3) = A334478.
Product_{k>=1} (1 + 1/a(k)^3) = A334477. (End)
Legendre symbol (-3, a(n)) = +1 and (-3, A007528(n)) = -1, for n >= 1. For prime 3 one sets (-3, 3) = 0. - Wolfdieter Lang, Mar 03 2021

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

A007645 Generalized cuban primes: primes of the form x^2 + xy + y^2; or primes of the form x^2 + 3*y^2; or primes == 0 or 1 (mod 3).

Original entry on oeis.org

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

Also, odd primes p such that -3 is a square mod p. - N. J. A. Sloane, Dec 25 2017
Equivalently, primes of the form p = (x^3 - y^3)/(x - y). If x=y+1 we get the cuban primes A002407, which is therefore a subsequence.
These are not to be confused with the Eisenstein primes, which are the primes in the ring of integers Z[w], where w = (-1+sqrt(-3))/2. The present sequence gives the rational primes which are also Eisenstein primes. - N. J. A. Sloane, Feb 06 2008
Also primes of the form x^2+3y^2 and, except for 3, x^2+xy+7y^2. See A140633. - T. D. Noe, May 19 2008
Conjecture: this sequence is Union(A002383,A162471). - Daniel Tisdale, Jul 04 2009
Primes p such that antiharmonic mean B(p) of the numbers k < p such that gcd(k, p) = 1 is not integer, where B(p) = A053818(p) / A023896(p) = A175505(p) / A175506(p) = (2p - 1) / 3. Primes p such that A175506(p) > 1. Subsequence of A179872. Union a(n) + A179891 = A179872. Example: a(6) = 37 because B(37) = A053818(37) / A023896(37) = A175505(37) / A175506(37) = 16206 / 666 = 73 / 3 (not integer). Cf. A179871, A179872, A179873, A179874, A179875, A179876, A179877, A179878, A179879, A179880, A179882, A179883, A179884, A179885, A179886, A179887, A179890, A179891, A003627, A034934. - Jaroslav Krizek, Aug 01 2010
Subsequence of Loeschian numbers, cf. A003136 and A024614; A088534(a(n)) > 0. - Reinhard Zumkeller, Oct 30 2011
Primes such that there exist a unique x, y, with 1 < x <= y < p, x + y == 1 (mod p) and x * y == 1 (mod p). - Jon Perry, Feb 02 2014
The prime factors of A002061. - Richard R. Forberg, Dec 10 2014
This sequence gives the primes p which solve s^2 == -3 (mod 4*p) (see Buell, Proposition 4.1., p. 50, for Delta = -3). p = 2 is not a solution. x^2 == -3 (mod 4) has solutions for all odd x. x^2 == -3 (mod p) has for odd primes p, not 3, the solutions of Legendre(-3|p) = +1 which are p == {1, 7} (mod 12). For p = 3 the representative solution is x = 0. Hence the solution of s^2 == -3 (mod 4*p) are the odd primes p = 3 and p == {1, 7} (mod 12) (or the primes p = 0, 1 (mod 3)). - Wolfdieter Lang, May 22 2021

References

  • D. A. Buell, Binary Quadratic Forms. Springer-Verlag, NY, 1989, p. 50.
  • Conway, J. H. and Guy, R. K. The Book of Numbers. New York: Springer-Verlag, pp. 220-223, 1996.
  • David A. Cox, "Primes of the Form x^2 + n y^2", Wiley, 1989, p. 7.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • Wagon, S. "Eisenstein Primes." Section 9.8 in Mathematica in Action. New York: W. H. Freeman, pp. 319-323, 1991.

Crossrefs

Subsequence of A003136.
Subsequences include A002407, A002648, and A201477.
Apart from initial term, same as A045331.
Cf. A001479, A001480 (x and y such that a(n) = x^2 + 3y^2).
Primes in A003136 and A034017.

Programs

  • Haskell
    a007645 n = a007645_list !! (n-1)
    a007645_list = filter ((== 1) . a010051) $ tail a003136_list
    -- Reinhard Zumkeller, Jul 11 2013, Oct 30 2011
  • Maple
    select(isprime,[3, seq(6*k+1, k=1..1000)]); # Robert Israel, Dec 12 2014
  • Mathematica
    Join[{3},Select[Prime[Range[150]],Mod[#,3]==1&]] (* Harvey P. Dale, Aug 21 2021 *)
  • PARI
    forprime(p=2,1e3,if(p%3<2,print1(p", "))) \\ Charles R Greathouse IV, Jun 16 2011
    

Formula

p == 0 or 1 (mod 3).
{3} UNION A002476. - R. J. Mathar, Oct 28 2008

Extensions

Entry revised by N. J. A. Sloane, Jan 29 2013

A038874 Primes p such that 3 is a square mod p.

Original entry on oeis.org

2, 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, 587, 599, 601
Offset: 1

Views

Author

Keywords

Comments

Also primes congruent to {1, 2, 3, 11} mod 12.
The subsequence p = 1 (mod 4) corresponds to A068228 and only these entries of a(n) are squares mod 3 (from the quadratic reciprocity law). - Lekraj Beedassy, Jul 21 2004
Largest prime factors of n^2 - 3. - Vladimir Joseph Stephan Orlovsky, Aug 12 2009
Aside from 2 and 3, primes p such that Legendre(3, p) = 1. Bolker asserts there are infinitely many of these primes. - Alonso del Arte, Nov 25 2015
The associated bases of the squares are 1, 0, 5, 4, 7, 15, 12, 11, 8, 28, 21, 13...: 1^2 = 3 -1*2, 0^2 = 3-1*3, 5^2 = 3+ 2*11, 4^2 = 3+1*13, 7^2 = 3+2*23, 15^2 = 3+6*37, 12^2 = 3+3*47,... - R. J. Mathar, Feb 23 2017

Examples

			11 is in the sequence since the equation x^2 - 11y = 3 has solutions, such as x = 5, y = 2.
13 is in the sequence since the equation x^2 - 13y = 3 has solutions, such as x = 4, y = 1.
17 is not in the sequence because x^2 - 17y = 3 has no solutions in integers; Legendre(3, 17) = -1.
		

References

  • Ethan D. Bolker, Elementary Number Theory: An Algebraic Approach. Mineola, New York: Dover Publications (1969, reprinted 2007): p. 74, Theorem 25.3.

Crossrefs

If the first two terms are omitted we get A097933. A040101 is another sequence.

Programs

  • Magma
    [p: p in PrimesUpTo(1200) | p mod 12 in [1, 2, 3, 11]]; // Vincenzo Librandi, Aug 08 2012
    
  • Maple
    select(isprime, [2,3, seq(seq(6+s+12*i, s=[-5,5]),i=0..1000)]); # Robert Israel, Dec 23 2015
  • Mathematica
    Select[Prime[Range[250]], MemberQ[{1, 2, 3, 11}, Mod[#, 12]] &] (* Vincenzo Librandi, Aug 08 2012 *)
    Select[Flatten[Join[{2, 3}, Table[{12n - 1, 12n + 1}, {n, 50}]]], PrimeQ] (* Alonso del Arte, Nov 25 2015 *)
  • PARI
    forprime(p=2, 1e3, if(issquare(Mod(3, p)), print1(p , ", "))) \\ Altug Alkan, Dec 04 2015

Formula

a(n) ~ 2n log n. - Charles R Greathouse IV, Nov 29 2016

Extensions

More terms from Henry Bottomley, Aug 10 2000

A045375 Primes congruent to {1, 2} mod 6.

Original entry on oeis.org

2, 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, 619, 631, 643, 661, 673, 691
Offset: 1

Views

Author

Keywords

Comments

Apart from initial term, same as A002476 = A007645 \ {2} = A045331 \ {2,3}. - M. F. Hasler, Apr 25 2008
Primes of the form 6*m - 3/2 -+ 5/2. A045375 UNION A045410 = A000040. - Juri-Stepan Gerasimov, Jan 28 2010

Crossrefs

Cf. A000040 (the primes), A045410 (the primes of the form 6*k-2-+1). - Juri-Stepan Gerasimov, Jan 28 2010

Programs

Extensions

More terms from Vincenzo Librandi, Dec 18 2010

A057128 Numbers n such that -3 is a square mod n.

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 12, 13, 14, 19, 21, 26, 28, 31, 37, 38, 39, 42, 43, 49, 52, 57, 61, 62, 67, 73, 74, 76, 78, 79, 84, 86, 91, 93, 97, 98, 103, 109, 111, 114, 122, 124, 127, 129, 133, 134, 139, 146, 147, 148, 151, 156, 157, 158, 163, 169, 172, 181, 182, 183, 186, 193
Offset: 1

Views

Author

Henry Bottomley, Aug 10 2000

Keywords

Comments

The fact that there are no numbers in this sequence of the form 6k+5 leads to the result that all prime factors of central polygonal numbers (A002061 of the form n^2-n+1) are either 3 or of the form 6k+1. This in turn leads to there being an infinite number of primes of the form 6k+1, since if P=product[all known primes of form 6k+1] then all the prime factors of 9P^2-3P+1 must be unknown primes of form 6k+1.
Numbers that are not multiples of 8 or 9 and for which all prime factors greater than 3 are congruent to 1 mod 6. - Eric M. Schmidt, Apr 21 2013
Numbers that divide at least some member of A117950. - Robert Israel, Feb 19 2016

Examples

			a(7)=13 since -3 mod 13=10 mod 13=6^2 mod 13.
		

Crossrefs

Includes the primes in A045331 and these (primes congruent to {1, 2, 3} mod 6) are the prime factors of the terms in this sequence. Cf. A008784, A057125, A057126, A057127, A057129.
Cf. A117950.

Programs

  • Maple
    select(t -> numtheory:-quadres(-3,t) = 1, {$1..1000}); # Robert Israel, Feb 19 2016
  • Mathematica
    Select[Range[200], IntegerQ[PowerMod[-3, 1/2, #]]&] // Quiet (* Jean-François Alcover, Mar 05 2019 *)
  • PARI
    isok(n) = issquare(Mod(-3,n)); \\ Michel Marcus, Feb 19 2016
  • Sage
    def A057128(n) :
        if n%8==0 or n%9==0: return False
        for (p, m) in factor(n) :
            if p % 6 not in [1, 2, 3] : return False
            return True
    # Eric M. Schmidt, Apr 21 2013
    

A047246 Numbers that are congruent to {0, 1, 2, 3} mod 6.

Original entry on oeis.org

0, 1, 2, 3, 6, 7, 8, 9, 12, 13, 14, 15, 18, 19, 20, 21, 24, 25, 26, 27, 30, 31, 32, 33, 36, 37, 38, 39, 42, 43, 44, 45, 48, 49, 50, 51, 54, 55, 56, 57, 60, 61, 62, 63, 66, 67, 68, 69, 72, 73, 74, 75, 78, 79, 80, 81, 84, 85, 86, 87, 90, 91, 92, 93, 96, 97, 98
Offset: 1

Views

Author

Keywords

Comments

The sequence is the interleaving of A047238 with A047241. - Guenther Schrack, Feb 12 2019

Crossrefs

Cf. A045331 (primes congruent to {1,2,3} mod 6), A047238, A047241.
Complement: A047257.

Programs

  • GAP
    Filtered([0..100],n->n mod 6 = 0 or n mod 6 = 1 or n mod 6 = 2 or n mod 6 = 3); # Muniru A Asiru, Feb 20 2019
  • Haskell
    a047246 n = a047246_list !! (n-1)
    a047246_list = [0..3] ++ map (+ 6) a047246_list
    -- Reinhard Zumkeller, Jan 15 2013
    
  • Magma
    [Floor((6/5)*Floor(5*(n-1)/4)) : n in [1..100]]; // Wesley Ivan Hurt, May 21 2016
    
  • Maple
    A047246:=n->(6*n-9-I^(2*n)-(1-I)*I^(-n)-(1+I)*I^n)/4: seq(A047246(n), n=1..100); # Wesley Ivan Hurt, May 21 2016
  • Mathematica
    Table[(6n-9-I^(2n)-(1-I)*I^(-n)-(1+I)*I^n)/4, {n, 80}] (* Wesley Ivan Hurt, May 21 2016 *)
  • PARI
    my(x='x+O('x^70)); concat([0], Vec(x^2*(1+x+x^2+3*x^3)/((1-x)*(1-x^4)))) \\ G. C. Greubel, Feb 16 2019
    
  • Sage
    a=(x^2*(1+x+x^2+3*x^3)/((1-x)*(1-x^4))).series(x, 72).coefficients(x, sparse=False); a[1:] # G. C. Greubel, Feb 16 2019
    

Formula

G.f.: x^2*(1+x+x^2+3*x^3) / ((1+x)*(1-x)^2*(1+x^2)). - R. J. Mathar, Oct 08 2011
a(n) = floor((6/5)*floor(5*(n-1)/4)). - Bruno Berselli, May 03 2016
From Wesley Ivan Hurt, May 21 2016: (Start)
a(n) = a(n-1) + a(n-4) - a(n-5) for n>5.
a(n) = (6*n - 9 - i^(2*n) - (1-i)*i^(-n) - (1+i)*i^n)/4 where i=sqrt(-1).
a(2*n) = A047241(n), a(2*n-1) = A047238(n). (End)
E.g.f.: (6 + sin(x) - cos(x) + (3*x - 4)*sinh(x) + (3*x - 5)*cosh(x))/2. - Ilya Gutkovskiy, May 21 2016
From Guenther Schrack, Feb 12 2019: (Start)
a(n) = (6*n - 9 - (-1)^n - 2*(-1)^(n*(n+1)/2))/4.
a(n) = a(n-4) + 6, a(1)=0, a(2)=1, a(3)=2, a(4)=3, for n > 4. (End)
Sum_{n>=2} (-1)^n/a(n) = Pi/(6*sqrt(3)) + 2*log(2)/3. - Amiram Eldar, Dec 16 2021
a(n)-a(n-1) = A093148(n-2). - R. J. Mathar, May 01 2024

Extensions

More terms from Wesley Ivan Hurt, May 21 2016

A235473 Primes whose base-3 representation is also the base-4 representation of a prime.

Original entry on oeis.org

2, 43, 61, 67, 97, 103, 127, 139, 151, 157, 199, 211, 229, 277, 283, 331, 337, 349, 373, 379, 433, 439, 463, 499, 523, 571, 601, 607, 727, 751, 787, 823, 853, 883, 919, 991, 1063, 1087, 1117, 1213, 1249, 1327, 1381, 1429, 1483, 1531, 1567, 1597, 1627, 1759, 1783, 1867, 1999
Offset: 1

Views

Author

M. F. Hasler, Jan 12 2014

Keywords

Comments

This sequence is part of a two-dimensional array of sequences, given in the LINK, based on this same idea for any two different bases b, c > 1. Sequence A235265 and A235266 are the most elementary ones in this list. Sequences A089971, A089981 and A090707 through A090721, and sequences A065720 - A065727, follow the same idea with one base equal to 10.
This is a subsequence of A045331 and A045375.

Examples

			43 = 1121_3 and 1121_4 = 89 are both prime, so 43 is a term.
		

Crossrefs

Cf. A235266, A235474, A152079, A235475 - A235479, A065720A036952, A065721 - A065727, A235394, A235395, A089971A020449, A089981, A090707 - A091924, A235461 - A235482. See the LINK for further cross-references.

Programs

  • Mathematica
    Select[Prime[Range[400]],PrimeQ[FromDigits[IntegerDigits[#,3],4]]&] (* Harvey P. Dale, Oct 16 2015 *)
  • PARI
    is(p,b=4,c=3)=isprime(vector(#d=digits(p,c),i,b^(#d-i))*d~)&&isprime(p) \\ Note: This code is only valid for b > c.

A244146 Primes of the form x^2 + x*y + y^2 with x, y primes.

Original entry on oeis.org

19, 67, 79, 109, 163, 199, 349, 433, 457, 607, 691, 739, 937, 997, 1063, 1093, 1327, 1423, 1447, 1489, 1579, 1753, 1777, 1987, 2017, 2089, 2203, 2287, 2383, 2749, 3229, 3463, 3847, 3943, 4051, 4177, 4513, 4567, 5347, 5413, 5479, 5557, 5653, 6079, 6133, 6271, 6661
Offset: 1

Views

Author

Peter Luschny, Jun 21 2014

Keywords

Comments

Equally: primes that are of the form (p+q)^2 - p*q, with p, q primes. - Antti Karttunen, Jun 21 2014

Examples

			The terms 19, 67, 79 and 1777753 are in the sequence because they can be represented as:
19 = 2^2 + 2*3 + 3^2 = (2+3)^2 - 2*3.
67 = 2^2 + 2*7 + 7^2 = (2+7)^2 - 2*7.
79 = 3^2 + 3*7 + 7^2 = (3+7)^2 - 3*7.
1777753 = 677^2 + 677*859 + 859^2 = (677+859)^2 - 677*859.
		

Crossrefs

Subsequence of A007645.
Cf. A045331.

Programs

  • Mathematica
    Reap[For[p = 2, p < 10^4, p = NextPrime[p], If[Reduce[p == x^2 + x y + y^2, {x, y}, Primes] =!= False, Print[p]; Sow[p]]]][[2, 1]] (* Jean-François Alcover, Jul 12 2019 *)

A240920 Prime numbers that occur as divisors of numbers of the form m^2 + 5.

Original entry on oeis.org

2, 3, 5, 7, 23, 29, 41, 43, 47, 61, 67, 83, 89, 101, 103, 107, 109, 127, 149, 163, 167, 181, 223, 227, 229, 241, 263, 269, 281, 283, 307, 347, 349, 367, 383, 389, 401, 409, 421, 443, 449, 461, 463, 467, 487, 503, 509, 521, 523, 541, 547, 563
Offset: 1

Views

Author

J. Lowell, Aug 02 2014

Keywords

Comments

Conjecture: a prime number is in this sequence if and only if its next-to-last digit is even.
The law of quadratic reciprocity shows an odd prime is in the sequence if and only if it is 1, 3, 5, 7 or 9 (mod 20). This proves the above conjecture, so the sequence is the union of {2, 5} and A139513. - Jens Kruse Andersen, Aug 09 2014

Examples

			23 is in the sequence because it divides 8^2+5=69 with m=8.
		

Crossrefs

Cf. A002313 (k=1 or k=4), A033203 (k=2), A045331 (k=3), A139513.

Programs

  • Maple
    isA240920 := proc(p)
        local n;
        if isprime(p) then
            for n from 0 to p do
                if modp(n^2+5,p) = 0 then
                    return true;
                end if;
            end do:
            false;
        else
            false;
        end if;
    end proc:
    for i from 1 to 600 do
        p := ithprime(i) ;
        if isA240920(p) then
            printf("%d,",p);
        end if;
    end do:
  • PARI
    select(p->issquare(Mod(-5,p)), primes(100)) \\ Charles R Greathouse IV, Nov 29 2016

Formula

a(n) ~ 2n log n. - Charles R Greathouse IV, Nov 29 2016
Showing 1-10 of 12 results. Next