A124130 Numbers n such that L_n = a^2 + b^2, where L_n is the n-th Lucas number with a and b integers.
0, 1, 3, 6, 7, 13, 19, 30, 31, 37, 43, 49, 61, 67, 73, 78, 79, 91, 111, 127, 150, 163, 169, 183, 199, 223, 307, 313, 349, 361, 390, 397, 433, 511, 523, 541, 606, 613, 619, 709, 750, 823, 907, 1087, 1123, 1129, 1147, 1213, 1279, 1434
Offset: 1
Keywords
Examples
a(5) = 13 because the first five Lucas numbers that are the sum of two squares are L_1, L_3, L_6, L_7 and L_13 = 521 = 11^2 + 20^2.
Links
- Blair Kelly, Fibonacci and Lucas factorizations
- Eric Weisstein's World of Mathematics, Sum of squares function
- Wikipedia, Cornacchia's algorithm
Crossrefs
Programs
-
Mathematica
Select[Range[0, 200], SquaresR[2, LucasL[#]] > 0&] (* T. D. Noe, Aug 24 2012 *)
-
PARI
for(i=2, 500, a=factorint(fibonacci(i-1)+fibonacci(i+1))~; has=0; for(j=1, #a, if(a[1, j]%4==3&&a[2, j]%2==1, has=1; break)); if(has==0, print(i", "))) \\ V. Raman, Aug 23 2012
-
Python
from itertools import count, islice from sympy import factorint, lucas def A124130_gen(): # generator of terms return filter(lambda n:all(p & 3 != 3 or e & 1 == 0 for p, e in factorint(lucas(n)).items()),count(0)) A124130_list = list(islice(A124130_gen(),20)) # Chai Wah Wu, Jun 27 2022
Extensions
a(1)=0 and a(26)-a(45) from V. Raman, Sep 06 2012
a(46)-a(50) from Chai Wah Wu, Jul 22 2020
Comments