login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Smallest number m such that A114228(m) = n.
6

%I #5 Oct 31 2013 17:40:36

%S 2,3,34,10,47,20,46,52,221,462,92,77,619,94,319,2176,263,154,700,1980,

%T 1336,928,2477,3243,428,461,2146,4224,1456,2735,3373,5319,6439,4522,

%U 4508,4516,11073,1814,9940,10746,17523,6680,16409,10023,16107,14289

%N Smallest number m such that A114228(m) = n.

%C Sequence is defined for all n>=1.

%C A114228(a(n)) = n and A114228(m) <> n for m < a(n).

%t Do[ns[k] = 0, {k, 1, 2000}]; n2 = 0; n1 = 1; While[n2 <= 200, n1++; p1 = Prime[n1]; n2 = 1; p2 = 2; While[cp = p1 + 2*p2; ! PrimeQ[cp], n2++; p2 = Prime[n2]]; If[ns[n2] == 0, ns[n2] = n1; Print[n2, "[", n1, "]"]]]; Table[ns[k], {k, 1, n2}]

%o (Haskell)

%o import Data.List (elemIndex); import Data.Maybe (fromJust)

%o a114229 = (+ 2) . fromJust . (`elemIndex` (map a114228 [2..]))

%o -- _Reinhard Zumkeller_, Oct 31 2013

%Y Cf. A114228, A114227.

%K nonn

%O 1,1

%A _Lei Zhou_, Nov 18 2005

%E Edited definition to conform to OEIS style. - _Reinhard Zumkeller_, Oct 31 2013