cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-4 of 4 results.

A124132 Positive integers n such that Fibonacci(2*n) is the sum of two squares.

Original entry on oeis.org

1, 3, 6, 7, 13, 19, 31, 37, 43, 49, 61, 67, 73, 79, 91, 111, 127, 163, 169, 183, 199, 223, 307, 313, 349, 361, 397, 433, 511, 523, 541, 613, 619, 709, 823, 907, 1087, 1123, 1129, 1147, 1213, 1279
Offset: 1

Views

Author

Melvin J. Knight (melknightdr(AT)verizon.net), Nov 30 2006

Keywords

Comments

This sequence excludes Fibonacci numbers with odd indices, all of which are sums of two squares.
Fibonacci numbers with even indices factor as F_2n = F_n L_n, L_n being n-th Lucas number. Thus F_2n factors further as F_2n = F_m L_m L_2m L_4m...L_n, with m odd. Since F_m is a sum of two squares and the pairs of Lucas numbers all have GCD dividing 2, the conclusion for F_2n depends on each Lucas number being a sum of two squares. Joint work with Kevin O'Bryant and Dennis Eichhorn.
To write Fibonacci(n) as a^2+b^2: find the a^2+b^2 representation for the individual prime factors, by using Cornacchia's algorithm, and then merge them by using the formulas (a^2+b^2)(c^2+d^2) = |ac+bd|^2 + |ad-bc|^2 = |ac-bd|^2 + |ad+bc|^2. - V. Raman, Aug 29 2012
All corresponding Fibonacci(2*n) values are the sum of two nonzero distinct squares except n = 1, 3, 6. - Altug Alkan, May 04 2016
1501 <= a(43) <= 1651. 1651, 1849, 2449 are terms. - Chai Wah Wu, Jul 22 2020

Examples

			a(4) = 7 because the first four Fibonacci numbers with even indices that are the sum of two squares are F_2, F_6, F_12 and F_14, 14 being 2*a(4) and F_14 = 377 = 11^2+16^2.
		

Crossrefs

Cf. A001906, A124130 (for Lucas numbers), A001481.

Programs

  • Mathematica
    Select[Range[100], Length[FindInstance[x^2 + y^2 == Fibonacci[2 #], {x, y}, Integers]] > 0 &] (* T. D. Noe, Aug 27 2012 *)
  • PARI
    for(i=2, 500, a=factorint(fibonacci(i))~; has=0; for(j=1, #a, if(a[1, j]%4==3&&a[2, j]%2==1, has=1; break)); if(has==0&&i%2==0, print((i/2)", "))) \\ V. Raman, Aug 27 2012
    
  • Python
    from itertools import count, islice
    from sympy import factorint, fibonacci
    def A124132_gen(): # generator of terms
        return filter(lambda n:all(p & 3 != 3 or e & 1 == 0 for p, e in factorint(fibonacci(2*n)).items()),count(1))
    A124132_list = list(islice(A124132_gen(),10)) # Chai Wah Wu, Jun 27 2022

Extensions

a(22)-a(38) from V. Raman, Aug 27 2012
a(39)-a(42) from Chai Wah Wu, Jul 22 2020

A215809 Prime numbers n for which the Lucas number L(n) (see A000032) is the sum of two squares.

Original entry on oeis.org

3, 7, 13, 19, 31, 37, 43, 61, 67, 73, 79, 127, 163, 199, 223, 307, 313, 349, 397, 433, 523, 541, 613, 619, 709, 823, 907, 1087, 1123, 1129, 1213, 1279, 1531
Offset: 1

Views

Author

V. Raman, Aug 23 2012

Keywords

Comments

These Lucas numbers L(n) have no prime factor congruent to 3 mod 4 to an odd power.
Also prime numbers n such that the Lucas number L(n) can be written in the form a^2 + 5*b^2.
Any prime factor of Lucas(n) for n prime is always of the form 1 (mod 10) or 9 (mod 10).
A number n can be written in the form a^2+5*b^2 (see A020669) if and only if n is 0,
or of the form 2^(2i) 5^j Prod_{p==1 or 9 mod 20} p^k Prod_{q==3 or 7 mod 20) q^(2m)
or of the form 2^(2i+1) 5^j Prod_{p==1 or 9 mod 20} p^k Prod_{q==3 or 7 mod 20) q^(2m+1),
for integers i,j,k,m, for primes p,q.
1607 <= a(34) <= 1747. 1747, 1951, 2053, 2467, 5107, 5419, 5851, 7243, 7741, 8467, 13963, 14449, 14887, 15511, 15907, 35449, 51169, 193201, 344293, 387433, 574219, 901657, 1051849 are terms. - Chai Wah Wu, Jul 22 2020

Examples

			Lucas(19) = 9349 = 95^2 + 18^2.
Lucas(19) = 9349 = 23^2 + 5*42^2.
		

Crossrefs

Cf. A020669, A033205 (numbers and primes of the form x^2 + 5*y^2).

Programs

  • PARI
    forprime(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", "))) \\ a^2+b^2 form.
    
  • PARI
    forprime(i=2, 500, a=factorint(fibonacci(i-1)+fibonacci(i+1))~; flag=0; flip=0; for(j=1, #a, if(((a[1, j]%20>10))&&a[2, j]%2==1, flag=1); if(((a[1, j]%20==2)||(a[1, j]%20==3)||(a[1, j]%20==7))&&a[2, j]%2==1, flip=flip+1)); if(flag==0&&flip%2==0, print(i", "))) \\ a^2+5*b^2 form.

Extensions

Merged A215941 into this sequence, T. D. Noe, Sep 21 2012
a(30)-a(33) from Chai Wah Wu, Jul 22 2020

A215906 Even numbers n such that the Lucas number L(n) is the sum of two squares.

Original entry on oeis.org

0, 6, 30, 78, 150, 390, 606, 750, 1434
Offset: 1

Views

Author

V. Raman, Aug 26 2012

Keywords

Comments

These Lucas numbers L(n) have no prime factor congruent to 3 mod 4 to an odd power.
1758, 1950, 3030 are terms. - Chai Wah Wu, Jul 23 2020

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 200, 2], Length[FindInstance[x^2 + 1*y^2 == LucasL[#], {x, y}, Integers]] > 0 &] (* G. C. Greubel, Apr 14 2017 *)
  • 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&&i%2==0, print(i", ")))

Extensions

0 added by T. D. Noe, Aug 27 2012
a(6)-a(8) from V. Raman, Aug 28 2012
a(9) from Chai Wah Wu, Jul 23 2020

A215907 Odd numbers n such that the Lucas number L(n) is the sum of two squares.

Original entry on oeis.org

1, 3, 7, 13, 19, 31, 37, 43, 49, 61, 67, 73, 79, 91, 111, 127, 163, 169, 183, 199, 223, 307, 313, 349, 361, 397, 433, 511, 523, 541, 613, 619, 709, 823, 907, 1087, 1123, 1129, 1147, 1213, 1279, 1434
Offset: 1

Views

Author

V. Raman, Aug 26 2012

Keywords

Comments

These Lucas numbers L(n) have no prime factor congruent to 3 mod 4 to an odd power.
Also, numbers n such that L(n) can be written in the form a^2 + 5*b^2.
Subsequence of A124132.
Is this A124132 without the 6? - Joerg Arndt, Sep 07 2012
Any prime factor of Lucas(n) for the prime values of n is always of the form 1 (mod 10) or 9 (mod 10).
A number n can be written in the form a^2 + 5*b^2 if and only if n is 0, or of the form 2^(2i) 5^j Product_{p==1 or 9 mod 20} p^k Product_{q==3 or 7 mod 20) q^(2m) or of the form 2^(2i+1) 5^j Product_{p==1 or 9 mod 20} p^k Product_{q==3 or 7 mod 20) q^(2m+1), for integers i,j,k,m, for primes p,q.
1501 <= a(42) <= 1531. 1531, 1651, 1747, 1849, 1951, 2053, 2413, 2449, 2467, 4069, 5107, 5419, 5851, 7243, 7741, 8467, 13963, 14449, 14887, 15511, 15907, 35449, 51169, 193201, 344293, 387433, 574219, 901657, 1051849 are terms. - Chai Wah Wu, Jul 22 2020

Examples

			Lucas(19) = 9349 = 95^2 + 18^2.
Lucas(19) = 9349 = 23^2 + 5*42^2.
		

Crossrefs

Cf. A180363.
Cf. A020669, A033205 (numbers and primes of the form x^2 + 5*y^2).

Programs

  • 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&&i%2==1, print(i", "))) \\ a^2 + b^2 form.
    
  • PARI
    for(i=2, 500, a=factorint(fibonacci(i-1)+fibonacci(i+1))~; flag=0; flip=0; for(j=1, #a, if(((a[1, j]%20>10))&&a[2, j]%2==1, flag=1); if(((a[1, j]%20==2)||(a[1, j]%20==3)||(a[1, j]%20==7))&&a[2, j]%2==1, flip=flip+1)); if(flag==0&&flip%2==0, print(i", "))) \\ a^2 + 5*b^2 form.

Extensions

17 more terms from V. Raman, Aug 28 2012
A215940 merged into this sequence by T. D. Noe, Sep 21 2012
a(38)-a(41) from Chai Wah Wu, Jul 22 2020
Showing 1-4 of 4 results.