OFFSET
1,1
COMMENTS
Base considered is 10.
Observations:
- k cannot be a multiple of 7.
- k cannot have a digital root 7 as the sum of the digits would be divisible by 3.
- There is no k between 100 and 1000 that can form a prime number of this form after 95957 the next prime is 101710177.
- k cannot have a digital root equal to 1 or 4, because then in the concatenation it contributes 2 or 8 to the digital root of the number, and that number is then divisible by 3.
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
EXAMPLE
For k = 2, a(1) = 227.
For k = 3, a(2) = 337.
For k = 5, a(3) = 557.
For k = 8, a(4) = 887.
For k = 9, a(5) = 997.
MATHEMATICA
Select[Table[FromDigits[Flatten[{IntegerDigits[n], IntegerDigits[n], {7}}]], {n, 100}], PrimeQ] (* Alonso del Arte, Feb 01 2013 *)
PROG
(Python)
import numpy as np
from functools import reduce
def factors(n):
return reduce(list.__add__, ([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0))
for i in range(1, 2000):
p1=int(str(i)+str(i)+"7")
if len(factors(p1))<3:
print(p1, end=', ')
(Python)
from sympy import isprime
from itertools import count, islice
def agen(): yield from filter(isprime, (int(str(k)+str(k)+'7') for k in count(1)))
print(list(islice(agen(), 36))) # Michael S. Branicky, Jul 26 2022
CROSSREFS
KEYWORD
base,nonn,easy
AUTHOR
Abhiram R Devesh, Jan 26 2013
EXTENSIONS
a(34) and beyond from Michael S. Branicky, Jul 26 2022
STATUS
approved