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

A002383 Primes of form k^2 + k + 1.

Original entry on oeis.org

3, 7, 13, 31, 43, 73, 157, 211, 241, 307, 421, 463, 601, 757, 1123, 1483, 1723, 2551, 2971, 3307, 3541, 3907, 4423, 4831, 5113, 5701, 6007, 6163, 6481, 8011, 8191, 9901, 10303, 11131, 12211, 12433, 13807, 14281, 17293, 19183, 20023, 20593, 21757, 22651, 23563
Offset: 1

Views

Author

Keywords

Comments

Also primes p such that 4p-3 is square. - Giovanni Teofilatto, Sep 07 2005
Also these primes are sums of 1 and some consecutive even numbers starting at 2; e.g., 31 = 1+2+4+6+8+10. - Labos Elemer, Apr 15 2003
Also primes of form n^2 - n + 1 (Prime central polygonal numbers, A002061). - Zak Seidov, Jan 26 2006
Also primes which are of the form TriangularNumber(n) + TriangularNumber(n+2): 7 = 1+6, 13 = 3+10, 31 = 10+21, 43 = 15+28, 73 = 28+45, ... - Vladimir Joseph Stephan Orlovsky, Apr 03 2009
It is not known whether there are infinitely many primes of the form n^2+n+1. See Rose reference. - Daniel Tisdale, Jun 27 2009
These numbers when >= 7 are prime repunits 111_n in a base n >= 2, so except for 3, they are all Brazilian primes belonging to A085104. (See Links "Les nombres brésiliens", Sections V.4 - V.5.) A002383 is generated by A002384 which lists the bases n of 111_n. A002383 = A053183 Union A185632. - Bernard Schott, Dec 22 2012
Conjecture: the set of these numbers, except 3, is the intersection of sets A085104 and A059055. See A225148. - Thomas Ordowski, May 02 2013
For a(n)>13, the fractional part of square root of a(n) starts with digit 5 (see A034101). - Charles Kusniec, Sep 06 2022

References

  • D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, p. 46.
  • L. Poletti, Le serie dei numeri primi appartenente alle due forme quadratiche (A) n^2+n+1 e (B) n^2+n-1 per l'intervallo compreso entro 121 milioni, e cioè per tutti i valori di n fino a 11000, Atti della Reale Accademia Nazionale dei Lincei, Memorie della Classe di Scienze Fisiche, Matematiche e Naturali, s. 6, v. 3 (1929), pages 193-218.
  • H. E. Rose, A Course in Number Theory, Clarendon Press, 1988, p. 217.
  • 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. A237037, A237038, A237039, A237040 (from semiprimes of form n^3 + 1).
See also A034101.

Programs

  • Magma
    [ a: n in [1..100] | IsPrime(a) where a is n^2+n+1 ]; // Wesley Ivan Hurt, Jun 16 2014
    
  • Maple
    select(isprime, [j^2+j+1$j=1..200])[];  # Alois P. Heinz, Apr 20 2022
  • Mathematica
    Select[Table[n^2+n+1, {n,250}], PrimeQ] (* Harvey P. Dale, Mar 23 2012 *)
  • PARI
    list(lim)=select(n->isprime(n),vector((sqrt(4*lim-3)-1)\2,k,k^2+k+1)) \\ Charles R Greathouse IV, Jul 25 2011
    
  • Python
    from sympy import isprime
    print(list(filter(isprime, (n**2 + n + 1 for n in range(150))))) # Michael S. Branicky, Apr 20 2022

Formula

a(n) = A002384(n)^2 + A002384(n) + 1 = (A088503(n-1)^2 + 3)/4 = (A110284(n) + 3)/4. - Ray Chandler, Sep 07 2005

Extensions

Extended by Ray Chandler, Sep 07 2005

A053183 Primes of the form p^2 + p + 1 when p is prime.

Original entry on oeis.org

7, 13, 31, 307, 1723, 3541, 5113, 8011, 10303, 17293, 28057, 30103, 86143, 147073, 459007, 492103, 552793, 579883, 598303, 684757, 704761, 735307, 830833, 1191373, 1204507, 1353733, 1395943, 1424443, 1482307, 1886503, 2037757
Offset: 1

Views

Author

Enoch Haga, Mar 01 2000

Keywords

Comments

Also primes in A001001. - Philippe Deléham, Feb 21 2004
This sequence is a subsequence of A002383. These numbers are repunit primes 111_n, so they are Brazilian primes belonging to A085104. - Bernard Schott, Dec 21 2012
Also, primes in A060800. - Zak Seidov, Mar 21 2014
Also subsequence of A002061, A193574. - Hartmut F. W. Hoft, May 05 2017
As p^2 + p + 1 is the sum of divisors of p^2 for any prime p, this is a subsequence of A023195. - Peter Munn, Feb 16 2018

Crossrefs

Programs

  • Mathematica
    a053183[n_] := Select[Map[Prime[#]^2 + Prime[#] + 1&, Range[n]], PrimeQ]
    a053183[225] (* data *) (* Hartmut F. W. Hoft, May 05 2017 *)
    Select[Table[p^2+p+1,{p,Prime[Range[300]]}],PrimeQ] (* Harvey P. Dale, Aug 15 2017 *)

Formula

a(n) = A053182(n)^2 + A053182(n) + 1.

A285017 Primes of the form 1 + n + n^2 + n^3 + ... + n^k, n > 1, k > 1 where n is not prime.

Original entry on oeis.org

43, 73, 157, 211, 241, 421, 463, 601, 757, 1123, 1483, 2551, 2971, 3307, 3907, 4423, 4831, 5701, 6007, 6163, 6481, 8191, 9901, 11131, 12211, 12433, 13807, 14281, 19183, 20023, 20593, 21757, 22621, 22651, 23563, 24181, 26083, 26407, 27061, 28393, 31153, 35533
Offset: 1

Views

Author

Bernard Schott, Apr 08 2017

Keywords

Comments

These numbers are Brazilian primes belonging to A085104.
Brazilian primes with n prime are A023195, except 3 which is not Brazilian.
A085104 = This sequence Union { A023195 \ number 3 }.
k + 1 is necessarily prime, but that's not sufficient: 1 + 10 + 100 = 111.
Most of these terms come from A185632 which are prime numbers 111_n with n no prime, the first other term is 22621 = 11111_12, the next one is 245411 = 11111_22.
Number of terms < 10^k: 0, 2, 9, 23, 64, 171, 477, 1310, 3573, 10098, ..., . - Robert G. Wilson v, Apr 15 2017

Examples

			157 = 12^2 + 12 + 1 = 111_12 is prime and 12 is composite.
		

Crossrefs

Programs

  • Maple
    N:= 40000: # to get all terms <= N
    res:= NULL:
    for k from 2 to ilog2(N) do if isprime(k) then
      for n from 2 do
        p:= (n^(k+1)-1)/(n-1);
        if p > N then break fi;
        if isprime(p) and not isprime(n) then res:= res, p fi
    od fi od:
    res:= {res}:
    sort(convert(res,list)); # Robert Israel, Apr 14 2017
  • Mathematica
    mx = 36000; g[n_] := Select[Drop[Accumulate@Table[n^ex, {ex, 0, Log[n, mx]}], 2], PrimeQ]; k = 1; lst = {}; While[k < Sqrt@mx, If[CompositeQ@k, AppendTo[lst, g@k]; lst = Sort@Flatten@lst]; k++]; lst (* Robert G. Wilson v, Apr 15 2017 *)
  • PARI
    isok(n) = {if (isprime(n), forcomposite(b=2, n, d = digits(n, b); if ((#d > 2) && (vecmin(d) == 1) && (vecmax(d)== 1), return(1)););); return(0);} \\ Michel Marcus, Apr 09 2017
    
  • PARI
    A285017_vec(n)={my(h=vector(n,i,1),y,c,z=4,L:list);L=List();forprime(x=3,,forcomposite(m=z,x-1,y=digits(x,m);if((y==h[1..#y])&&2<#y,listput(L,x);z=m;if(c++==n,return(Vec(L))))))} \\ R. J. Cano, Apr 18 2017

A182253 Nonprime numbers n such that n^2 + n + 1 is prime.

Original entry on oeis.org

1, 6, 8, 12, 14, 15, 20, 21, 24, 27, 33, 38, 50, 54, 57, 62, 66, 69, 75, 77, 78, 80, 90, 99, 105, 110, 111, 117, 119, 138, 141, 143, 147, 150, 153, 155, 161, 162, 164, 168, 176, 188, 189, 192, 194, 203, 206, 209, 215, 218, 231, 236, 245, 246, 266, 272, 278
Offset: 1

Views

Author

Bernard Schott, Dec 18 2012

Keywords

Comments

All these numbers are in A002384 but not in A053182.
The generated prime numbers n^2 + n + 1 are in A185632.
All the generated numbers n^2 + n + 1 = 111_n are by definition Brazilian numbers: A125134. See Links: "Les nombres brésiliens" - Section V.5 page 35.

Crossrefs

Programs

  • Mathematica
    Select[Range@ 280, And[! PrimeQ@ #, PrimeQ[#^2 + # + 1]] &] (* Michael De Vlieger, Jul 30 2017 *)
  • PARI
    isok(n) = ! isprime(n) && isprime(n^2 + n + 1); \\ Michel Marcus, Sep 04 2013

A193366 Primes of the form n^4 + n^3 + n^2 + n + 1 where n is nonprime.

Original entry on oeis.org

5, 22621, 245411, 346201, 637421, 837931, 2625641, 3835261, 6377551, 15018571, 16007041, 21700501, 30397351, 35615581, 52822061, 78914411, 97039801, 147753211, 189004141, 195534851, 209102521, 223364311, 279086341, 324842131, 421106401, 445120421, 566124791, 693025471, 727832821, 745720141, 880331261, 943280801, 987082981, 1544755411, 1740422941
Offset: 1

Views

Author

Jonathan Vos Post, Dec 20 2012

Keywords

Comments

Note that there are no primes of the form n^3 + n^2 + n + 1 = (n+1)*(n^2+1) as irreducible components over Z.
From Bernard Schott, May 15 2017: (Start)
These are the primes associated with A286094.
A088548 = A190527 Union {This sequence}.
All the numbers of this sequence n^4 + n^3 + n^2 + n + 1 = 11111_n with n > 1 are Brazilian numbers, so belong to A125134 and A085104. (End)

Examples

			a(1) = 1^4 + 1^3 + 1^2 + 1 + 1 = 5.
a(2) = 12^4 + 12^3 + 12^2 + 12 + 1 = 22621.
		

Crossrefs

Programs

  • Maple
    for n from 1 to 150 do p(n):= 1+n+n^2+n^3+n^4;
    if tau(n)>2 and isprime(p(n)) then print(n,p(n)) else fi od: # Bernard Schott, May 15 2017
  • Mathematica
    Select[Map[Total[#^Range[0, 4]] &, Select[Range@ 204, ! PrimeQ@ # &]], PrimeQ] (* Michael De Vlieger, May 15 2017 *)
  • PARI
    print1(5);forcomposite(n=4,1e3,if(isprime(t=n^4+n^3+n^2+n+1),print1(", "t))) \\ Charles R Greathouse IV, Mar 25 2013

Formula

{n^4 + n^3 + n^2 + n + 1 where n is in A018252}.

A194194 Primes of the form n^6 + n^5 + n^4 + n^3 + n^2 + n + 1 where n is nonprime.

Original entry on oeis.org

7, 55987, 8108731, 321272407, 3092313043, 4201025641, 9684836827, 31401724537, 47446779661, 83925549247, 100343116693, 141276239497, 265462278481, 438668366137, 654022685443, 742912017121, 2333350772341, 3324554405047, 4033516174507, 4432676798593, 9752186278927, 14505760086637, 15656690128843, 16882733081761
Offset: 1

Views

Author

Jonathan Vos Post, Dec 20 2012

Keywords

Comments

Subset of A088550. The n in A018252 for which n^6 + n^5 + n^4 + n^3 + n^2 + n + 1 are prime begin 1, 6, 14, 26, 38, 40.

Examples

			a(1) = 1^6 + 1^5 + 1^4 + 1^3 + 1^2 + 1 + 1 = 7.
a(2) = 6^6 + 6^5 + 6^4 + 6^3 + 6^2 + 6 + 1 = 55987.
a(3) = 14^6 + 14^5 + 14^4 + 14^3 + 14^2 + 14 + 1 = 8108731.
a(4) = 26^6 + 26^5 + 26^4 + 26^3 + 26^2 + 26 + 1 = 321272407.
		

Crossrefs

Programs

  • Mathematica
    With[{nn=200},Select[Total[#^Range[0,6]]&/@Complement[Range[nn], Prime[ Range[PrimePi[nn]]]],PrimeQ]] (* Harvey P. Dale, Nov 15 2013 *)

A198244 Primes of the form k^10 + k^9 + k^8 + k^7 + k^6 + k^5 + k^4 + k^3 + k^2 + k + 1 where k is nonprime.

Original entry on oeis.org

11, 10778947368421, 17513875027111, 610851724137931, 614910264406779661, 22390512687494871811, 22793803793211153712637, 79905927161140977116221, 184251916941751188170917, 319465039747605973452001, 1311848376806967295019263, 1918542715220370688851293
Offset: 1

Views

Author

Jonathan Vos Post, Dec 21 2012

Keywords

Comments

Subsequence of A060885.
From Bernard Schott, Nov 01 2019: (Start)
These are the primes associated with the terms k of A308238.
A162861 = A286301 Union {this sequence}.
The numbers of this sequence R_11 = 11111111111_k with k > 1 are Brazilian primes, so belong to A085104. (End)

Examples

			10778947368421 is in the sequence since 10778947368421 = 20^10 + 20^9 + 20^8 + 20^7 + 20^6 + 20^5 + 20^4 + 20^3 + 20^2 + 20 + 1, 20 is not prime, and 10778947368421 is prime.
		

Crossrefs

Similar to A185632 (k^2+ ...), A193366 (k^4+ ...), A194194 (k^6+ ...).

Programs

  • Magma
    [a: n in [0..500] | not IsPrime(n) and IsPrime(a) where a is (n^10+n^9+n^8+n^7+n^6+n^5+n^4+n^3+n^2+n+1)]; // Vincenzo Librandi, Nov 09 2014
    
  • Maple
    f:= proc(n)
    local p,j;
    if isprime(n) then return NULL fi;
    p:= add(n^j,j=0..10);
    if isprime(p) then p else NULL fi
    end proc:
    map(f, [$1..1000]); # Robert Israel, Nov 19 2014
  • PARI
    forcomposite(n=0,10^3,my(t=sum(k=0,10,n^k));if(isprime(t),print1(t,", "))); \\ Joerg Arndt, Nov 10 2014
  • Python
    from sympy import isprime
    A198244_list, m = [], [3628800, -15966720, 28828800, -27442800, 14707440, -4379760, 665808, -42240, 682, 0, 1]
    for n in range(1,10**4):
        for i in range(10):
            m[i+1]+= m[i]
        if not isprime(n) and isprime(m[-1]):
            A198244_list.append(m[-1]) # Chai Wah Wu, Nov 09 2014
    

Formula

{A060885(A018252(n)) which are in A000040}.

Extensions

a(5)-a(6) from Robert G. Wilson v, Dec 21 2012
a(7) from Michael B. Porter, Dec 27 2012
Corrected terms a(6)-a(7) and added terms by Chai Wah Wu, Nov 09 2014

A193144 Primes of the form n^2 + n + 1, where n is semiprime.

Original entry on oeis.org

43, 211, 241, 463, 1123, 1483, 3307, 3907, 4831, 6007, 12433, 14281, 20023, 20593, 24181, 26083, 37831, 41413, 42643, 43891, 46441, 47743, 77563, 82657, 95791, 98911, 108571, 145543, 156421, 158803, 200257, 205663, 239611, 284623, 288907, 304153, 307471
Offset: 1

Views

Author

Jonathan Vos Post, Dec 19 2012

Keywords

Comments

This is to semiprimes A001358 as A185632 is to nonprimes A018252.

Examples

			43 is in the sequence because it is prime, and 43 = 6^2 + 6 + 1 where 6 = 2*3 is semiprime.
		

Crossrefs

Programs

  • Mathematica
    Select[#^2+#+1&/@Select[Range[1000],PrimeOmega[#]==2&],PrimeQ] (* Harvey P. Dale, Jan 06 2013 *)

Formula

{k: k is in A001358 and n^2 + n + 1 is in A000040}.
Showing 1-8 of 8 results.