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.

A133583 Index of smallest prime number where n consecutive leading digits of the index match n consecutive leading digits in the prime.

Original entry on oeis.org

169, 5591, 6438, 6455
Offset: 1

Views

Author

Enoch Haga, Sep 17 2007, Sep 18 2007

Keywords

Comments

Puzzle 217 on Carlos Rivera's The Prime Puzzles & Problems Connection has anticipated some of the concepts of this sequence. Several people have contributed to this puzzle and some of its terms may be seen there. In particular, the first page of the puzzle includes a term in this sequence.
72258*10^37 < a(5) < 74142*10^37. - Max Alekseyev, Sep 29 2015

Examples

			a(2)=5591 because this is the index of prime 55001 where n=2 and 55 in the index matches the first two leading digits of the prime.
		

Crossrefs

Cf. A133584.

Programs

  • Maple
    A133583 := proc(n)
        local p,i,dgsi,dgsp,d,wrks;
        p := 2 ;
        for i from 1 do
            dgsi := convert(i,base,10) ;
            dgsp := convert(p,base,10) ;
            if nops(dgsi) >= n and nops(dgsp) >= n then
                wrks := true;
                for d from 1 to n do
                    if op(-d,dgsi) <> op(-d,dgsp) then
                        wrks := false ;
                        break;
                    end if;
                end do:
                if wrks then
                    return i;
                end if;
            end if;
            p := nextprime(p) ;
        end do:
    end proc: # R. J. Mathar, Feb 14 2015
  • Mathematica
    Table[ind = 10^(n - 1); While[Take[IntegerDigits[ind], n] !=
    Take[IntegerDigits[Prime[ind]], n], ind++]; ind, {n, 1, 4}] (* Robert Price, Apr 11 2019 *)

Formula

a(n) = A000720(A133584(n))