%I #26 Dec 09 2014 10:56:52
%S 1,1,1,1,0,2,2,1,0,2,2,2,0,3,2,2,0,3,0,3,0,3,2,2,0,0,4,0,2,2,2,0,3,0,
%T 4,3,0,4,4,4,3,0,4,0,4,2,2,0,0,4,0,5,4,4,3,0,0,5,0,5,3,2,0,0,4,4,2,0,
%U 0,0,5
%N a(n) is the least m>0 such that A182134(n - m) = m, or zero if there is no such m.
%C Recall that A182134(k) is the number of primes p with prime(k) < p < prime(k)^(1+1/k). The record values up to n = 56000 are the positive integers up to 21 except 13 which first occurs after 14; A246790 gives indices of these record values.
%H Robert Price, <a href="/A246785/b246785.txt">Table of n, a(n) for n = 2..10000</a>
%t h[n_]:= If[n==0, 0, (i=Prime[n]+1; j=Prime[n]^(1+1/n); Length[Select[Range[i,j], PrimeQ]])];a1[n_]:= (For[m=1, m<=n-1 && h[n-m]!= m, m++]; m); a[k_]:= If[c=a1[k]; c==k, 0, c]; Table[a[k],{k,2,90}]
%o (Haskell)
%o a246785 n = if null ms then 0 else head ms
%o where ms = [m | m <- [1 .. n-1], a182134 (n - m) == m]
%o -- _Reinhard Zumkeller_, Nov 17 2014
%Y Cf. A000040, A182134, A246790, A246793.
%K nonn
%O 2,6
%A _Farideh Firoozbakht_, Oct 24 2014