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.

A219533 a(n) = smallest prime not included earlier such that a(n-4) + a(n-3) + a(n-2) + a(n-1) + a(n) is a prime, with a(1)=3, a(2)=5, a(3)=7, and a(4)=11.

This page as a plain text file.
%I A219533 #8 Nov 22 2012 18:55:54
%S A219533 3,5,7,11,17,13,19,23,29,43,37,31,41,47,67,53,61,79,71,73,83,103,59,
%T A219533 101,97,89,157,113,107,127,109,131,139,137,167,199,179,181,151,149,
%U A219533 163,233,191,193,173,223,197,211,227,229,239,257,241,251,271,263,277,311,307,269
%N A219533 a(n) = smallest prime not included earlier such that a(n-4) + a(n-3) + a(n-2) + a(n-1) + a(n) is a prime, with a(1)=3, a(2)=5, a(3)=7, and a(4)=11.
%e A219533 a(5) = 17 because 13 will not work (3 + 5 + 7 + 11 + 13 = 39) but 17 does work, with 3 + 5 + 7 + 11 + 17 = 43.
%e A219533 a(6) = 13 because it is the smallest prime that will produce the desired result: 5 + 7 + 11 + 17 + 13 = 53.
%t A219533 f[s_List] := Block[{p = s[[-4]] + s[[-3]] + s[[-2]] + s[[-1]], q = 13}, While[ !PrimeQ[p + q] || MemberQ[s, q], q = NextPrime[q]]; Append[s, q]]; Nest[f, {3, 5, 7, 11}, 56]
%Y A219533 Cf. A073653.
%K A219533 nonn
%O A219533 1,1
%A A219533 _Robert G. Wilson v_, Nov 21 2012