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!)
A131645 Beastly primes (version 2): primes containing 666 as a substring. 10

%I #26 May 18 2019 19:51:27

%S 6661,16661,26669,46663,56663,66601,66617,66629,66643,66653,66683,

%T 66697,76667,96661,96667,106661,106663,106669,116663,146669,166601,

%U 166603,166609,166613,166619,166627,166631,166643,166657,166667,166669,166679

%N Beastly primes (version 2): primes containing 666 as a substring.

%C These are the primes among the beastly numbers A051003.

%C There are several other definitions of beastly primes (see cross-references).

%C Asymptotic density n/log(n), since almost all primes are of this form.

%H Charles R Greathouse IV and Harry J. Smith, <a href="/A131645/b131645.txt">Table of n, a(n) for n = 1..20000</a>

%H Tony Padilla and Brady Haran, <a href="https://www.youtube.com/watch?v=zk_Q9y_LNzg">The Most Evil Number</a>, Numberphile video (2018)

%F a(n) ~ n log n. - _Charles R Greathouse IV_, Oct 13 2015

%t Select[Range[300000], StringFreeQ[ToString[ # ], "666"] == False && PrimeQ[ # ] &]

%t Select[Prime[Range[300000]],!StringFreeQ[ToString[ # ],"666"]&] (* _Zak Seidov_, Jan 09 2009 *)

%o (PARI) digitsIn(x) = 1 + log(x)\log(10)

%o allocatemem(932245000);

%o default(primelimit, 4294965247); m=1; forprime (p=6660, 68466670, d=digitsIn(p); for (i=1, d-3, t=10^i; u=p\t; x=u-(u\1000)*1000; if (x==666, print(m, " ", p); write("b131645.txt", m, " ", p); m++; break))) \\ _Harry J. Smith_, Jan 11 2009

%Y Cf. A051003, A186086, A046720, A138563, A232448, A321001.

%K base,nonn

%O 1,1

%A _Tanya Khovanova_, Sep 08 2007

%E Definition corrected by _Arkadiusz Wesolowski_, Feb 12 2011

%E Edited by _N. J. A. Sloane_, Feb 12 2011

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 April 16 14:51 EDT 2024. Contains 371749 sequences. (Running on oeis4.)