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.

Previous Showing 21-30 of 38 results. Next

A236475 Numbers k such that k^3 + k - 1 is prime.

Original entry on oeis.org

3, 4, 7, 10, 15, 16, 18, 21, 25, 27, 33, 36, 39, 43, 46, 51, 52, 55, 63, 73, 78, 81, 87, 93, 94, 96, 100, 103, 105, 109, 112, 115, 117, 120, 124, 127, 129, 135, 139, 145, 150, 151, 165, 166, 171, 178, 189, 192, 198, 199
Offset: 1

Views

Author

Derek Orr, Jan 26 2014

Keywords

Examples

			46^3 + 46 - 1 = 97381 is prime. So 46 is a member of this sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[200],PrimeQ[#^3+#-1]&] (* Harvey P. Dale, Sep 02 2022 *)
  • PARI
    s=[]; for(n=1, 500, if(isprime(n^3+n-1), s=concat(s, n))); s \\ Colin Barker, Jan 27 2014
  • Python
    import sympy
    from sympy import isprime
    {print(n) for n in range(10**3) if isprime(n**3+n-1)}
    

A057683 Numbers k such that k^2 + k + 1, k^3 + k + 1 and k^4 + k + 1 are all prime.

Original entry on oeis.org

1, 2, 5, 6, 12, 69, 77, 131, 162, 426, 701, 792, 1221, 1494, 1644, 1665, 2129, 2429, 2696, 3459, 3557, 3771, 4350, 4367, 5250, 5670, 6627, 7059, 7514, 7929, 8064, 9177, 9689, 10307, 10431, 11424, 13296, 13299, 13545, 14154, 14286, 14306, 15137
Offset: 1

Views

Author

Harvey P. Dale, Oct 20 2000

Keywords

Comments

After a(0) = 1, k^5 + k + 1 is never prime. Proof: k^5 + k + 1 = (k^2 + k + 1)*(k^3 - k^2 + 1). - Jonathan Vos Post, Oct 17 2007, edited by Robert Israel, Aug 01 2016
For n > 1, no terms == 1 (mod 3) or == 3 (mod 5). - Robert Israel, Jul 31 2016

Examples

			5 is included because 5^2 + 5 + 1 = 31, 5^3 + 5 + 1 = 131 and 5^4 + 5 + 1 = 631 are all prime.
		

Crossrefs

Cf. A049407.
Cf. Subsequence of A219117; A010051.

Programs

  • Haskell
    a057683 n = a057683_list !! (n-1)
    a057683_list = filter (all (== 1) . p) [1..] where
       p x = map (a010051 . (+ (x + 1)) . (x ^)) [2..4]
    -- Reinhard Zumkeller, Nov 12 2012
    
  • Magma
    [n: n in [0..20000]|IsPrime(n^2+n+1) and IsPrime(n^3+n+1) and IsPrime(n^4+n+1)] // Vincenzo Librandi, Dec 20 2010
    
  • Maple
    select(n -> isprime(n^4+n+1) and isprime(n^3+n+1) and isprime(n^2+n+1), [$1..50000]); # Robert Israel, Jul 31 2016
  • Mathematica
    Select[Range[16000],And@@PrimeQ/@(Table[n^i+n+1,{i,2,4}]/.n->#)&]  (* Harvey P. Dale, Mar 28 2011 *)
  • Python
    from sympy import isprime
    A057683_list = [n for n in range(10**5) if isprime(n**2+n+1) and isprime(n**3+n+1) and isprime(n**4+n+1)] # Chai Wah Wu, Apr 02 2021

A124186 Numbers n such that 1 + n + n^3 + n^5 + n^7 + n^9 + n^11 + ... + n^27 + n^29 + n^31 is prime.

Original entry on oeis.org

1, 16, 25, 27, 93, 121, 187, 211, 267, 402, 420, 480, 601, 612, 631, 646, 667, 906, 916, 982, 1023, 1083, 1131, 1221, 1248, 1297, 1326, 1365, 1485, 1518, 1683, 1687, 1806, 1816, 1840, 1881, 1975, 1978, 2001, 2070, 2098, 2187, 2275, 2376, 2382, 2478, 2563, 2643, 2836, 3037, 3043
Offset: 1

Views

Author

Artur Jasinski, Dec 13 2006

Keywords

Comments

n can't be congruent to 2 mod 3, nor to 4 mod 5. - Robert Israel, Jun 24 2014

Crossrefs

Cf. A049407, similar sequences listed in A244376.

Programs

  • Magma
    [n: n in [0..5000] | IsPrime(s) where s is 1+&+[n^i: i in [1..31 by 2]]]; // Vincenzo Librandi, Jun 28 2014
    
  • Maple
    filter:= n -> isprime(1+add(n^(2*k+1),k=0..15));
    select(filter, [$1..10000]); # Robert Israel, Jun 24 2014
  • Mathematica
    Select[Range[100], PrimeQ[1 + Sum[#^(2k + 1), {k, 0, 15}]] &] (* Alonso del Arte, Jun 24 2014 *)
    Select[Range[4000], PrimeQ[Total[#^Range[1, 31, 2]] + 1] &] (* Vincenzo Librandi, Jun 28 2014 *)
  • PARI
    for(n=1,10^4,if(ispseudoprime(sum(i=0,15,n^(2*i+1))+1),print1(n,", "))) \\ Derek Orr, Jun 24 2014
    
  • Sage
    i,n = var('i,n')
    [n for n in (1..3100) if is_prime(1+(n^(2*i+1)).sum(i,0,15))] # Bruno Berselli, Jun 28 2014

Extensions

a(46)-a(51) from Derek Orr, Jun 24 2014

A124206 Numbers n such that 1 + n + n^3 + n^5 + n^7 + n^9 + n^11 + n^13 + n^15 + n^17 + n^19 + n^21 + n^23 + n^25 + n^27 + n^29 + n^31 + n^33 + n^35 + n^37 + n^39 + n^41 + n^43 + n^45 + n^47 + n^49 + n^51 is prime.

Original entry on oeis.org

12, 140, 212, 315, 455, 512, 560, 660, 687, 807, 947, 1005, 1007, 1097, 1128, 1152, 1182, 1301, 1427, 1442, 1491, 1571, 1755, 1787, 1860, 2258, 2346, 2400, 2616, 2712, 2757, 2810, 3015, 3120, 3233, 3318, 3431, 3528, 3756, 3797, 3827, 3966, 4038, 4071
Offset: 1

Views

Author

Artur Jasinski, Dec 13 2006

Keywords

Crossrefs

Cf. A049407, similar sequences listed in A244376.

Programs

  • Magma
    [n: n in [0..5000] | IsPrime(s) where s is 1+&+[n^i: i in [1..51 by 2]]]; // Vincenzo Librandi, Jun 28 2014
  • Mathematica
    Do[If[PrimeQ[1 + n + n^3 + n^5 + n^7 + n^9 + n^11 + n^13 + n^15 + n^17 + n^19 + n^21 + n^23 + n^25 + n^27 + n^29 + n^31 + n^33 + n^35 + n^37 + n^39 + n^41 + n^43 + n^45 + n^47 + n^49 + n^51], Print[n]], {n, 1, 2400}]
    Select[Range[6000], PrimeQ[Total[#^Range[1, 51, 2]] + 1] &] (* Vincenzo Librandi, Jun 28 2014 *)

A124207 Numbers n such that 1 + n + n^3 + n^5 + n^7 + n^9 + n^11 + ... + n^53 + n^55 is prime.

Original entry on oeis.org

1, 186, 256, 325, 763, 853, 916, 1239, 1297, 1398, 1500, 1669, 1878, 1992, 2373, 2503, 2536, 2578, 2626, 2740, 2823, 2836, 2841, 2926, 2958, 3193, 3255, 3381, 3447, 3738, 3843, 3903, 4095, 4156, 4246, 4321, 4407, 4530, 4540, 4572, 4855, 5190, 5322, 5361, 5530
Offset: 1

Views

Author

Artur Jasinski, Dec 13 2006

Keywords

Crossrefs

Cf. A049407, similar sequences listed in A244376.

Programs

  • Magma
    [n: n in [0..6000] | IsPrime(s) where s is 1+&+[n^i: i in [1..55 by 2]]]; // Vincenzo Librandi, Jun 28 2014
  • Maple
    a:= proc(n) option remember; local k;
          for k from 1+ a(n-1) while
            not isprime(1+(k^57-k)/(k^2-1)) do od; k
        end: a(1):=1:
    seq(a(n), n=1..30);  # Alois P. Heinz, Jun 26 2014
  • Mathematica
    Do[If[PrimeQ[1 + n + n^3 + n^5 + n^7 + n^9 + n^11 + n^13 + n^15 + n^17 + n^19 + n^21 + n^23 + n^25 + n^27 + n^29 + n^31 + n^33 + n^35 + n^37 + n^39 + n^41 + n^43 + n^45 + n^47 + n^49 + n^51 + n^53 + n^55], Print[n]],{n, 1, 2400}]
    Select[Range[6000], PrimeQ[Total[#^Range[1, 55, 2]] + 1] &] (* Vincenzo Librandi, Jun 28 2014 *)
  • PARI
    for(n=1,10^4,if(ispseudoprime(sum(i=0,27,n^(2*i+1))+1),print1(n,", "))) \\ Derek Orr, Jun 24 2014
    

Extensions

a(42) and beyond from Derek Orr, Jun 24 2014

A124208 Numbers n such that 1 + n + n^3 + n^5 + n^7 + n^9 + n^11 + n^13 + n^15 + n^17 + n^19 + n^21 + n^23 + n^25 + n^27 + n^29 + n^31 + n^33 + n^35 + n^37 + n^39 + n^41 + n^43 + n^45 + n^47 + n^49 + n^51 + n^53 + n^55 + n^57 + n^59 is prime.

Original entry on oeis.org

1, 2, 34, 43, 64, 76, 80, 160, 194, 276, 416, 620, 625, 832, 996, 1022, 1251, 1341, 1345, 1356, 1435, 1461, 1475, 1672, 1694, 1700, 1733, 1769, 1777, 1782, 1796, 1808, 1997, 2144, 2239, 2245, 2260, 2270, 2273, 2411, 2573, 2659, 2679, 2829, 3396, 3497, 3516
Offset: 1

Views

Author

Artur Jasinski, Dec 13 2006

Keywords

Crossrefs

Cf. A049407, similar sequences listed in A244376.

Programs

  • Magma
    [n: n in [0..5000] | IsPrime(s) where s is 1+&+[n^i: i in [1..59 by 2]]]; // Vincenzo Librandi, Jun 28 2014
  • Mathematica
    Do[If[PrimeQ[1 + n + n^3 + n^5 + n^7 + n^9 + n^11 + n^13 + n^15 + n^17 + n^19 + n^21 + n^23 + n^25 + n^27 + n^29 + n^31 + n^33 + n^35 + n^37 + n^39 + n^41 + n^43 + n^45 + n^47 + n^49 + n^51 + n^53 + n^55 + n^57 + n^59],Print[n]],{n,1,2400}]
    Select[Range[5000], PrimeQ[Total[#^Range[1, 59, 2]] + 1] &] (* Vincenzo Librandi, Jun 28 2014 *)

A236526 Numbers k such that k^3 + k +- 1 are twin primes.

Original entry on oeis.org

3, 15, 18, 21, 39, 87, 117, 120, 135, 243, 360, 366, 381, 426, 429, 615, 642, 723, 879, 1002, 1023, 1170, 1173, 1224, 1458, 1506, 1518, 1530, 1731, 1896, 1920, 1965, 2007, 2025, 2058, 2133, 2160, 2376, 2379, 2382, 2406, 2553, 2577, 2673, 2703, 2727
Offset: 1

Views

Author

Derek Orr, Jan 27 2014

Keywords

Comments

The only prime in this sequence is a(1) = 3.

Examples

			381^3 + 381 +- 1 (55305961 and 55305959, respectively) are both prime. Thus, 381 is a member of this sequence.
		

Crossrefs

Intersection of A049407 and A236475.

Programs

  • Magma
    [n: n in [1..5*10^3] |IsPrime(n^3+n-1) and IsPrime(n^3 +n+1)]; // Vincenzo Librandi, Dec 26 2015
    
  • Mathematica
    Select[Range[3000], PrimeQ[#^3 + # - 1] && PrimeQ[#^3 + # + 1] &] (* Vincenzo Librandi, Dec 26 2015 *)
    Select[Range[3000],AllTrue[#^3+#+{1,-1},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Feb 23 2020 *)
  • PARI
    isok(n) = isprime(n^3+n+1) && isprime(n^3+n-1); \\ Michel Marcus, Dec 27 2015
  • Python
    import sympy
    from sympy import isprime
    {print(n) for n in range(10**4) if isprime(n**3+n-1) and isprime(n**3+n+1)}
    

A236764 Numbers k such that k^3 +/- k +/- 1 are prime for all four possibilities.

Original entry on oeis.org

15, 21, 15375, 25164, 53361, 95190, 110685, 115140, 133701, 139425, 140430, 140844, 189336, 217686, 220650, 266916, 272469, 289341, 344880, 364665, 377805, 382221, 390270, 415779, 454905, 539700, 561186, 567645, 575799, 584430, 603651, 722484
Offset: 1

Views

Author

Derek Orr, Jan 30 2014

Keywords

Examples

			110685^3+110685+1 (1356020665779811), 110685^3+110685-1 (1356020665779809), 110685^3-110685+1 (1356020665558441) and 110685^3-110685-1 (1356020665558439) are all prime. Thus 110685 is a member of this sequence.
		

Crossrefs

Intersection of A126421, A236477, A049407, and A236475.

Programs

  • PARI
    for(n=1, 800000, if(isprime(n^3+n+1)&&isprime(n^3-n+1)&&isprime(n^3+n-1)&&isprime(n^3-n-1), print1(n, ","))) \\ Colin Barker, Jan 31 2014
  • Python
    import sympy
    from sympy import isprime
    {print(n) for n in range(10**6) if isprime(n**3+n+1) and isprime(n**3-n+1) and isprime(n**3+n-1) and isprime(n**3-n-1)}
    

A126906 Smallest k such that 1 + k^(2*n+1) + Sum_{j=1..n} k^(2*j) is prime.

Original entry on oeis.org

1, 2, 1, 2, 1, 10, 17, 2, 1, 2, 1, 94, 122, 22, 1, 80, 1, 4, 6, 2, 1, 242, 3, 6, 5, 80, 1, 12, 1, 82, 96, 2, 7, 188, 1, 136, 69, 158, 1, 2, 1, 954, 50, 118, 1, 570, 14, 90, 45, 6, 1, 228, 38, 4, 6, 22, 1, 12, 1, 580, 86, 336, 24, 768, 1, 1170, 408, 340, 1, 896
Offset: 1

Views

Author

Artur Jasinski, Dec 31 2006

Keywords

Comments

1 is a term if and only if number of terms in polynomial is prime.

Crossrefs

Programs

  • Mathematica
    a[n_]: = Module[{k = 1}, While[!PrimeQ[1 + k^(2*n+1) + Sum[k^(2*j), {j, 1, n}]], k++]; k]; Array[a, 30] (* Amiram Eldar, Mar 13 2020 *)
  • PARI
    a(n) = my(k = 1); while(! isprime(1 + k^(2*n+1) + sum(j=1, n, k^(2*j))), k++); k; \\ Michel Marcus, Mar 13 2020

Extensions

More terms from Amiram Eldar, Mar 13 2020

A126907 Numbers n such that 1 + n^2 + n^4 + n^5 is prime.

Original entry on oeis.org

2, 4, 6, 8, 12, 18, 32, 34, 68, 70, 78, 88, 110, 114, 116, 118, 120, 122, 132, 134, 142, 150, 172, 180, 186, 190, 210, 216, 238, 246, 254, 272, 294, 322, 362, 376, 380, 386, 388, 408, 476, 500, 502, 506, 508, 520, 530, 542, 564, 584, 588, 590, 616, 620, 632
Offset: 1

Views

Author

Artur Jasinski, Dec 31 2006

Keywords

Crossrefs

Programs

  • Mathematica
    a = {}; Do[If[PrimeQ[1 + n^2 + n^4 + n^5], AppendTo[a, n]], {n, 1, 1400}]; a
    Select[Range[700],PrimeQ[1+#^2+#^4+#^5]&] (* Harvey P. Dale, Jun 24 2018 *)
  • PARI
    is(n)=isprime(1+n^2+n^4+n^5) \\ Charles R Greathouse IV, Jun 13 2017
Previous Showing 21-30 of 38 results. Next