login
Numbers k such that k plus the sum of the digits of k is prime, and R(k) plus the sum of the digits of k is prime, where R(k) = A004086(k).
1

%I #13 Feb 19 2019 00:34:02

%S 1,10,11,19,35,37,53,59,73,91,95,100,101,143,181,218,232,250,272,296,

%T 298,323,341,343,365,383,385,418,436,454,490,509,527,547,563,583,610,

%U 634,650,656,670,692,725,727,745,749,767,787,812,814,838,850,892,905,947,949,1009

%N Numbers k such that k plus the sum of the digits of k is prime, and R(k) plus the sum of the digits of k is prime, where R(k) = A004086(k).

%C Numbers ending with zero(s) when reversed have fewer digits.

%H Nathaniel Johnston, <a href="/A191221/b191221.txt">Table of n, a(n) for n = 1..10000</a>

%e 143 and 341 belong to the sequence since 143 + (1+4+3) = 151 is prime and 341 + (3+4+1) = 349 is also a prime.

%p read(transforms): isA191221 := proc(n) local r: r:=digrev(n): return (isprime(n+digsum(n)) and isprime(r+digsum(r))): end: A191221 := proc(n) option remember: local k: if(n=1)then return 1: fi: for k from procname(n-1)+1 do if(isA191221(k))then return k: fi: od: end: seq(A191221(n),n=1..57); # _Nathaniel Johnston_, May 27 2011

%t nrQ[n_]:=Module[{idn=IntegerDigits[n],t},t=Total[idn];And@@PrimeQ[{n+t, FromDigits[Reverse[idn]]+t}]]; Select[Range[1200],nrQ] (* _Harvey P. Dale_, Feb 24 2013 *)

%Y Cf. A004086, A007953.

%K nonn,base,easy

%O 1,2

%A _Carmine Suriano_, May 27 2011