login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A227371 Numbers n such that prime(n) + reversal(prime(n)) is a square. 2

%I #24 Jan 24 2016 10:00:18

%S 1,10,15,23,56,89,2279,2581,2683,6329,7845,7942,26074,26146,26290,

%T 26651,26871,27080,27960,28687,28898,29396,29539,29824,30038,30333,

%U 30404,30472,30955,31025,31097,31168,32076,32143,32429,33502,33564,41608,42011,42148,42696

%N Numbers n such that prime(n) + reversal(prime(n)) is a square.

%C See A059799 for the sequence of prime numbers.

%H K. D. Bajpai, <a href="/A227371/b227371.txt">Table of n, a(n) for n = 1..340</a>

%e a(2)=10: prime(10)=29. Reversing digits gives 92. 29+92 = 121 = 11^2.

%p with(StringTools):

%p K := proc(n) local a,b,d,e; a :=ithprime(n): b:=parse(Reverse(convert((a),string))): d:=a+b;e:=evalf(sqrt(d));if e=floor(e) then RETURN (n) fi:

%p end:

%p seq(K(n), n=1..100000); # _K. D. Bajpai_, Jul 08 2013

%p with(StringTools):

%p K:=proc()local n,a,b,c,d,e; c:=1; for n from 1 to 2000000 do; a:=ithprime(n);b:=parse(Reverse(convert((a),string)));d:=a+b;e:=evalf(sqrt(d));if e=floor(e) then lprint(c,n);c:=c+1;fi;od; end: K(); # _K. D. Bajpai_, Jul 08 2013

%t Select[Range[50000],IntegerQ[Sqrt[Prime[#]+IntegerReverse[Prime[#]]]]&] (* The program uses the IntegerReverse function from Mathematica version 10 *) (* _Harvey P. Dale_, Jan 24 2016 *)

%Y Cf. A061231.

%K nonn,base

%O 1,2

%A _K. D. Bajpai_, Jul 08 2013

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 03:41 EDT 2024. Contains 371264 sequences. (Running on oeis4.)