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.

A297962 Take a prime, convert it to base 2. Remove its most significant digit and its least significant digit; repeat this process. a(n) is the least prime that, in the first n steps of this process, generates n primes.

Original entry on oeis.org

13, 59, 631, 7039, 64063, 761087, 3619327, 74347519, 1577707519, 22200700927, 1668463173631, 290703062134783, 3413184213843967, 121597545150218239
Offset: 1

Views

Author

Paolo Iachia, Paolo P. Lava, Jan 09 2018

Keywords

Comments

From Jon E. Schoenfield, Jan 11 2018: (Start)
a(15) <= 6937869050647642111;
a(16) <= 7088202090368908328959;
a(17) <= 348624306087955627410980863. (End)

Examples

			a(1) = 13, because 13 in base 2 is 1101, 10 is the prime 2; and 13 is the least prime with this property.
a(2) = 59, because 59 = 111011_2, 1101_2 is the prime 13, 10_2 is the prime 2; and 59 is the least prime with this property.
a(3) = 631, because 631 = 1001110111_2, 111011_2 is the prime 59, 1101_2 is the prime 13, 10_2 is the prime 2; and 631 is the least prime with this property.
		

Crossrefs

Programs

  • Java
    private static BigInteger SearchAn() { BigInteger BIW, BICore; int tN=10; int j3; static final BigInteger BILim = new BigInteger("1000000000"); static final BigInteger BI2 = new BigInteger("2");for (BIW=BI2; BIW.compareTo(BILim)<0; BIW=BIW.add(BI2)) { BICore = BIW;  for (j3=1;j3
    				
  • Maple
    with(numtheory): P:=proc(q) local a,i,k,n,ok,x; x:=1;
    for n from 1 to q do for k from x to q do
    a:=convert(ithprime(k),binary,decimal);
    ok:=1; for i from 1 to n do a:=trunc(a/10) mod 10^(ilog10(a)-1);
    if not isprime(convert(a,decimal,binary)) then ok:=0; break; fi; od;
    if ok=1 then x:=k; print(ithprime(k)); break; fi; od; od; end: P(10^10);
  • Mathematica
    With[{s = Map[LengthWhile[#, PrimeQ] &@ NestWhileList[((# - 2^Floor@ Log2@ #) - 1)/2 &, #, # > 2 &] &, Prime@ Range[2^18]]}, Map[Prime@ First@ FirstPosition[s, #] &, Range@ Max@ s]] (* Michael De Vlieger, Jan 10 2018 *)

Formula

Let C(p) be the result of removing the MSD and the LSD of a prime p. C(p) = (p - 2^floor(log_2(p)) - 1)/2.

Extensions

a(10)-a(14) from Jon E. Schoenfield, Jan 11 2018