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.

A210513 Primes formed by concatenating k, k, and 7.

This page as a plain text file.
%I A210513 #45 Jul 26 2022 21:58:52
%S A210513 227,337,557,887,997,11117,24247,26267,27277,29297,30307,32327,39397,
%T A210513 48487,51517,54547,60607,62627,65657,68687,69697,72727,74747,78787,
%U A210513 81817,87877,89897,90907,92927,93937,95957,101710177,101910197,103110317,103410347,103810387
%N A210513 Primes formed by concatenating k, k, and 7.
%C A210513 This sequence is similar to A030458, A052089, and A092994.
%C A210513 Base considered is 10.
%C A210513 Observations:
%C A210513 - k cannot be a multiple of 7.
%C A210513 - k cannot have a digital root 7 as the sum of the digits would be divisible by 3.
%C A210513 - 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 A210513 - 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 A210513 Michael S. Branicky, <a href="/A210513/b210513.txt">Table of n, a(n) for n = 1..10000</a>
%e A210513 For k = 2, a(1) = 227.
%e A210513 For k = 3, a(2) = 337.
%e A210513 For k = 5, a(3) = 557.
%e A210513 For k = 8, a(4) = 887.
%e A210513 For k = 9, a(5) = 997.
%t A210513 Select[Table[FromDigits[Flatten[{IntegerDigits[n], IntegerDigits[n], {7}}]], {n, 100}], PrimeQ] (* _Alonso del Arte_, Feb 01 2013 *)
%o A210513 (Python)
%o A210513 import numpy as np
%o A210513 from functools import reduce
%o A210513 def factors(n):
%o A210513     return reduce(list.__add__, ([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0))
%o A210513 for i in range(1, 2000):
%o A210513     p1=int(str(i)+str(i)+"7")
%o A210513     if len(factors(p1))<3:
%o A210513         print(p1, end=',')
%o A210513 (Python)
%o A210513 from sympy import isprime
%o A210513 from itertools import count, islice
%o A210513 def agen(): yield from filter(isprime, (int(str(k)+str(k)+'7') for k in count(1)))
%o A210513 print(list(islice(agen(), 36))) # _Michael S. Branicky_, Jul 26 2022
%Y A210513 Cf. A030458, A052089, A092994.
%K A210513 base,nonn,easy
%O A210513 1,1
%A A210513 _Abhiram R Devesh_, Jan 26 2013
%E A210513 a(34) and beyond from _Michael S. Branicky_, Jul 26 2022