OFFSET
1,2
COMMENTS
Primes in a(n): 2, 3, 19, 29, 61, 79, 89, 103, 139, 149, 151, 173, 179, ...
FORMULA
A306261(a(n)) > 1 for n >= 4.
EXAMPLE
1 is a term because 4*1^2 - 1 = 3 and 2*1 - 3 = -1 (nonprime);
2 is a term because 4*2^2 - 1 = 15 and 2*2 - 15 = -11 (nonprime);
3 is a term because 4*3^2 - 1 = 35 and 2*3 - 35 = -29 (nonprime);
6 is a term because 4*6^2 - 1 = 143 = 11*13 and 2*6 - 11 = 1 (nonprime), 2*6 - 13 = -1 (nonprime);
9 is a term because 4*9^2 - 1 = 323 = 17*19 and 2*9 - 17 = 1 (nonprime), 2*9 - 19 = -1 (nonprime).
MAPLE
filter:= proc(n) andmap(`not` @ isprime, map(p -> 2*n-p, numtheory:-factorset(4*n^2-1))) end proc:
select(filter, [$1..300]); # Robert Israel, Jan 31 2019
MATHEMATICA
Select[Range@ 200, AllTrue[2 # - FactorInteger[4 #^2 - 1][[All, 1]], ! PrimeQ@ # &] &] (* Michael De Vlieger, Feb 03 2019 *)
PROG
(PARI) isok(k) = {my(pf = factor(4*k^2-1)[, 1]); #select(x->isprime(2*k-x), pf) == 0; } \\ Michel Marcus, Mar 02 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Juri-Stepan Gerasimov, Jan 31 2019
STATUS
approved