cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A112686 Smallest prime p such that the sum of the predecessor and successor primes is divisible by n.

This page as a plain text file.
%I A112686 #4 Jan 16 2014 09:50:08
%S A112686 3,5,23,7,5,23,3,7,29,5,31,23,79,13,73,7,151,29,59,11,61,31,229,23,73,
%T A112686 79,29,13,149,73,311,17,31,151,71,37,181,59,79,19,283,61,521,43,89,
%U A112686 229,1277,23,197,73,151,79,53,29,109,83,59,149,113,89,127,311,61,383,389,31
%N A112686 Smallest prime p such that the sum of the predecessor and successor primes is divisible by n.
%t A112686 f[n_] := Block[{k = 2}, While[ Mod[ Prime[k - 1] + Prime[k + 1], n] != 0, k++ ]; Prime[k]]; Array[f, 66]
%t A112686 With[{prs=Partition[Prime[Range[250]],3,1]},Transpose[Flatten[ Table[ Select[ prs, Divisible[ First[#]+Last[#],n]&,1],{n,70}],1]][[2]]] (* _Harvey P. Dale_, Jan 16 2014 *)
%Y A112686 Cf. A000040, A112545, A112681, A112794, A112731, A112789, A112795, A112796, A112804, A112847, A112859, A113155, A113156, A113157, A113158.
%K A112686 nonn
%O A112686 1,1
%A A112686 _Robert G. Wilson v_, Jan 11 2006