A084199 Smallest prime q < prime(n) such that q+1 divides prime(n)+1, a(n) = 1 if no such q exists.
1, 1, 2, 3, 2, 1, 2, 3, 2, 2, 3, 1, 2, 3, 2, 2, 2, 1, 3, 2, 1, 3, 2, 2, 13, 2, 3, 2, 1, 2, 3, 2, 2, 3, 2, 3, 1, 3, 2, 2, 2, 13, 2, 1, 2, 3, 3, 3, 2, 1, 2, 2, 1, 2, 2, 2, 2, 3, 1, 2, 3, 2, 3, 2, 1, 2, 3, 1, 2, 13, 2, 2, 3, 1, 3, 2, 2, 1, 2, 1, 2, 1, 2, 13, 3, 2, 2, 1, 2, 3, 2, 2, 3, 2, 3, 2, 2, 2, 3, 1, 3, 2, 2
Offset: 1
Keywords
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
seq[lim_] := Module[{p = Prime[Range[lim]], q, s = {}}, Do[q = SelectFirst[p, Divisible[p[[i]] + 1, # + 1] &]; AppendTo[s, If[q < p[[i]], q, 1]], {i, 1, Length[p]}]; s]; seq[100] (* Amiram Eldar, Mar 28 2025 *)
Formula
a(n) = 1 iff A084196(n) = 0.
Comments