login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) = gcd(2^n + 1, n^2 + 1).
1

%I #20 Dec 11 2024 11:33:47

%S 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,

%T 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,

%U 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

%N a(n) = gcd(2^n + 1, n^2 + 1).

%C a(n)=1 or a(n)=0 mod(5) or a(n) is a prime congruent to 1 mod(4).

%H Harry J. Smith, <a href="/A066787/b066787.txt">Table of n, a(n) for n = 1..1000</a>

%p A066787:=n->gcd(2^n+1,n^2+1): seq(A066787(n), n=1..100); # _Wesley Ivan Hurt_, Jan 03 2016

%t Table[GCD[2^n + 1, n^2 + 1], {n, 100}] (* _Wesley Ivan Hurt_, Jan 03 2016 *)

%o (PARI) a(n) = { gcd( 2^n + 1, n^2 + 1) } \\ _Harry J. Smith_, Mar 25 2010

%o (Magma) [GCD(2^n+1,n^2+1) : n in [1..100]]; // _Wesley Ivan Hurt_, Jan 03 2016

%K nonn,easy

%O 1,2

%A _Benoit Cloitre_, Jan 18 2002