login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A066787
a(n) = gcd(2^n + 1, n^2 + 1).
1
1, 5, 1, 17, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 65, 1, 1, 1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 1, 1, 1, 1, 41, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 1, 1, 1, 1, 29, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 565, 1, 1, 1
OFFSET
1,2
COMMENTS
a(n)=1 or a(n)=0 mod(5) or a(n) is a prime congruent to 1 mod(4).
LINKS
MAPLE
A066787:=n->gcd(2^n+1, n^2+1): seq(A066787(n), n=1..100); # Wesley Ivan Hurt, Jan 03 2016
MATHEMATICA
Table[GCD[2^n + 1, n^2 + 1], {n, 100}] (* Wesley Ivan Hurt, Jan 03 2016 *)
PROG
(PARI) a(n) = { gcd( 2^n + 1, n^2 + 1) } \\ Harry J. Smith, Mar 25 2010
(Magma) [GCD(2^n+1, n^2+1) : n in [1..100]]; // Wesley Ivan Hurt, Jan 03 2016
CROSSREFS
Sequence in context: A211808 A093826 A144699 * A058352 A376020 A121755
KEYWORD
nonn,easy
AUTHOR
Benoit Cloitre, Jan 18 2002
STATUS
approved