login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A286342 Smallest beastly prime in base n: smallest prime p with a base-n expansion containing the substring 666. 0
2399, 3511, 4919, 6661, 2129, 11311, 14281, 17729, 21701, 26209, 26407, 37049, 43441, 50527, 252823, 66931, 64153, 86561, 19531, 109673, 122651, 136601, 151561, 167593, 184703, 202949, 222361, 242971, 50441, 287933, 261707, 338137, 365291, 393847, 79259 (list; graph; refs; listen; history; text; internal format)
OFFSET

7,1

COMMENTS

No such p exists for n < 7.

Does p exist for every n > 6?

Answer: yes. For a given n, consider the sequence {k*n^4 + 6*n^3 + 6*n^2 + 6*n + 1}. By Dirichlet's theorem on arithmetic progressions, there exists infinitely many primes of this form, and they all end in 6661 in base n. - Jianing Song, Feb 03 2019

LINKS

Table of n, a(n) for n=7..41.

Wikipedia, Dirichlet's theorem on arithmetic progressions

FORMULA

n^3 < a(n) << n^20. - Charles R Greathouse IV, May 13 2017

Probably n^3 < a(n) < n^4 for all but finitely many n. It appears the only exceptions are 21 and 52. If there are any others they are larger than 10^7; the expected number of larger exceptions is about 10^-89814. - Charles R Greathouse IV, May 13 2017

EXAMPLE

For n = 7: 2399 written in base 7 is 6665. Since 2399 is the smallest prime that contains the substring 666 in its base-7 expansion, a(7) = 2399.

MATHEMATICA

Table[k = FromDigits[#, b]; While[Nand[PrimeQ@ k, Length@ SequencePosition[IntegerDigits[k, b], #] > 0], k++]; k, {b, 7, 41}] &@ ConstantArray[6, 3] (* Michael De Vlieger, May 08 2017 *)

PROG

(PARI) a(n) = forprime(p=1, , my(subs=[6, 6, 6], dbn=digits(p, n)); for(k=1, #dbn-2, my(v=[dbn[k], dbn[k+1], dbn[k+2]]); if(v==subs, return(p))))

CROSSREFS

Cf. A131645.

Sequence in context: A323344 A323341 A108055 * A204357 A043420 A233880

Adjacent sequences:  A286339 A286340 A286341 * A286343 A286344 A286345

KEYWORD

nonn,base,less

AUTHOR

Felix Fröhlich, May 07 2017

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 7 01:26 EDT 2020. Contains 334836 sequences. (Running on oeis4.)