[seqfan] Re: request for help with A036952

Richard Mathar mathar at strw.leidenuniv.nl
Fri Mar 12 19:50:43 CET 2010

One could define A036952 as "Numbers n such that A007088(n) is prime."
or "..such that their binary representation interpreted as a base-10 number is a prime" or...
It seems that this is "Union of A156059 and A065720"

A007088 := proc(n)
	dgs := convert(n,base,2) ;
	add(op(i,dgs)*10^(i-1),i=1..nops(dgs)) ;
end proc:
isA036952 := proc(n)
	isprime( A007088(n)) :
end proc:
A036952 := proc(n)
	if n =1 then
		for a from procname(n-1)+1 do
			if isA036952(a) then
				return a ;
			end if;
		end do:
	end if;
end proc:
seq(A036952(n),n=1..80) ;

More information about the SeqFan mailing list