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.

Showing 1-3 of 3 results.

A051003 Beastly (or hateful) numbers: numbers containing the string 666 in their decimal expansion.

Original entry on oeis.org

666, 1666, 2666, 3666, 4666, 5666, 6660, 6661, 6662, 6663, 6664, 6665, 6666, 6667, 6668, 6669, 7666, 8666, 9666, 10666, 11666, 12666, 13666, 14666, 15666, 16660, 16661, 16662, 16663, 16664, 16665, 16666, 16667, 16668, 16669, 17666, 18666
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[18666], ! StringFreeQ[ToString[#], "666"] &] (* Arkadiusz Wesolowski, Sep 08 2011 *)

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

Original entry on oeis.org

6661, 16661, 26669, 46663, 56663, 66601, 66617, 66629, 66643, 66653, 66683, 66697, 76667, 96661, 96667, 106661, 106663, 106669, 116663, 146669, 166601, 166603, 166609, 166613, 166619, 166627, 166631, 166643, 166657, 166667, 166669, 166679
Offset: 1

Views

Author

Tanya Khovanova, Sep 08 2007

Keywords

Comments

These are the primes among the beastly numbers A051003.
There are several other definitions of beastly primes (see cross-references).
Asymptotic density n/log(n), since almost all primes are of this form.

Crossrefs

Programs

  • Mathematica
    Select[Range[300000], StringFreeQ[ToString[ # ], "666"] == False && PrimeQ[ # ] &]
    Select[Prime[Range[300000]],!StringFreeQ[ToString[ # ],"666"]&] (* Zak Seidov, Jan 09 2009 *)
  • PARI
    digitsIn(x) = 1 + log(x)\log(10)
    allocatemem(932245000);
    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

Formula

a(n) ~ n log n. - Charles R Greathouse IV, Oct 13 2015

Extensions

Definition corrected by Arkadiusz Wesolowski, Feb 12 2011
Edited by N. J. A. Sloane, Feb 12 2011

A186086 Beastly primes (version 1): either 666 followed by 0's and a 1 or 7 at the right end or a palindrome with 666 in the center, 0's surrounding these digits, and 1 or 7 at both ends.

Original entry on oeis.org

6661, 16661, 66601, 76667, 700666007, 6660000000001, 666000000000001, 700000666000007, 70000006660000007, 6660000000000000000000000007, 66600000000000000000000000007, 1000000000000066600000000000001
Offset: 1

Views

Author

Arkadiusz Wesolowski, Feb 12 2011

Keywords

Comments

Differs from A131645 in that 26669, 46663, 56663, 66617, 66629, 66643, 66653, 66683, 66697, 96661, 96667, 106661, 106663, 106669, 116663, 146669, 166601, 166603, 166609, 166613, 166619, 166627, 166631, 166643, 166657, 166667, 166669, 166679, are not included here.
76667 is the largest beastly prime that does not contain the digit "0".

Crossrefs

Programs

  • Mathematica
    e = 14; p = 666*10^n + 1; q = (10^(n + 2) + 666)*10^n + 1; Select[Union[Table[p, {n, 2*e}], Table[p + 6, {n, 2*e}], Table[q, {n, e}], Table[q + 6*10^(2*n + 2) + 6, {n, e}]], PrimeQ] (* Arkadiusz Wesolowski, Sep 21 2011 *)
    Module[{nn=35,bp1,bp2,bp3,bp4}, bp1=FromDigits/@ Table[Join[PadRight[ {6,6,6},n1,0],{1}],{n1,3,nn}]; bp2=FromDigits/@ Table[Join[ PadRight[ {6,6,6},n2,0],{7}], {n2,3,nn}]; bp3=FromDigits/@ Table[Join[PadRight[ {1},n3,0], {6,6,6},PadLeft[ {1},n3,0]],{n3,1,nn/2}];bp4=FromDigits/@ Table[Join[PadRight[{7},n3,0],{6,6,6}, PadLeft[ {7},n3,0]],{n3,1,nn/2}]; Select[Sort[Join[bp1,bp2,bp3,bp4]],PrimeQ]] (* Harvey P. Dale, Jan 18 2017 *)

Extensions

Edited by N. J. A. Sloane, Feb 12 2011
a(10)-a(12) from Charles R Greathouse IV, Feb 12 2011
Showing 1-3 of 3 results.