%I #24 Jan 10 2023 18:19:28
%S 3,21,55,987,2584,6765,17711,46368,317811,832040,2178309,5702887,
%T 14930352,102334155,267914296,701408733,1836311903,4807526976,
%U 12586269025,32951280099,86267571272,225851433717,591286729879,1548008755920,10610209857723
%N Fibonacci numbers which are not the sum of two squares.
%H Chai Wah Wu, <a href="/A356809/b356809.txt">Table of n, a(n) for n = 1..472</a>
%e F(4) = 3; 3 != x^2 + y^2 as no positive integers x, y >= 0 are the solution of this Diophantine equation.
%t Select[Fibonacci[Range[65]], SquaresR[2, #] == 0 &] (* _Amiram Eldar_, Aug 29 2022 *)
%o (PARI) is(n)=if(n%4==3, return(1)); my(f=factor(n)); for(i=1, #f~, if(f[i, 1]%4==3 && f[i, 2]%2, return(1))); 0; \\ A022544
%o lista(nn) = select(is, apply(fibonacci, [1..nn])); \\ _Michel Marcus_, Sep 04 2022
%o (Python)
%o from itertools import islice
%o from sympy import factorint
%o def A356809_gen(): # generator of terms
%o a, b = 1, 2
%o while True:
%o if any(p&3==3 and e&1 for p, e in factorint(a).items()):
%o yield a
%o a, b = b, a+b
%o A356809_list = list(islice(A356809_gen(),30)) # _Chai Wah Wu_, Jan 10 2023
%Y Intersection of A000045 and A022544.
%Y Cf. A001481, A022340, A124132, A124134, A236264.
%K nonn
%O 1,1
%A _Ctibor O. Zizka_, Aug 29 2022
|