%I #10 Jul 16 2024 13:39:46
%S 4,6,7,8,10,11,12,13,14,15,16,17,20,21,23,25,26,27,28,30,31,33,35,39,
%T 40,41,42,43,44,45,46,48,51,52,56,57,58,60,61,62,63,65,66,67,71,72,74,
%U 75,77,78,79,80,81,88,89,90,91,94,95,96,97,98,99,100,102,103,105,108,109
%N Numbers n such that Sum_{k=1..n} (-1)^(n-k) *phi(2*k) is prime.
%C The partial alternating sum over phi(.) = A000010(.) in the definition starts at n = 1 as 1, 1, 1, 3, 1, 3, 3, 5, 1, 7, 3, 5, 7, 5, 3, 13, ...
%C The first primes in this auxiliary sequence are 3, 3, 3, 5, 7, 3, 5, 7, 5, 3, 13, 3, 7, 5, 7, 11, 13, 5, 19, 7, 23, 11, 3, 3, 29, 11, 13, ... occurring at positions 4, 6, 7, 8, etc., which define the sequence.
%e 4 is in the sequence because Sum_{k=1..4} (-1)^(4-k)*phi(2*k) = ((-1)^3)*1 + ((-1)^2)*2 + ((-1)^1)*2 + ((-1)^0)*4 = -1 + 2 - 2 + 4 = 3 is prime.
%p with(numtheory):for n from 1 to 200 do:x:=sum((((-1)^(n-k))*phi(2*k),k=1..n)): if type(x,prime)=true then printf(`%d, `, n):else fi:od:
%t Select[Range[150],PrimeQ[Sum[(-1)^(#-k) EulerPhi[2k],{k,#}]]&] (* _Harvey P. Dale_, Jul 16 2024 *)
%Y Cf. A000010, A062570.
%K nonn
%O 1,1
%A _Michel Lagneau_, Oct 01 2010
%E Comment slightly extended by _R. J. Mathar_, Oct 03 2010