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!)
A227028 Triangular numbers whose binary conversion, read in decimal, is prime. 1

%I #27 Jun 25 2022 13:19:32

%S 3,253,595,703,2211,2485,4753,13695,22791,23005,35245,52003,54285,

%T 62835,82215,88831,119805,173755,219453,238395,252405,271953,275653,

%U 306153,325221,350703,406351,470935,482653,521731,607753,611065,634501,661825,675703,726615

%N Triangular numbers whose binary conversion, read in decimal, is prime.

%H K. D. Bajpai and Charles R Greathouse IV, <a href="/A227028/b227028.txt">Table of n, a(n) for n = 1..10000</a> (first 116 terms from Bajpai)

%e A000217(22) = 253 = 11111101_2, and 11111101_10 is prime, so 253 is a term.

%p with(numtheory):with(StringTools):

%p #=Triangular numbers whose binary conversion is prime when read in decimal.

%p PRS:= proc(x,y)

%p local i,a,b,c,count;

%p count:=1;

%p for i from x to y do;

%p a:=(1/2)*(i)*((i)+1);

%p b:=convert(a,binary);

%p c:=isprime(b);

%p if c then lprint(count,a); count:=count+1; fi; od;

%p lprint("Finished "):

%p end:

%p PRS(1,5000);

%o (PARI) isA036952(n)=my(v=binary(n));isprime(sum(i=1,#v,v[i]*10^(#v-i)))

%o is(n)=ispolygonal(n,3)&&isA036952(n)

%o select(isA036952,vector(10^3,i,i*(i+1)/2)) \\ _Charles R Greathouse IV_, Jun 28 2013

%Y Intersection of A036952 and A000217.

%K nonn,base,less

%O 1,1

%A _K. D. Bajpai_, Jun 27 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 05:48 EDT 2024. Contains 371265 sequences. (Running on oeis4.)