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!)
A350216 a(n) is the smallest suffix such that the numbers with k digits "6" prepended are primes for k = 1, 2, ..., n but not for k = n+1. 2
7, 19, 1, 173, 1547, 559667, 347707, 36695077, 139760989, 7931271479 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Similar sequences exist only for the digits "3" (A186143, A350214) and "9" (A186142): the corresponding sequences with the digits "1", "2", "4", "5", "7" or "8" are not possible because if Xn and XXn are prime, then XXXn will be a multiple of 3 when X = 1, 2, 4, 5, 7 or 8.
When a'(n) is the smallest suffix as in the Name but without "not for k = n+1", then the data becomes: 1, 1, 1, 173, ... In this case, a'(1) = 1 because 61 is prime, and 1 is the smallest number with this property.
LINKS
EXAMPLE
a(1) = 7 because 67 is prime while 667 = 23*29, and 7 is the smallest number with this property.
a(2) = 19 because 619 and 6619 are primes while 66619 = 7*31*307, and 19 is the smallest number with this property.
a(3) = 1 because 61, 661 and 6661 are primes while 66661 = 7*89*107, and 1 is the smallest number with this property.
PROG
(PARI) isok(k, n)= my(s=Str(k)); for (i=1, n, s = concat("6", s); if (!isprime(eval(s)), return(0))); return (!isprime(eval(concat("6", s))));
a(n) = my(k=1); while(! isok(k, n), k++); k; \\ Michel Marcus, Dec 20 2021
(Python)
from sympy import isprime
def a(n):
an = 0
while True:
an, k = an+1, 1
while isprime(int("6"*k+str(an))): k += 1
if k-1 == n: return an
print([a(n) for n in range(1, 8)]) # Michael S. Branicky, Dec 20 2021
CROSSREFS
Sequence in context: A219290 A156238 A156295 * A362309 A226932 A245167
KEYWORD
nonn,base,more
AUTHOR
Bernard Schott, Dec 20 2021
EXTENSIONS
a(5)-a(7) from Michel Marcus, Dec 20 2021
a(8)-a(10) from Michael S. Branicky, Dec 20 2021
STATUS
approved

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 23 19:56 EDT 2024. Contains 371916 sequences. (Running on oeis4.)