login
A362295
Sums of two Fibonacci numbers that are also sums of two squares.
1
0, 1, 2, 4, 5, 8, 9, 10, 13, 16, 18, 26, 29, 34, 36, 37, 58, 68, 89, 90, 97, 144, 145, 146, 149, 157, 178, 233, 234, 241, 288, 377, 466, 521, 610, 612, 613, 754, 1000, 1021, 1042, 1076, 1220, 1597, 1600, 1602, 1618, 1741, 2592, 2597, 2605, 2817, 3194, 4181, 4194, 4325, 6770, 6773, 6778, 6786
OFFSET
1,3
COMMENTS
Intersection of A001481 and A084176.
LINKS
EXAMPLE
a(5) = 5 is a term because 5 = 2 + 3 = A000045(3) + A000045(4) = 2^2 + 1^2.
MAPLE
ss:= proc(n) local F, t;
F:= ifactors(n)[2];
andmap(t -> t[1] mod 4 <> 3 or t[2]::even, F)
end proc:
fibs:= map(combinat:-fibonacci, {$0..25}):
N:= max(fibs):
fib2:= {seq(seq(fibs[i]+fibs[j], i=1..j), j=1..nops(fibs))}:
sort(convert(select(t -> t <= N and ss(t), fib2), list));
MATHEMATICA
max = 150; (* max = 150 gives 1670 terms *)
Join[{0, 1}, Select[Union[Total /@ Tuples[Fibonacci[Range[2, max]], {2}]], # <= Fibonacci[max] && SquaresR[2, #] != 0&]] (* Jean-François Alcover, Sep 29 2024, after Harvey P. Dale in A059389 *)
PROG
(Python)
from itertools import islice
from sympy import factorint
def A362295_gen(): # generator of terms
yield from (0, 1, 2)
a = [1, 2]
while True:
b = a[-1]+a[-2]
c = a[-1]<<1
flag = True
for d in a:
n = b+d
if flag and n>=c:
if n>c:
f = factorint(c)
if all(d & 3 != 3 or f[d] & 1 == 0 for d in f):
yield c
flag = False
f = factorint(n)
if all(d & 3 != 3 or f[d] & 1 == 0 for d in f):
yield n
a.append(b)
A362295_list = list(islice(A362295_gen(), 60)) # Chai Wah Wu, Apr 16 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert Israel, Apr 14 2023
STATUS
approved