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.

A083576 Least n-digit prime star number.

Original entry on oeis.org

13, 181, 1093, 10333, 100621, 1040833, 10085473, 100000837, 1000705861, 10003758337, 100012479337, 1000001026513, 10000000794181, 100000078156441, 1000000776555301, 10000014919168441, 100000008716411701
Offset: 2

Views

Author

Jason Earls, Jun 13 2003

Keywords

Crossrefs

Cf. A003154 (star numbers).

Programs

  • Maple
    f:= proc(n) local i,t,s;
        t:= ceil(1/2 + sqrt(3+6*10^(n-1))/6);
        for i from t do
          s:= 6*i*(i-1)+1;
          if isprime(s) then return s fi
        od
    end proc:
    map(f, [$2..40]); # Robert Israel, Jun 12 2017
  • Mathematica
    With[{psn=Select[Table[6n(n-1)+1,{n,130*10^6}],PrimeQ]},Table[ SelectFirst[ psn,IntegerLength[#]==k&],{k,2,18}]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Apr 12 2020 *)
  • PARI
    star(n) = 6*n*(n-1)+1; L(n)=length(Str(n)); { stl(m)=print1(0","); k=1; for(n=2,m, while(!isprime(star(k)) || L(star(k))!=n, k++); print1(star(k)",")) }

Extensions

More terms from David Wasserman, Nov 23 2004