login
a(n) = gcd(prime(n)+prime(n+1), prime(n+1)+prime(n+2)).
1

%I #17 Feb 04 2021 20:04:59

%S 1,4,6,6,6,6,6,2,4,4,2,6,6,10,4,8,8,2,6,8,2,2,2,6,6,6,6,6,6,6,2,4,12,

%T 12,4,4,10,10,4,8,12,12,6,6,2,2,2,6,6,2,8,12,4,4,4,4,4,2,6,12,24,6,6,

%U 6,18,4,4,12,6,2,2,2,4,2,2,2,6,6,18,12,12,12,8

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

%C a(n) = gcd(A001043(n), A001043(n+1)).

%H Reinhard Zumkeller, <a href="/A029854/b029854.txt">Table of n, a(n) for n = 1..10000</a>

%e a(20) = gcd(71+73, 73+79) = gcd(144,152) = 8*gcd(18,19) = 8.

%t GCD[#[[1]]+#[[2]],#[[2]]+#[[3]]]&/@Partition[Prime[Range[90]],3,1] (* _Harvey P. Dale_, Mar 06 2014 *)

%o (PARI) a(n) = gcd(prime(n)+prime(n+1), prime(n+1)+prime(n+2)); \\ _Michel Marcus_, Aug 04 2013

%o (Haskell)

%o a029854 n = a029854_list !! (n-1)

%o a029854_list = zipWith gcd a001043_list $ tail a001043_list

%o -- _Reinhard Zumkeller_, Aug 08 2013

%K nonn

%O 1,2

%A _Reinhard Zumkeller_, Feb 14 2002