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.

A057630 Primes such that replacing each digit d with d copies of the digit d produces a prime. Zeros are allowed.

This page as a plain text file.
%I A057630 #30 Jan 01 2022 21:22:31
%S A057630 11,31,53,101,131,149,223,283,311,313,331,397,463,503,641,691,937,941,
%T A057630 1031,1049,1069,1301,1409,1439,1511,1609,1741,1871,1949,1993,1999,
%U A057630 2083,2111,2203,2447,2803,2939,3001,3011,3061,3163,3301,3391,3433,3499,3559
%N A057630 Primes such that replacing each digit d with d copies of the digit d produces a prime. Zeros are allowed.
%C A057630 "Replacing each digit d with d copies of the digit d" is the function A048376, well defined on the set of positive integers. Therefore (the range of) the present sequence is the largest subset of A000040 stable under the operation A048376.
%C A057630 A004022 is a subsequence. - _Chai Wah Wu_, Dec 19 2019
%H A057630 Chai Wah Wu, <a href="/A057630/b057630.txt">Table of n, a(n) for n = 1..10000</a>
%e A057630 E.g. 641 becomes 66666644441 which is also prime.
%t A057630 Select[Prime[Range[500]],PrimeQ[FromDigits[Flatten[Table[#,{#}]&/@ IntegerDigits[ #]]]]&]  (* _Harvey P. Dale_, Dec 18 2010 *)
%o A057630 (PARI) is_A057630(n)={isprime(A048376(n)) && isprime(n)} \\ _M. F. Hasler_, Jan 23 2013
%o A057630 (Python)
%o A057630 from sympy import isprime, nextprime
%o A057630 A057630_list, dlist, p = [], [str(d)*d for d in range(10)], 2
%o A057630 while len(A057630_list) < 10000:
%o A057630     if isprime(int(''.join(dlist[int(d)] for d in str(p)))):
%o A057630         A057630_list.append(p)
%o A057630     p = nextprime(p) # _Chai Wah Wu_, Dec 19 2019, corrected Jan 01 2022
%Y A057630 Cf. A004022, A057628.
%K A057630 nonn,base,nice,easy
%O A057630 1,1
%A A057630 _G. L. Honaker, Jr._, Oct 10 2000
%E A057630 More terms from _Patrick De Geest_, Oct 15 2000
%E A057630 Offset changed to 1, according to OEIS conventions, by _M. F. Hasler_, Jan 23 2013