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

A173180 Numbers k such that k^5-k^4-k^3-k^2-k-1 is prime.

Original entry on oeis.org

4, 6, 8, 14, 18, 20, 24, 26, 28, 32, 40, 42, 50, 58, 62, 68, 72, 100, 104, 120, 122, 140, 150, 174, 184, 192, 210, 234, 240, 260, 266, 278, 288, 300, 306, 326, 346, 366, 404, 432, 444, 460, 464, 466, 470, 484, 488, 512, 516, 526, 538, 556, 562, 564, 570, 584
Offset: 1

Views

Author

Keywords

Comments

All terms are even. - Robert Israel, Apr 11 2019

Crossrefs

Programs

  • Maple
    filter:= k -> isprime( k^5-k^4-k^3-k^2-k-1):
    select(filter, 2*[$1..500]); # Robert Israel, Apr 11 2019
  • Mathematica
    f[n_]:=n^5-n^4-n^3-n^2-n-1;Select[Range[7! ],PrimeQ[f[ #1]]&]
    Select[Range[2,600,2],PrimeQ[#^5-Total[#^Range[0,4]]]&] (* Harvey P. Dale, Sep 26 2023 *)

Formula

{k: A125083(k) in A000040}. [R. J. Mathar, Feb 13 2010]

A182438 Numbers n such that neither n^2+n-1 nor n^2-n-1 is prime.

Original entry on oeis.org

1, 18, 23, 33, 34, 37, 43, 52, 58, 62, 63, 72, 73, 74, 75, 78, 79, 80, 81, 82, 88, 91, 92, 98, 99, 105, 106, 107, 108, 109, 110, 111, 112, 113, 117, 118, 119, 122, 123, 124, 128, 129, 133, 136, 137, 143, 147, 151, 152, 157, 162, 166, 167, 168, 173
Offset: 1

Views

Author

Alex Ratushnyak, Apr 28 2012

Keywords

Examples

			18^2+18-1=341 is not prime, and 18^2-18-1=305 is not prime, so 18 is in the sequence.
		

Crossrefs

Programs

  • Magma
    [n: n in [1..180] | not IsPrime(n^2+n-1) and not IsPrime(n^2-n-1)]; // Vincenzo Librandi, Jan 19 2013
    
  • Mathematica
    Select[Range[500], !PrimeQ[#^2 + # - 1] && !PrimeQ[#^2 - # - 1] &] (* Vincenzo Librandi, Jan 19 2013 *)
    Select[Range[200],NoneTrue[#^2+{#-1,-#-1},PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, May 04 2018 *)
  • PARI
    is(n)=!isprime(n^2+n-1) && !isprime(n^2-n-1) \\ Charles R Greathouse IV, Jun 13 2017

Formula

a(n) ~ n. - Charles R Greathouse IV, Jun 13 2017

A241975 Numbers n such that n^4 - n^3 - n - 1 is a semiprime.

Original entry on oeis.org

4, 6, 10, 14, 16, 20, 36, 40, 54, 56, 66, 84, 90, 94, 116, 126, 146, 150, 156, 160, 170, 204, 210, 260, 264, 306, 340, 350, 386, 396, 406, 420, 464, 474, 496, 570, 634, 674, 696, 700, 716, 740, 764, 780, 816, 826, 864, 890, 966, 1054, 1070, 1094, 1106, 1144
Offset: 1

Views

Author

Vincenzo Librandi, Aug 10 2014

Keywords

Comments

Since n^4 - n^3 - n - 1 = (n^2 + 1)*(n^2 - n - 1), these are also numbers n such that n^2 + 1 and n^2 - n - 1 are both prime. Numbers in the intersection of A005574 and A002328. - Derek Orr, Aug 10 2014 [Sequence numbers corrected by Jens Kruse Andersen, Aug 11 2014]

Crossrefs

Programs

  • Magma
    IsSemiprime:=func; [ n: n in [2..1500] | IsSemiprime(n^4 - n^3 - n - 1)];
    
  • Mathematica
    Select[Range[2000], PrimeOmega[#^4 - #^3 - # - 1]==2 &]
  • PARI
    for(n=1,10^4,if(isprime(n^2+1)&&isprime(n^2-n-1),print1(n,", "))) \\ Derek Orr, Aug 10 2014

A291689 Numbers n such that n^2 +- n +- 1 are all composite.

Original entry on oeis.org

23, 37, 43, 52, 73, 74, 82, 88, 92, 98, 107, 108, 109, 113, 122, 123, 124, 128, 129, 133, 136, 137, 152, 157, 166, 178, 179, 183, 198, 201, 202, 205, 208, 211, 212, 213, 214, 217, 222, 223, 224, 227, 228, 229, 235, 238, 239, 243, 250, 251, 252, 253, 254, 255, 256, 257, 261, 262, 270, 271, 274
Offset: 1

Views

Author

Robert Israel, Aug 29 2017

Keywords

Comments

Numbers n such that A291654(n)=1.
Complement of union of A002328, A002384, A045546 and A055494.

Examples

			a(1)=23 is in the sequence because 23^2 - 23 - 1 = 505, 23^2 - 23 + 1 = 507, 23^2 + 23 - 1 = 551, 23^2 + 23 + 1 = 553 are all composite.
		

Crossrefs

Programs

  • Maple
    select(t -> not ormap(isprime, {t^2+t+1,t^2+t-1,t^2-t+1,t^2-t-1}), [$1..1000]);
  • Mathematica
    Select[Range@ 300, Function[t, AllTrue[t^2 + Map[Total[{t, 1} #] &, Tuples[{1, -1}, 2]], ! PrimeQ@ # &]]] (* Michael De Vlieger, Aug 29 2017 *)
  • PARI
    is(n)=my(n2=n^2); !isprime(n2+n+1) && !isprime(n2+n-1) && !isprime(n2-n+1) && !isprime(n2-n-1) \\ Charles R Greathouse IV, Aug 30 2017

Formula

a(n) ~ n. - Charles R Greathouse IV, Aug 30 2017

A328525 Numbers k such that (k-1)*k*(k+1) = (k-1)*(1+u) = k*(1+v) = (k+1)*(1+w) with primes u, v, w.

Original entry on oeis.org

3, 5, 9, 21, 55, 131, 145, 155, 231, 259, 265, 449, 495, 561, 595, 1045, 1051, 1365, 1409, 1491, 1549, 1849, 1989, 2001, 2101, 2469, 2785, 3365, 3621, 3641, 3669, 3845, 3911, 4285, 4951, 5181, 5465, 6049, 6699, 7189, 7229, 8219, 8629, 9175, 9521, 9539, 9631, 9729
Offset: 1

Views

Author

Frank Ellermann, Feb 24 2020

Keywords

Examples

			3 is a term because 2*3*4 = 2*(1+11) = 3*(1+7) = 4*(1+5) with primes 11, 7, 5.
9 is a term because 8*9*10 = 8*(1+89) = 9*(1+79) = 10*(1+71) with primes 89, 79, 71.
		

Crossrefs

Cf. A000040.
Intersection of A002328, A028870 and A045546.

Programs

  • Maple
    q:= k-> andmap(isprime, (t-> [t-1, t-k, t+k])(k^2-1)):
    select(q, [$1..10000])[];  # Alois P. Heinz, Feb 25 2020
  • Mathematica
    Select[Range[2, 10^4], AllTrue[{(# - 1)*#, #*(# + 1), (# + 1)*(# - 1)} - 1, PrimeQ] &] (* Amiram Eldar, Feb 24 2020 *)
  • PARI
    isok(k) = isprime(k*(k+1)-1) && isprime((k+1)*(k-1)-1) && isprime(k*(k-1)-1); \\ Michel Marcus, Feb 25 2020
  • Rexx
    S = 3
    do N = 5 to 595 by 2
       if NOPRIME( N*N +N -1 ) then  iterate N
       if NOPRIME( N*N    -2 ) then  iterate N
       if NOPRIME( N*N -N -1 ) then  iterate N
       S = S || ',' N
    end N
    say S
    

Extensions

More terms from Amiram Eldar, Feb 24 2020

A089362 Numbers n such that n^2 - 5n + 5 is prime.

Original entry on oeis.org

5, 6, 7, 8, 9, 11, 12, 13, 14, 16, 18, 19, 22, 23, 24, 27, 29, 31, 33, 34, 38, 41, 42, 44, 47, 48, 49, 51, 53, 56, 57, 58, 59, 62, 63, 67, 68, 69, 71, 73, 79, 86, 88, 89, 92, 96, 97, 99, 103, 104, 106, 117, 118, 123, 128, 129, 133, 134, 137, 141, 143, 144, 147, 148, 151, 152, 156, 157, 158, 161, 162, 163, 166, 167, 172
Offset: 1

Views

Author

Giovanni Teofilatto, Dec 27 2003

Keywords

References

  • M. Cerasoli, F. Eugeni and M. Protasi, Elementi di Matematica Discreta, Bologna 1988.
  • Emanuele Munarini and Norma Zagaglia Salvi, Matematica Discreta, UTET, CittaStudiEdizioni, Milano 1997.

Crossrefs

Cf. A002328.

Programs

Formula

a(n) = A002328(n)+2.

Extensions

Corrected and extended by Georg Fischer, Jun 20 2020

A235484 Square numbers n such that n^2 - n - 1 is prime.

Original entry on oeis.org

4, 9, 16, 25, 36, 49, 121, 196, 289, 324, 361, 529, 625, 729, 1024, 1296, 1681, 1849, 2916, 3600, 4225, 4761, 5184, 5929, 6400, 6724, 6889, 7569, 7744, 8464, 8649, 9604, 12100, 13689, 14641, 14884, 15876, 16129, 18225, 18496, 19044, 22201, 22500, 24025, 24649, 25281, 28224
Offset: 1

Views

Author

Zak Seidov, Apr 13 2014

Keywords

Comments

Or, squares in A002328: a(1) = 4 = A002328(2), a(2) = 9 = A002328(6), a(1) = 16 = A002328(11).
The corresponding primes, 11, 71, 239, 599, 1259, 2351, 14519, 38219, 83231, 104651, 129959, 279311, 389999, 530711, 1047551, 1678319, are a subsequence of A002327.

Crossrefs

Intersection of A002328 and A000290. Cf. A002327.

Programs

  • Mathematica
    Select[Table[n^2, {n, 100}], PrimeQ[#^2 - # - 1] &]
  • PARI
    list(lim)=my(v=List()); for(n=2,sqrtint(lim\1), if(isprime(n^2-n-1), listput(v,n))); Vec(v) \\ Charles R Greathouse IV, Jun 13 2017

A268212 Numbers n of the form 2^k + 1 such that n^2 - n - 1 is a prime q (for k >= 0).

Original entry on oeis.org

3, 5, 9, 17, 65, 1025, 65537, 16777217, 67108865, 34359738369, 4503599627370497, 36028797018963969, 39614081257132168796771975169, 22300745198530623141535718272648361505980417
Offset: 1

Views

Author

Jaroslav Krizek, Jan 28 2016

Keywords

Comments

Conjecture: subsequence of prime terms (3, 5, 17, 65537, ...) is not the same as A249759.
Corresponding values of numbers k are in A098855 (numbers n such that 4^n + 2^n - 1 is prime).
Corresponding values of primes q: 5, 19, 71, 271, 4159, 1049599, 4295032831, ...
4 out of 5 known Fermat primes (3, 5, 17, 65537) are terms; corresponding values of primes q: 5, 19, 271, 4295032831.

Examples

			17  = 2^4 + 1 is a term because 17^2 - 17 - 1 = 271 (prime).
		

Crossrefs

Intersection of A002328 and A000051.

Programs

  • Magma
    [2^n + 1: n in [0..300] | IsPrime((2^n + 1)^2 - 2^n - 2)]
    
  • Mathematica
    2^# + 1 &@ Select[Range[0, 300], PrimeQ[#^2 - # - 1 &@ (2^# + 1)] &] (* Michael De Vlieger, Jan 29 2016 *)
  • PARI
    lista(nn) = {for (k=0, nn, n = 2^k+1; if (isprime(n^2-n-1), print1(n, ", ")););} \\ Michel Marcus, Mar 06 2016
Previous Showing 21-28 of 28 results.