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

 

Logo

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A245763 Primes p such that the concatenation of p with its digit sum and the concatenation of the digit sum of p with p are both prime. 2
61, 337, 353, 449, 577, 881, 937, 971, 991, 1091, 1129, 1217, 1297, 1381, 1543, 1657, 1693, 2069, 2137, 2539, 2621, 2791, 3347, 3727, 3943, 4157, 4201, 4243, 4513, 4861, 5077, 5431, 5701, 5927, 6043, 6317, 6353, 6421, 6449, 6661, 6917, 7109, 7127, 7507, 7547 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Intersection of A246428 and A245759.

LINKS

K. D. Bajpai, Table of n, a(n) for n = 1..3160

EXAMPLE

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

337 is in the sequence because it is prime; concatenation[337 with (3 + 3 + 7)] = 33713 is prime and concatenation[(3 + 3 + 7) with 337] = 13337 is also prime.

MAPLE

with(StringTools): A245763 := proc() local a, b, d, e; a:=ithprime(n); b:=add( i, i = convert((a), base, 10))(a); d:=parse(cat(a, b)); e:= parse(cat(b, a)); if isprime(d)and isprime(e) then RETURN (a); fi; end: seq(A245763 (), n=1..2000);

MATHEMATICA

cdsQ[n_]:=Module[{ds=Total[IntegerDigits[n]]}, AllTrue[ {n*10^IntegerLength[ ds]+ ds, ds*10^IntegerLength[ n]+n}, PrimeQ]]; Select[Prime[Range[1100]], cdsQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Sep 23 2016 *)

PROG

(PARI)

for(n=1, 10^4, p=prime(n); d=Str(sumdigits(p)); if(isprime(eval(concat(Str(p), d)))&&isprime(eval(concat(d, Str(p)))), print1(p, ", "))) \\ Derek Orr, Jul 31 2014

(Python)

from sympy import prime, isprime

A245763 = [int(n) for n in (str(prime(x)) for x in range(1, 10**3))

..........if isprime(int(str(sum([int(d) for d in n]))+n)) and

..........isprime(int(n+str(sum([int(d) for d in n]))))]

# Chai Wah Wu, Aug 27 2014

CROSSREFS

Cf. A000040, A019518, A244424, A246428, A245759.

Sequence in context: A154601 A188136 A142953 * A130117 A189174 A304062

Adjacent sequences:  A245760 A245761 A245762 * A245764 A245765 A245766

KEYWORD

nonn,base

AUTHOR

K. D. Bajpai, Jul 31 2014

STATUS

approved

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 January 23 13:40 EST 2020. Contains 331171 sequences. (Running on oeis4.)