%I #18 Aug 06 2015 19:11:38
%S 2,3,4,5,7,11,13,17,19,89,163,167,233,251,349,401,757,1423,3049,3643,
%T 11987,19801,26393,32303,35363,35863,36607,36683
%N Numbers n such that the absolute value of the real part of (1+2*I)^n is prime.
%C In the first 28 terms only n = 4 is composite; does this continue? - _Charles R Greathouse IV_, Nov 25 2014
%F {n: |A006495(n)| in A000040}.
%p A006495 := proc(n) add((-4)^l*binomial(n,2*l),l=0..floor(n/2)) ; end proc:
%p isA073019 := proc(n) isprime(abs(A006495(n))) ; end proc:
%p for n from 1 do if isA073019(n) then print(n) ; end if; end do: # _R. J. Mathar_, Sep 06 2011
%t x=1; For[n=1, n<=14000, n++, {x=(1+2*I)*x, If[PrimeQ[Re[x]], Print[n]]}]
%o (PARI) is(n)=ispseudoprime(abs(real((1+2*I)^n))) \\ _Charles R Greathouse IV_, Nov 21 2014
%Y Cf. A006495.
%K nonn
%O 1,1
%A _Benoit Cloitre_, Aug 03 2002
%E Edited by _John W. Layman_, Aug 13 2002
%E a(21) from _Robert G. Wilson v_, Aug 22 2002
%E a(22)-a(28) from _Charles R Greathouse IV_, Nov 25 2014