# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a089795 Showing 1-1 of 1 %I A089795 #7 Dec 02 2018 03:08:20 %S A089795 5,37,1009,4327,6197,6947,43391,31469,1324567,678719,6655531,1895479, %T A089795 6085103,21500429,93685619,523000399,20388727,709208557 %N A089795 Smallest prime(k) such that prime(k)-prime(k-1) is equal to prime(k+n)-prime(k). %C A089795 Cf. A089344. %e A089795 a(4) = 4327, the previous prime is 4297, 4327-4297 = 30, the next four primes are 4337, 4339, 4349 and 4357. 4357-4327 = 30. %t A089795 f[n_] := Block[{k = n + 1}, While[ 2Prime[k] != Prime[k - 1] + Prime[k + n], k++ ]; Prime[k]]; Table[ f[n], {n, 18}] %o A089795 (PARI) a(n)=local(k=1);if(n<1,0,until(prime(k)-prime(k-1)==prime(k+n)-prime(k),k++);prime(k)) /* _Michael Somos_, Feb 01 2004 */ %K A089795 nonn %O A089795 1,1 %A A089795 _Robert G. Wilson v_, Nov 11 2003 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE