OFFSET
1,1
COMMENTS
Does this sequence contain a finite or infinite number of squares, powers of 3, even numbers, ...?
MAPLE
filter:= proc(n) local m;
andmap(m -> isprime(m/2^padic:-ordp(m, 2)), [n-1, n+1])
end proc:
select(filter, [$1..1000]); # Robert Israel, Jan 24 2024
MATHEMATICA
q[n_] := PrimeQ[n / 2^IntegerExponent[n, 2]]; Select[Range[400], And @@ q /@ {# - 1, # + 1} &] (* Amiram Eldar, Jan 20 2024 *)
PROG
(Magma) [k: k in [2..400] | #Divisors(2*k-2)-#Divisors(k-1) eq 2 and #Divisors(2*k+2)-#Divisors(k+1) eq 2];
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Jan 20 2024
STATUS
approved