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”).

a(n) = gcd(prime(n+1) - 1, prime(n) + 1).
1

%I #23 Dec 09 2024 23:23:33

%S 1,4,6,2,12,2,18,2,4,30,4,2,42,2,4,2,60,2,2,72,2,2,4,6,2,102,2,108,2,

%T 6,2,4,138,4,150,4,2,2,4,2,180,2,192,2,198,10,2,2,228,2,2,240,2,4,2,4,

%U 270,4,2,282,4,6,2,312,2,6,4,2,348,2,2,6,4,2,2,4,6,2,6,2,420,2,432,2,2

%N a(n) = gcd(prime(n+1) - 1, prime(n) + 1).

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

%t GCD[#[[1]]+1,#[[2]]-1]&/@Partition[Prime[Range[90]],2,1] (* _Harvey P. Dale_, May 16 2021 *)

%o (PARI) a(n) = { gcd(prime(n+1) - 1, prime(n) + 1) } \\ _Harry J. Smith_, Apr 15 2010

%K nonn,changed

%O 1,2

%A _Benoit Cloitre_, Jan 27 2002