A215937 Numbers n such that 2^n + 1 can be written in the form a^2 + 5*b^2.
2, 3, 7, 10, 11, 19, 23, 31, 43, 47, 50, 58, 71, 79, 82, 107, 127, 167, 178, 179, 191, 199, 250, 290, 298, 311, 347, 359, 410, 487, 563, 599, 683, 751, 802, 890, 907, 1051
Offset: 1
Keywords
Examples
3 is in the sequence because 2^3 + 1 = 9 can be written as 2^2 + 5 * 1^2 = 9.
Links
- Samuel S. Wagstaff, Jr., The Cunningham Project, Factorizations of 2^n-1, for odd n's < 1200
Crossrefs
Programs
-
PARI
for(i=2, 500, a=factorint(2^i+1)~; has=0; for(j=1, #a, if(((a[1, j]%20>10)||(i%4<2))&&a[2, j]%2==1, has=1; break)); if(has==0, print(i",")))
-
PARI
for(i=2, 500, a=factorint(2^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",")))
Extensions
Terms corrected by V. Raman, Sep 20 2012
Comments