OFFSET
1,1
COMMENTS
Sum_{a(n) < x} 1/a(n) is asymptotic to (3/2)*log(log(log(x))) as x -> infinity; see Harman (2012). Thus the sequence is infinite. - Jonathan Sondow, Jun 07 2012
Harman 2012 also shows, under a conjecture about primes in short intervals, that there are 3/2 * x/(log x log log x) terms up to x. - Charles R Greathouse IV, Nov 17 2014
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Glyn Harman, Counting primes whose sum of digits is prime, J. Integer Seq., 15 (2012), Article 12.2.2.
Glyn Harman, Primes whose sum of digits is prime and metric number theory, Bull. Lond. Math. Soc. 44:5 (2012), pp. 1042-1049.
EXAMPLE
The digit sums of 11 and 13 are 1+1=2 and 1+3=4. Since 2 is prime and 4 is not, 11 is a member and 13 is not. - Jonathan Sondow, Jun 07 2012
MAPLE
select(n -> isprime(n) and isprime(convert(convert(n, base, 10), `+`)), [2, seq(2*i+1, i=1..1000)]); # Robert Israel, Nov 17 2014
MATHEMATICA
Select[Prime[Range[100000]], PrimeQ[Apply[Plus, IntegerDigits[ # ]]]&]
PROG
(PARI) isA046704(n)={local(s, m); s=0; m=n; while(m>0, s=s+m%10; m=floor(m/10)); isprime(n) & isprime(s)} \\ Michael B. Porter, Oct 18 2009
(PARI) is(n)=isprime(n) && isprime(sumdigits(n)) \\ Charles R Greathouse IV, Dec 26 2013
(Magma) [ p: p in PrimesUpTo(600) | IsPrime(&+Intseq(p)) ]; // Bruno Berselli, Jul 08 2011
(Haskell)
a046704 n = a046704_list !! (n-1)
a046704_list = filter ((== 1) . a010051 . a007953) a000040_list
-- Reinhard Zumkeller, Nov 13 2011
CROSSREFS
KEYWORD
base,nonn
AUTHOR
STATUS
approved