login
Number of numbers m such that prime(n) = m + (digit sum of m).
14

%I #18 Nov 09 2018 21:19:03

%S 1,0,0,0,1,1,1,1,1,1,0,1,1,1,1,0,1,1,1,1,1,1,1,1,0,2,2,2,2,2,1,1,1,1,

%T 1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,2,2,2,2,1,1,

%U 1,1,1,1,0,1,1,1,0,1,1,1,1,1,1,1,1,1,1,0,1,1,1,0,1,1,1,1,2,2,1,1,0,1,1,0,1

%N Number of numbers m such that prime(n) = m + (digit sum of m).

%C a(A049084(A006378(n))) = 0; a(A049084(A048521(n))) > 0. [Corrected by _Reinhard Zumkeller_, Sep 27 2014]

%C a(n) <= 2 for n <= 10^5. Conjecture: sequence is bounded.

%C I would rather conjecture the opposite. Of course a(n) >= m implies n >= A006064(m), having more than A230857(m) digits, i.e., 14, 25 and 1111111111125 digits of n, for a(n) = 3, 4, 5. - _M. F. Hasler_, Nov 09 2018

%H Reinhard Zumkeller, <a href="/A107740/b107740.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A230093(prime(n)), i.e.: A107740 = A230093 o A000040. - _M. F. Hasler_, Nov 08 2018

%e A000040(26) = 101 = 91 + (9 + 1) = 100 + (1 + 0 + 0): a(26) = # {91, 100} = 2.

%t Table[p=Prime[n];c=0;i=1;While[i<p,If[i+Total[IntegerDigits[i]]==p,c=c+1];i++];c,{n,105}] (* _Jayanta Basu_, May 03 2013 *)

%o (Haskell)

%o a107740 n = length [() | let p = a000040 n,

%o m <- [max 0 (p - 9 * a055642 p) .. p - 1],

%o a062028 m == p]

%o -- _Reinhard Zumkeller_, Sep 27 2014

%o (PARI) apply( A107740(n)=A230093(prime(n)), [1..150]) \\ _M. F. Hasler_, Nov 08 2018

%Y Cf. A007953, A000040, A062028, A047791, A107741.

%Y Cf. A006378, A048521, A049084, A055642, A062028.

%K nonn,base

%O 1,26

%A _Reinhard Zumkeller_, May 23 2005