a(1)=5. For n >= 2, a(n) = the smallest prime p > a(n-1) where neither p+1 nor p-1 is divisible by any (earlier) term of this sequence.

A166109

a(1)=5. For n >= 2, a(n) = the smallest prime p > a(n-1) where neither p+1 nor p-1 is divisible by any (earlier) term of this sequence.

Terms

    a(0) =5a(1) =7a(2) =17a(3) =23a(4) =37a(5) =53a(6) =157a(7) =163a(8) =173a(9) =193a(10) =227a(11) =233a(12) =257a(13) =263a(14) =283a(15) =353a(16) =383a(17) =397a(18) =457a(19) =487a(20) =523a(21) =557a(22) =563a(23) =607a(24) =677a(25) =683a(26) =733a(27) =787a(28) =823a(29) =857

External references