cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A352249 Emirps that can be written as p*q+p+q where p and q are emirps.

This page as a plain text file.
%I A352249 #26 Apr 18 2022 22:23:50
%S A352249 1439,1511,3023,14447,16127,16547,16883,19763,30059,33623,35099,35327,
%T A352249 36251,38219,39359,72911,75239,76463,78623,94559,96431,100799,103511,
%U A352249 107603,108191,108863,110807,118583,119039,119363,120539,121727,126359,127679,128879,129959,132299,132887,134999,136403
%N A352249 Emirps that can be written as p*q+p+q where p and q are emirps.
%H A352249 Robert Israel, <a href="/A352249/b352249.txt">Table of n, a(n) for n = 1..10000</a>
%e A352249 a(3) = 3023 is a term because 3023 = 17*167+17+167 and 3023, 17 and 167 are emirps.
%p A352249 revdigs:= proc(n) local L,i; L:= convert(n,base,10); add(L[-i]*10^(i-1),i=1..nops(L)) end proc:
%p A352249 isemirp:= proc(p) local r;
%p A352249    if not isprime(p) then return false fi;
%p A352249    r:= revdigs(p);
%p A352249    r <> p and isprime(r)
%p A352249 end proc:
%p A352249 E:= select(isemirp, [seq(ithprime(i),i=1..10^4)]):
%p A352249 nE:= nops(E): N:= E[1]*E[-1]+E[1]+E[-1]:
%p A352249 S:= {}:
%p A352249 for i from 1 to nE do
%p A352249   for j from i+1 to nE do
%p A352249     x:= E[i]*(E[j]+1)+E[j];
%p A352249     if x > N then break fi;
%p A352249     if isemirp(x) then S:= S union {x} fi;
%p A352249 od od:
%p A352249 sort(convert(S,list));
%Y A352249 Cf. A006567.
%K A352249 nonn,base
%O A352249 1,1
%A A352249 _J. M. Bergot_ and _Robert Israel_, Apr 17 2022