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

A242221 Numbers n such that n - n^2/m^2 and 2n - n/m are not prime for all m.

Original entry on oeis.org

1, 25, 26, 28, 33, 35, 39, 46, 50, 58, 63, 65, 77, 78, 81, 85, 86, 88, 92, 93, 94, 95, 105, 111, 116, 118, 119, 122, 123, 124, 125, 130, 133, 134, 143, 144, 145, 146, 148, 153, 155, 160, 161, 162, 165, 170, 171, 172, 176, 178, 183, 185, 186, 188, 189, 196, 202
Offset: 1

Views

Author

Keywords

Comments

Intersection of A241884 and A138666.

Examples

			26 is in this sequence because:
1) 26 - 26^2/1^2 = -650 and 2*26 - 26/1 = 26 both not prime for m = 1,
2) 26 - 26^2/2^2 = -143 and 2*26 - 26/2 = 39 both not prime for m = 2,
3) 26 - 26^2/13^2 = 22 and 2*26 - 26/13 = 50 both not prime for m = 13,
4) 26 - 26^2/26^2 = 25 and 2*26 - 26/26 = 51 both not prime for m = 26.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) andmap(t -> not isprime(n - n^2/t^2) and not isprime(2*n - n/t), numtheory:-divisors(n)) end proc:
    select(filter, [$1..200]); # Robert Israel, Jul 03 2017
  • Mathematica
    filterQ[n_] := AllTrue[Divisors[n], !PrimeQ[n - n^2/#^2] && !PrimeQ[2n - n/#]&];
    Select[Range[200], filterQ] (* Jean-François Alcover, Jul 27 2020, after Maple *)
  • PARI
    f(n)=fordiv(n, m, if(isprime(n-n^2/m^2), return(0))); 1
    g(n)=fordiv(n, m, if(isprime(2*n-n/m), return(0))); 1
    for(n=1, 200, if(f(n) && g(n), print1(n, ", "))) \\ Colin Barker, May 08 2014

Extensions

More terms from Colin Barker, May 08 2014
Example corrected by Colin Barker, May 09 2014

A289363 Primes p such that p^2 + p - 1 is composite.

Original entry on oeis.org

7, 17, 23, 29, 37, 43, 47, 61, 67, 71, 73, 79, 97, 107, 109, 113, 127, 137, 139, 151, 157, 167, 173, 179, 197, 211, 223, 227, 229, 239, 251, 257, 269, 271, 277, 283, 293, 307, 311, 313, 317, 337, 347, 353, 359, 367, 379, 383, 389, 397, 409, 421, 439, 443, 457, 467, 479, 487, 491, 503, 509, 521, 523
Offset: 1

Views

Author

Robert Israel, Jul 04 2017

Keywords

Comments

Includes all primes == 2 (mod 5) or == 3 or 7 (mod 11) except 2 and 3.
If p is in this sequence, p^2 + p is not in A241884 although p^2 + p - 1 is composite.

Crossrefs

Cf. A241884.

Programs

  • Magma
    [p: p in PrimesUpTo(600) | not IsPrime(p^2+p-1)]; // Vincenzo Librandi, Jul 05 2017
  • Maple
    select(t -> isprime(t) and not isprime(t^2+t-1), [seq(i,i=1..1000, 2)]);
  • Mathematica
    Select[Prime[Range[100]], CompositeQ[#^2+#-1]&] (* Jean-François Alcover, Jul 18 2017 *)
  • PARI
    lista(nn) = forprime(p=2, nn, if (!isprime(p^2+p-1), print1(p, ", "))); \\ Michel Marcus, Jul 05 2017
    
Showing 1-2 of 2 results.