OFFSET
1,2
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
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.
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Lopatin and Juri-Stepan Gerasimov, May 07 2014
EXTENSIONS
More terms from Colin Barker, May 08 2014
Example corrected by Colin Barker, May 09 2014
STATUS
approved