Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #45 Jul 26 2022 21:58:52
%S 227,337,557,887,997,11117,24247,26267,27277,29297,30307,32327,39397,
%T 48487,51517,54547,60607,62627,65657,68687,69697,72727,74747,78787,
%U 81817,87877,89897,90907,92927,93937,95957,101710177,101910197,103110317,103410347,103810387
%N Primes formed by concatenating k, k, and 7.
%C This sequence is similar to A030458, A052089, and A092994.
%C Base considered is 10.
%C Observations:
%C - k cannot be a multiple of 7.
%C - k cannot have a digital root 7 as the sum of the digits would be divisible by 3.
%C - There is no k between 100 and 1000 that can form a prime number of this form after 95957 the next prime is 101710177.
%C - 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.
%H Michael S. Branicky, <a href="/A210513/b210513.txt">Table of n, a(n) for n = 1..10000</a>
%e For k = 2, a(1) = 227.
%e For k = 3, a(2) = 337.
%e For k = 5, a(3) = 557.
%e For k = 8, a(4) = 887.
%e For k = 9, a(5) = 997.
%t Select[Table[FromDigits[Flatten[{IntegerDigits[n], IntegerDigits[n], {7}}]], {n, 100}], PrimeQ] (* _Alonso del Arte_, Feb 01 2013 *)
%o (Python)
%o import numpy as np
%o from functools import reduce
%o def factors(n):
%o return reduce(list.__add__, ([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0))
%o for i in range(1, 2000):
%o p1=int(str(i)+str(i)+"7")
%o if len(factors(p1))<3:
%o print(p1, end=',')
%o (Python)
%o from sympy import isprime
%o from itertools import count, islice
%o def agen(): yield from filter(isprime, (int(str(k)+str(k)+'7') for k in count(1)))
%o print(list(islice(agen(), 36))) # _Michael S. Branicky_, Jul 26 2022
%Y Cf. A030458, A052089, A092994.
%K base,nonn,easy
%O 1,1
%A _Abhiram R Devesh_, Jan 26 2013
%E a(34) and beyond from _Michael S. Branicky_, Jul 26 2022