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.

Showing 1-2 of 2 results.

A353030 a(n) is the first emirp p such that there are exactly n unordered pairs (q,r) of emirps with p = q*r + q + r.

Original entry on oeis.org

13, 1439, 100799, 3548879, 14061599, 38342303, 120355199, 12555446399
Offset: 0

Views

Author

J. M. Bergot and Robert Israel, Apr 18 2022

Keywords

Comments

a(n) is the first prime p such that the digit-reversal rev(p) of p is a prime and there are exactly n pairs (q,r) of primes such that q < r, rev(q) and rev(r) are primes, and p = q*r + q + r.
From David A. Corneth, Jan 14 2023: (Start)
a(8) <= 121347071999, a(9) <= 195271876799, a(10) <= 10175362797599, a(11) <= 17482966300799.
For n >= 2, n == 3 (mod 4) and (n + 1)/4 has at least 2*n divisors. (End)

Examples

			a(3) = 3548879 because 3548879 = 17*197159 + 17 + 197159 = 359*9857 + 359 + 9857 = 953*3719 + 953 + 3719 and 3548879, 17, 197159, 359, 9857, 953, 3719 are emirps.
		

Crossrefs

Programs

  • Maple
    revdigs:= proc(n) local L, i; L:= convert(n, base, 10); add(L[-i]*10^(i-1), i=1..nops(L)) end proc:
    isemirp:= proc(p) local r;
       if not isprime(p) then return false fi;
       r:= revdigs(p);
       r <> p and isprime(r)
    end proc:
    g:= proc(n) local p,q, t,count;
      count:= 0;
      for t in select(`<`,numtheory:-divisors(n+1),floor(sqrt(n+1))) do
        if isemirp(t-1) and isemirp((n+1)/t-1) then
           count:= count+1;
        fi
      od;
      count
    end proc:
    V:= Array(0..6): vcount:= 0:
    p:= 2:
    while vcount < 7 do
      p:= nextprime(p);
      d:= ilog10(p);
      p1:= floor(p/10^d);
      if p1=2 then p:= nextprime(3*10^d)
      elif member(p1,{4,5,6}) then p:= nextprime(7*10^d)
      elif p1=8 then p:= nextprime(9*10^d)
      fi;
      if isemirp(p) then
        v:= g(p);
        if V[v] = 0 then vcount:= vcount+1; V[v]:= p; fi;
      fi
    od:
    convert(V,list);

Extensions

a(7) from David A. Corneth, Jan 14 2023

A353031 Emirps p such that both p and its digit reversal can be written as q*r+q+r where q and r are emirps.

Original entry on oeis.org

134999, 999431, 1383947, 1903103, 3013091, 3626339, 7282487, 7493831, 7842827, 9336263, 9366839, 9386639, 9562499, 9942659, 11230199, 11370743, 11394431, 11650571, 11769839, 11884079, 13182623, 13413599, 13449311, 13611023, 13683179, 13881323, 15123527, 15788771, 15925391, 15934463, 17505611
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Apr 18 2022

Keywords

Comments

Members of A352249 whose digit reversals are also in A352249.

Examples

			a(6) = 3626339 is a term because 3626339 = 37*95429 + 37 + 95429, its digit reversal 9336263 = 97*95267 + 97 + 95267, and 3626339, 37, 95429, 97 and 95267 are all emirps.
		

Crossrefs

Programs

  • Maple
    revdigs:= proc(n) local L, i; L:= convert(n, base, 10); add(L[-i]*10^(i-1), i=1..nops(L)) end proc:
    isemirp:= proc(p) local r;
       if not isprime(p) then return false fi;
       r:= revdigs(p);
       r <> p and isprime(r)
    end proc:
    filter:= proc(p) local q,t,flag;
      if not isprime(p) then return false fi;
      q:= revdigs(p);
      if q=p or not isprime(q) then return false fi;
      flag:= false;
    for t in select(`<`, numtheory:-divisors(p+1),floor(sqrt(p+1))) do
      if isemirp(t-1) and isemirp((p+1)/t-1) then flag:= true; break fi
    od;
    if not flag then return false fi;
    for t in select(`<`, numtheory:-divisors(q+1),floor(sqrt(q+1))) do
         if isemirp(t-1) and isemirp((q+1)/t-1) then return true fi
    od;
    false
    end proc:
    p:= 2: R:= NULL: count:= 0:
    while count < 40 do
      p:= nextprime(p);
    d:=  ilog10(p);
    p1:= floor(p/10^d);
      if p1=2 then p:= nextprime(3*10^d)
      elif member(p1,{4,5,6}) then p:= nextprime(7*10^d)
      elif p1=8 then p:= nextprime(9*10^d)
    fi;
      if filter(p) then R:= R, p; count:= count+1 fi;
    od:
    R;
Showing 1-2 of 2 results.