OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
6' = 5 is prime and 2*6' + 1 = 2*5 + 1 = 11 is prime, so 6 is a term.
42' = 41 is prime and 2*42' + 1 = 2*41 + 1 = 83 is prime, so 42 is a term.
MAPLE
filter:= proc(n) local np, t;
np:= n*add(t[2]/t[1], t = ifactors(n)[2]);
isprime(np) and isprime(2*np+1)
end proc:
select(filter, [$1..3000]); # Robert Israel, Mar 18 2023
MATHEMATICA
d[1] = 0; d[n_] := n * Plus @@ ((Last[#]/First[#]) & /@ FactorInteger[n]); Select[Range[2400], PrimeQ[d1 = d[#]] && PrimeQ[2*d1 + 1] &] (* Amiram Eldar, Mar 01 2023 *)
PROG
(Magma) f:=func<n |n le 1 select 0 else n*(&+[Factorisation(n)[i][2] / Factorisation(n)[i][1]: i in [1..#Factorisation(n)]])>; [p:p in [1..2500]| IsPrime(Floor(f(p))) and IsPrime(2*Floor(f(p))+1) ];
CROSSREFS
KEYWORD
nonn
AUTHOR
Marius A. Burtea, Mar 01 2023
STATUS
approved