OFFSET
1,1
COMMENTS
All terms after the first == 1 (mod 4).
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(3) = 177 is a term because 177 = 3*59 and 178 = 2*89 are semiprimes, 179 is prime, 771 = 3*257 and 871 = 13*67 are semiprimes and 971 is prime.
MAPLE
revdigs:= proc(n) local i, L;
L:= convert(n, base, 10);
add(10^(i-1)*L[-i], i=1..nops(L))
end proc:
f:= proc(n) uses numtheory;
if not isprime((n+1)/2) then return false fi;
if n mod 3 = 0 then if not(isprime(n/3) and isprime(n+2)) then return false fi
elif n mod 3 = 2 then return false
elif not(isprime(n) and isprime((n+2)/3)) then return false
fi;
sort(map(bigomega@revdigs, [n, n+1, n+2]))=[1, 2, 2]
end proc:
f(4):= true:
select(f, [4, seq(i, i=5..10^6, 4)]);
MATHEMATICA
Select[Range[300000], Sort[PrimeOmega[# + {0, 1, 2}]] == Sort[PrimeOmega[IntegerReverse[# + {0, 1, 2}]]] == {1, 2, 2} &] (* Amiram Eldar, May 29 2022 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
J. M. Bergot and Robert Israel, May 29 2022
STATUS
approved