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.

Previous Showing 21-24 of 24 results.

A375171 Square array T(n,k), n>0 and k>0, read by antidiagonals in ascending order, giving the smallest n*k-digit number that, if arranged in an n X k matrix, form k-digit reversible prime in each row and n-digit reversible prime in each column, or -1 if no such number exists.

Original entry on oeis.org

2, 37, 37, 337, 1111, 337, 3257, 111331, 113131, 3257, 32233, 13139731, 113101311, 11933371, 32233, 322573, 1111179779, 113101929311, 119310213191, 1119711779, 322573, 3222223, 111111131397, 113101167919739, 1193100990013911, 111971042937997, 111119111337, 3222223
Offset: 1

Views

Author

Jean-Marc Rebert, Aug 06 2024

Keywords

Examples

			T(3,2) = 111331 is the smallest 3*2-digit number that if arranged in a 3 X 2 matrix yields in each row and column an reversible prime, i.e.,
  11
  13
  31
-> 11 (1 time), 13 (1 time), 31 (1 time), 113 (1 time), 131 (1 time) are all reversible primes.
Table begins (upper left corner = T(1,1)):
     2       37          337             3257 ...
    37     1111       113131         11933371 ...
   337   111331    113101311     119310213191 ...
  3257 13139731 113101929311 1193100990013911 ...
   ...      ...          ...              ... ...
		

Crossrefs

Programs

  • PARI
    isp(x) = ispseudoprime(x) && ispseudoprime(fromdigits(Vecrev(digits((x)))));
    ispd(x) = ispseudoprime(fromdigits(x)) && ispseudoprime(fromdigits(Vecrev(x)));
    vp(n) = select(isp, [10^(n-1)..10^n-1]);
    isok(val, n, k) = my(d=digits(val), v=vector(k, i, []), j=1); for (i=1, #d, v[j] = concat(v[j], d[i]); j++; if (j>k, j=1);); for (i=1, k, if (!ispd(v[i]), return(0));); return(1);
    T(n,k) = my(v = vp(k), nbp = #v, nb = nbp^n); for (i=0, nb-1, my(d=digits(i, nbp)); if (d==[], d=vector(n)); while(#d x+1, d); my(s=""); for (i=1, #d, s = concat(s, Str(v[d[i]]))); my(val = eval(s)); if (isok(val, n, k), return(val));); \\ Michel Marcus, Aug 08 2024

Formula

T(1,n) = T(n,1) <= A177513(n) for n >1.
T(1,n) = T(n,1) = A177513(n) for n = 2..6.

A172384 Partial sums of A048895.

Original entry on oeis.org

1061, 2152, 3753, 5654, 15715, 25806, 41807, 60808, 167669, 277560, 446161, 645062, 1751943, 2861824, 4467905, 6273966, 8083057, 9969068, 11858079, 13767160, 24574041, 35383922, 46445733, 57537544, 69147225, 80845916
Offset: 1

Views

Author

Jonathan Vos Post, Feb 01 2010

Keywords

Comments

None of these partial sums of "bemirps: primes that yield a different prime when turned upside down with reversals of both being two more different primes" is itself prime. So what is the first (nontrivial) prime partial sum of bemirps? Of emirps? Of "norep emirps": primes with distinct digits which remain prime when reversed? Of emirpimes? I suspect that G. L. Honaker, Jr. would be delighted to have any of these.

Examples

			a(26) = 1061 + 1091 + 1601 + 1901 + 10061 + 10091 + 16001 + 19001 + 106861 + 109891 + 168601 + 198901 + 1106881 + 1109881 + 1606081 + 1806061 + 1809091 + 1886011 + 1889011 + 1909081 + 10806881 + 10809881 + 11061811 + 11091811 + 11609681 + 11698691.
		

Crossrefs

A256623 Number of distinct n-digit patterns in base 10 such that the pattern and its reverse are prime.

Original entry on oeis.org

4, 5, 29, 102, 796, 4769, 35905, 267789, 2101184, 16809690, 137487157, 1147385627, 9745119882
Offset: 1

Views

Author

Russell Y. Webb, Jul 11 2015

Keywords

Comments

Here, distinct numbers means under reversal. 13 and 31 are the same pattern under reversal and only count as one. The sequence can be calculated from the number of palindrome primes (A016115), p_i, and number of reversal primes (A048054), r_i. X_i = (r_i - p_i)/2 + p_i. The (r_i - p_i) term is always even, by construction (it is the count of reversible primes that are not their own reverse).
This sequence is the set cardinality of the prime numbers under a base-10 digit reversal identity operator.
Since there are no palindrome primes with even digits > 11 we know that the even entries are the same as half the number of reversible primes.

Crossrefs

Formula

a(n) = (A048054(n) + A016115(n))/2.

Extensions

a(11)-a(13) from Giovanni Resta, Jul 19 2015

A346021 Primes that are the first in a run of exactly 1 emirp.

Original entry on oeis.org

97, 107, 113, 149, 157, 167, 179, 199, 311, 359, 389, 907, 1009, 1061, 1069, 1091, 1181, 1301, 1321, 1429, 1439, 1453, 1471, 1487, 1559, 1619, 1657, 1669, 1753, 1789, 1811, 1867, 1879, 1901, 1913, 1979, 3049, 3067, 3121, 3163, 3169, 3221, 3251, 3257, 3319
Offset: 1

Views

Author

Lars Blomberg, Jul 14 2021

Keywords

Comments

There are large gaps in this sequence because all terms need to begin with 1, 3, 7, or 9 otherwise the reversal is composite.

Examples

			a(1) = 97 because of the three consecutive primes 89, 97, 101 only 97 is an emirp and this is the first such occurrence.
		

Crossrefs

Programs

  • Mathematica
    emirpQ[p_] := (r = IntegerReverse[p]) != p && PrimeQ[r]; p = Select[Range[3400], PrimeQ]; p[[1 + Position[Partition[emirpQ /@ p, 3, 1], {False, True, False}] // Flatten]] (* Amiram Eldar, Jul 14 2021 *)
  • Python
    from sympy import isprime, nextprime
    def isemirp(p): s = str(p); return s != s[::-1] and isprime(int(s[::-1]))
    def aupto(limit):
      alst, pvec, evec, p = [], [2, 3, 5], [0, 0, 0], 7
      while pvec[1] <= limit:
        if evec == [0, 1, 0]: alst.append(pvec[1])
        pvec = pvec[1:] + [p]; evec = evec[1:] + [isemirp(p)]; p = nextprime(p)
      return alst
    print(aupto(3319)) # Michael S. Branicky, Jul 14 2021
Previous Showing 21-24 of 24 results.