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.

A247593 Smallest prime not the middle of one 4 digits longer in base n.

Original entry on oeis.org

5, 1009, 764051, 7346914823
Offset: 2

Views

Author

James G. Merickel, Sep 20 2014

Keywords

Comments

a(n), n > 6, is intractable, and a(6) requires extensive resources: There are 360 candidate numbers for any candidate prime, all of which need to be composite, prefixing 30 2-digit numbers and suffixing the 12 ending in either 1 or 5. This compares with 400 for base 5, but in the base-6 case divisibility by 2 and 3 are already ruled out.

Examples

			In base 2--binary, decimal 2 and 3 have representations 10 and 11; and binary 101001 and 101111 represent decimal 41 and 47, so that a(2) > 3.  Binary 101--decimal 5--has the 4 binary candidates 1010101, 1010111, 1110101, and 1110111--decimal 85, 87, 117 and 119--requiring consideration for primality, but all are composite: a(2)=5.
		

Crossrefs

Programs

  • PARI
    ok(n,b)=my(D=b^#digits(n,b),b2=b^2);forstep(k=b^3*D+n*b2,b2*(b2-1)*D+n*b2,D*b2, if(nextprime(k)Charles R Greathouse IV, Sep 20 2014

A247699 Smallest prime such that, in binary, prefixing and suffixing n-bit numbers, the latter permitted to include leading 0's, does not produce a prime.

Original entry on oeis.org

3, 5, 523, 47543, 1951071427
Offset: 1

Views

Author

James G. Merickel, Sep 22 2014

Keywords

Examples

			2 in binary, 10, is the middle of the 4-bit prime 1101 (13 in decimal), so a(1) != 2. 3 in binary is 11, and the only number that needs to be checked is binary 1111, the composite 15. So a(1) = 3.
The facts that 63-4=59 and 63-16=47 are primes can be readily seen to rule out 2 and 3 for a(2); so 5 needs to be checked next, looking to see if any of 1010101, 1010111 1110101 or 1110111 may be prime.  The first and last of these are composite by sight, and the others convert to the recognizable composites 87 and 117 in decimal, confirming a(2)=5.
		

Crossrefs

Showing 1-2 of 2 results.