This site is supported by donations to The OEIS Foundation.



Annual Appeal: Today, Nov 11 2014, is the 4th anniversary of the launch of the new OEIS web site. 70,000 sequences have been added in these four years, all edited by volunteers. Please make a donation (tax deductible in the US) to help keep the OEIS running.

(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A093338 Scan primes, write down initial digit if it is a prime. 0


%S 2,3,5,7,2,2,3,3,5,5,7,7,7,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,

%T 3,3,3,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,5,5,5,5,5,5,5,7,7,7,7,7,7,7,7,7,

%U 7,7,7,7,7,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2

%N Scan primes, write down initial digit if it is a prime.

%o (PARI) firstpr(n) = { forprime(x=2,n, fd = eval(mid(Str(x),1,1)); if(isprime(fd),print1(fd",")) ) } \ Get a substring of length n from string str starting at position s in str. mid(str,s,n) = { v =""; tmp = Vec(str); ln=length(tmp); for(x=s,s+n-1, v=concat(v,tmp[x]); ); return(v) }

%Y Cf. A077648.

%K base,nonn

%O 2,1

%A _Cino Hilliard_, Apr 25 2004

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

Content is available under The OEIS End-User License Agreement .

Last modified December 21 09:07 EST 2014. Contains 252300 sequences.