login
Numbers k such that both A000203(k)-k-1 and A000203(k)-2*k-1 are prime numbers.
2

%I #17 Mar 21 2023 08:24:54

%S 30,42,60,70,78,102,138,186,198,216,222,228,240,246,258,270,282,360,

%T 372,390,414,438,492,498,546,582,600,606,642,708,720,756,762,774,786,

%U 810,852,870,930,942,954,1002,1014,1020,1026,1038,1068,1086,1182,1266,1290

%N Numbers k such that both A000203(k)-k-1 and A000203(k)-2*k-1 are prime numbers.

%C A simpler version of A179945, added at the request of the editor-in-chief.

%p q:= n-> (t-> andmap(isprime, [t-n-1, t-2*n-1]))(numtheory[sigma](n)):

%p select(q, [$1..1500])[]; # _Alois P. Heinz_, Mar 21 2023

%o (PARI) is(n)=my(s=sigma(n)); isprime(s-n-1) && isprime(s-n-n-1) \\ _Charles R Greathouse IV_, Feb 19 2013

%Y Subsequence of A179945.

%Y Cf. A000203.

%K nonn

%O 1,1

%A _Max Alekseyev_, Aug 18 2010

%E Edited by _N. J. A. Sloane_, Aug 28 2010