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-6 of 6 results.

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

A156166 Numbers k > 0 such that (10^(k+2) + 666)*10^k + 1 is prime.

Original entry on oeis.org

1, 14, 43, 507, 609, 2473, 2624, 28292, 181299
Offset: 1

Views

Author

M. F. Hasler, Feb 10 2009

Keywords

Comments

Or, indices of primes in the sequence 16661, 1066601, 100666001, 10006660001,... Ondrejka calls these "beastly palindromic primes".
In popular culture: the number generated by a(2), 1000000000000066600000000000001, also known as Belphegor's Prime, was used as a plot device in Episode "Just a Regular Irregular" of the "Elementary" TV series (first aired Nov/13/2014). - Serge Batalov, Nov 15 2014

Crossrefs

Cf. A082700 and search results for 16661.
Cf. A232448 (a(n) - 1).

Programs

  • Magma
    [n: n in [1..500] | IsPrime((10^(n+2)+666)*10^n+1)]; // Vincenzo Librandi, Nov 15 2014
  • Maple
    A156166:=n->`if`(isprime((10^(n+2)+666)*10^n+1), n, NULL): seq(A156166(n), n=1..10^3); # Wesley Ivan Hurt, Nov 16 2014
  • Mathematica
    Select[Range[10^3], PrimeQ[(10^(# + 2) + 666)*10^# + 1] &] (* Arkadiusz Wesolowski, Sep 08 2011 *)
  • PARI
    for( n=1,9999, ispseudoprime((10^(n+2)+666)*10^n+1) & print1(n","))
    

Formula

a(n) = A232448(n) + 1.

Extensions

a(8) = 28292 (discovered on Jan 05 2004, by Daniel Heuer), Arkadiusz Wesolowski, Mar 16 2011
a(9) = 181299 from Serge Batalov, Nov 15 2014

A232449 The palindromic Belphegor numbers: (10^(n+3)+666)*10^(n+1)+1.

Original entry on oeis.org

16661, 1066601, 100666001, 10006660001, 1000066600001, 100000666000001, 10000006660000001, 1000000066600000001, 100000000666000000001, 10000000006660000000001, 1000000000066600000000001, 100000000000666000000000001, 10000000000006660000000000001, 1000000000000066600000000000001
Offset: 0

Views

Author

Stanislav Sykora, Nov 24 2013

Keywords

Comments

Though this sequence rarely contains primes (see A232448), most of its members tend to contain a few very large prime factors. The name stems from 'Belphegor's Prime', a(13), which was so named by Clifford Pickover (see link). [Comment corrected by N. J. A. Sloane, Dec 14 2015]

Crossrefs

Subsequence of A118598.

Programs

  • Mathematica
    A232449[n_] := 100^(n+2) + 666*10^(n+1) + 1; Array[A232449, 15, 0] (* or *)
    LinearRecurrence[{111, -1110, 1000}, {16661, 1066601, 100666001}, 15] (* Paolo Xausa, Mar 27 2025 *)
  • PARI
    Belphegor(k)=(10^(k+3)+666)*10^(k+1)+1; nmax = 498; v = vector(nmax); for (n=0,#v-1, v[n+1]=Belphegor(n))

Formula

a(n) = 666*10^(n+1)+100^(n+2)+1.
G.f.: (16661 - 782770*x + 767000*x^2) / ((1 - x)*(1 - 10*x)*(1 - 100*x)). [Bruno Berselli, Nov 25 2013]

A232450 Largest prime factor of the Belphegor number B(n) = (10^(n+3) + 666)*10^(n+1) + 1.

Original entry on oeis.org

16661, 1103, 1417831, 1143749, 14282381, 11699423, 1950071, 7503425119, 3837692792387, 145857793, 76607717987, 1755833757671518620617, 17416012536871141, 1000000000000066600000000000001, 16540928199996367, 744657085412168192717253704669
Offset: 0

Views

Author

Stanislav Sykora, Nov 24 2013

Keywords

Comments

The Belphegor numbers (A232449), though not often prime themselves (see A232448), tend to contain very large prime factors and are therefore hard to factorize.

Crossrefs

Cf. A232448 (indices of Belphegor primes), A232449 (Belphegor numbers).

Programs

  • Mathematica
    Table[FactorInteger[(10^(n + 3) + 666)*10^(n + 1) + 1][[-1, 1]], {n, 20}] (* T. D. Noe, Nov 25 2013 *)
  • PARI
    default(factor_proven,1);
    Belphegor(k)=(10^(k+3)+666)*10^(k+1)+1;
    LargestPrimeFactor(k)={local(f);f=factor(k);return(f[#f[,1],1])};
    nmax=40; v=vector(nmax);
    for (n=0,#v-1,v[n+1]=LargestPrimeFactor(Belphegor(n));print(v[n+1]))

A232451 Number of prime divisors of (10^(n+3) + 666)*10^(n+1) + 1 (see A232449) counted with multiplicity.

Original entry on oeis.org

1, 2, 2, 3, 4, 3, 5, 4, 2, 5, 5, 4, 3, 1, 2, 3, 6, 4, 3, 6, 4, 2, 4, 5, 2, 4, 3, 6, 7, 7, 4, 3, 2, 4, 5, 3, 4, 7, 4, 6, 6, 4, 1, 4, 5, 4, 6, 6, 5, 3, 6, 4, 6, 6, 4, 11, 6, 6, 6, 4, 5, 5, 2, 6, 7
Offset: 0

Views

Author

Stanislav Sykora, Nov 24 2013

Keywords

Comments

The Belphegor numbers (A232449), though large and rarely prime (A232448), tend to contain only very few prime factors. One wonders whether this sequence might be bounded.
From Robert Israel, Feb 23 2017: (Start)
The sequence is unbounded.
Indeed, if p is in A001913 such that the polynomial 10^4 x^2 + 6660 x + 1 has a simple root mod p, then for all k there exist Belphegor numbers divisible by p^k.
For example, p=29 works; we have A232449(n) divisible by 29^k for n = 6, 158, 5522, 41570, 8153130, 107172470, 3553045502, 136793469406, 2761185750502, 142830181379582, ...
(End)

Crossrefs

Cf. A001913, A232448 (indices of Belphegor primes), A232449 (Belphegor numbers), A232450 (largest prime factor of A232449(n)).

Programs

  • Magma
    [&+[p[2]: p in Factorization(666*10^(n+1)+100^(n+2)+1)]: n in [0..40]]; // Bruno Berselli, Nov 27 2013
  • Maple
    seq(numtheory:-bigomega(10^(2*n+4)+666*10^(n+1)+1), n=0..30); # Robert Israel, Feb 23 2017
  • Mathematica
    Table[Total[Transpose[FactorInteger[(10^(n + 3) + 666)*10^(n + 1) + 1]][[2]]], {n, 0, 25}] (* T. D. Noe, Nov 28 2013 *)
  • PARI
    a(n)=bigomega(10^(n+1)*(10^(n+3)+666)+1) \\ Charles R Greathouse IV, Nov 26 2013
    

Extensions

a(45)-a(64) from Amiram Eldar, Apr 11 2020

A321001 Primes which contain the fax number of the beast (667).

Original entry on oeis.org

1667, 6673, 6679, 10667, 15667, 16673, 25667, 31667, 34667, 36671, 36677, 39667, 42667, 45667, 46679, 49667, 52667, 54667, 55667, 56671, 57667, 61667, 63667, 64667, 66701, 66713, 66721, 66733, 66739, 66749, 66751, 66763, 66791, 66797, 70667, 76667
Offset: 1

Views

Author

N. J. A. Sloane, Nov 01 2018

Keywords

Comments

Since the so-called beastly primes (containing the digit string 666) were mentioned recently in a Numberphile video (see link), I guess it is now OK to include these numbers (which are based on the old convention that your fax number was one more than your telephone number) in the OEIS.
Note that there is no analog of A232448, because 1 0^k 667 0^k 1 is always divisible by 3 and is never prime.

Crossrefs

Cf. beastly primes A131645, also A232448.
Showing 1-6 of 6 results.