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-3 of 3 results.

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.

Original entry on oeis.org

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

Views

Author

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

Keywords

Comments

Congruence considerations eliminate many indices, but the remaining numbers were factored. These have no prime factors of the form p=4m+3 dividing them to an odd power. Joint work with Kevin O'Bryant and Dennis Eichhorn.
To write Lucas(n) as a^2+b^2: find the a^2+b^2 representation for the individual prime factors by Cornacchia's algorithm, and 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, Oct 04 2012
Values of A000032(n) such that A000032(n) or A000032(n)/2 is a square are only 1, 2, 4, 18. So a and b must be distinct and nonzero for all values of this sequence except 0, 1, 3, 6. - Altug Alkan, May 04 2016
1501 <= a(51) <= 1531. 1531, 1651, 1747, 1758, 1849, 1950, 1951, 2053, 2413, 2449, 2467, 3030, 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

			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.
		

Crossrefs

Intersection of A000032 or A000204 = Lucas numbers and A001481.

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

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
Showing 1-3 of 3 results.