The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A083576 Least n-digit prime star number. 1

%I #19 Apr 12 2020 13:31:42

%S 13,181,1093,10333,100621,1040833,10085473,100000837,1000705861,

%T 10003758337,100012479337,1000001026513,10000000794181,

%U 100000078156441,1000000776555301,10000014919168441,100000008716411701

%N Least n-digit prime star number.

%H Robert Israel, <a href="/A083576/b083576.txt">Table of n, a(n) for n = 2..999</a>

%p f:= proc(n) local i,t,s;

%p t:= ceil(1/2 + sqrt(3+6*10^(n-1))/6);

%p for i from t do

%p s:= 6*i*(i-1)+1;

%p if isprime(s) then return s fi

%p od

%p end proc:

%p map(f, [$2..40]); # _Robert Israel_, Jun 12 2017

%t 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 *)

%o (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)",")) }

%Y Cf. A003154 (star numbers).

%K nonn,base

%O 2,1

%A _Jason Earls_, Jun 13 2003

%E More terms from _David Wasserman_, Nov 23 2004

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 13 09:44 EDT 2024. Contains 372504 sequences. (Running on oeis4.)