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-3 of 3 results.

A213884 For the smallest k >= 1, the smallest single-digit j such that (10^k-j)*10^n-1 is prime.

Original entry on oeis.org

1, 4, 1, 2, 2, 5, 1, 2, 1, 2, 1, 4, 4, 5, 5, 1, 4, 7, 1, 4, 2, 4, 4, 1, 2, 8, 7, 4, 1, 1, 2, 1, 1, 4, 7, 4, 1, 1, 7, 4, 8, 2, 7, 4, 8, 8, 7, 2, 2, 1, 8, 2, 8, 5, 7, 1, 8, 4, 8, 1, 4, 1, 4, 7, 1, 2, 8, 2, 4, 1, 4, 8, 4, 5, 8, 2, 1, 2, 7, 7, 5, 1, 4, 8, 7, 4, 1, 4, 2, 2, 4, 5
Offset: 1

Views

Author

Pierre CAMI, Jun 29 2012

Keywords

Comments

These j are the associated shifts to be paired with the k-values of A213883. There are no multiples of 3 here, as explained in A213883.
For the first 2200 values of n, there is always at least one pair (k,j) that delivers a prime with the conditions.

Examples

			j=1 associated with the prime 89, j=4 associated with 599, j=1 associated with 8999, j=2 with 79999 are the first 4 entries.
		

Crossrefs

Cf. A213883.

Programs

  • Maple
    A213884 := proc(n)
        for k from 1 do
            for j from 0 to 9 do
                if isprime( (10^k-j)*10^n-1) then
                    return j;
                end if;
            end do:
        end do:
        return 0 ;
    end proc: # R. J. Mathar, Jul 20 2012

A228144 Smallest k > n such that j*10^k + m*10^n - 1 is a prime number for at least a pair {j,m} with 0 < j < 10 and 0 < m < 10.

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 46, 46, 47, 48, 49, 50, 51, 52, 53, 55, 55, 56, 57, 59, 59, 60, 61, 62, 63, 64, 66, 66, 67, 68, 70
Offset: 1

Views

Author

Pierre CAMI, Aug 14 2013

Keywords

Comments

The prime numbers are the sum of a near repdigit number starting with the digit j followed by k digits 0 and a nearepdigit number starting with the digit (m-1) followed by n digits 9 for m>1, or for m=1 a repdigit number with n digits 9.
The first primes are :
109, 1399, 13999, 139999, 1199999, 16999999, 289999999, 2099999999, 10999999999, 239999999999, 1099999999999, 34999999999999, 349999999999999, 2399999999999999.
Conjecture: there is always at least one k for each n.

Examples

			1*10^1+1*10^2=109 prime so a(1)=2.
		

Crossrefs

A213882 Numbers b such that there is at least one number c and one single-digit number d such that (10^c-d)*10^b-1 and (10^c-d)*10^b+1 are twin primes with 0 < c < 2*b.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 13, 14, 15, 19, 21, 23, 26, 40, 43, 45, 52, 54, 55, 69, 77, 90, 99, 106, 128, 147, 176, 202, 267, 331, 458, 512, 555, 908, 942, 1004, 1123, 1374, 1386, 1467
Offset: 1

Views

Author

Pierre CAMI, Jun 26 2012

Keywords

Comments

The single-digit number d is always 1, 4, or 7 in this format because otherwise one of (10^c-d)*10^b+-1 is a multiple of 3.
For one b there may be more than one matching (c,d).
The sequence of associated minimum c values starts: 1, 1, 1, 2, 3, 6, 1, 4, 2, 11, 9, 4, 7, 12, 9, 9, 42, 62, 5, 31, 2, 72, 88, 141, 119, 181, 6, 38, 164, 132, 53, 293, 150, 704, 557, 980, 952, 1596, 529, 2221, 200, 169, 1371,... and their associated d values are 4, 4, 1, 1, 1, 1, 7, 4, 7, 4, 1, 1, 4, 1, 7, 1, 4, 1, 7, 7, 7, 4, 1, 7, 1, 7, 4, 4, 4, 7, 1, 1, 7, 7, 4, 4, 4, 1, 1, 7, 7, 1, 1, ....

Examples

			(10^1-7)*10^1-1=29 prime 31 the twin prime so a(1)=1.
(10^1-4)*10^2-1=599 prime 601 the twin prime so a(2)=2.
(10^1-1)*10^3-1=8999 prime 9001 the twin prime so a(3)=3.
(10^2-1)*10^4-1=989999 prime 990001 twin prime so a(4)=4.
(10^3-1)*10^5-1=99899999 prime.
(10^3-1)*10^5+1=99900001 twin prime so a(5)=5.
		

Crossrefs

Programs

  • Maple
    isA213882 := proc(b)
         local c,d,p;
        for c from 1 to 2*b-1 do
            for d from 0 to 9 do
                p := (10^c-d)*10^b-1 ;
                if isprime(p) and isprime(p+2) then
                    return true;
                end if;
            end do:
        end do:
        return false ;
    end proc:
    for n from 1 to 2000 do
        if isA213882(n) then
            printf("%d,\n",n);
        end if;
    end do; # R. J. Mathar, Jul 21 2012
Showing 1-3 of 3 results.