login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A245759 Primes p such that concatenation of p with its digit sum is also prime. 3

%I

%S 61,83,137,139,197,199,223,241,281,313,337,353,373,397,421,449,557,

%T 577,647,719,773,809,881,937,953,971,991,1033,1039,1091,1093,1097,

%U 1129,1187,1217,1277,1291,1297,1303,1321,1361,1381,1523,1543,1567,1657,1693,1723,1907

%N Primes p such that concatenation of p with its digit sum is also prime.

%H K. D. Bajpai, <a href="/A245759/b245759.txt">Table of n, a(n) for n = 1..8160</a>

%e 61 is in the sequence because it is prime and the concatenation[ 61 with (6 + 1)] = 617 is also prime.

%e 197 is in the sequence because it is prime and the concatenation[ 197 with (1 + 9 + 7)] = 19717 is also prime.

%p with(StringTools): A245759 := proc() local a, b, d, e; a:=ithprime(m); b:=add( i,i = convert((a), base, 10))(a); d:=parse(cat(a, b)); e:= parse(cat(b, a)); if isprime(d) then RETURN (a); fi; end: seq(A245759 (), m=1..1000);

%o (PARI)

%o for(n=1,10^3,p=prime(n);if(isprime(eval(concat(Str(p),Str(sumdigits(p))))),print1(p,", "))) \\ _Derek Orr_, Jul 31 2014

%Y Cf. A000040, A019518, A105184, A244424, A246428.

%K nonn,base

%O 1,1

%A _K. D. Bajpai_, Jul 31 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 6 18:59 EDT 2020. Contains 334832 sequences. (Running on oeis4.)