login
A114009
Regular triangle where n-th row is composed of n primes beginning with prime(n).
2
2, 3, 31, 5, 53, 59, 7, 71, 73, 79, 11, 113, 1103, 1109, 1117, 13, 131, 137, 139, 1301, 1303, 17, 173, 179, 1709, 1721, 1723, 1733, 19, 191, 193, 197, 199, 1901, 1907, 1913, 23, 233, 239, 2309, 2311, 2333, 2339, 2341, 2347, 29, 293, 2903, 2909, 2917, 2927, 2939, 2953, 2957, 2963
OFFSET
1,1
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..11325 (rows 1..150)
EXAMPLE
One prime beginning with 2, followed by the two primes 3, 31 beginning with 3.
Triangle begins:
2;
3, 31;
5, 53, 59;
7, 71, 73, 79;
...
MATHEMATICA
f[n_] := Block[{c = 0, t = {}, p = Prime[n]}, k = PrimePi[p]; lng = Ceiling[Log[10, p]]; While[c < n, q = Prime[k]; If[p == FromDigits@Take[IntegerDigits@q, lng], c++; AppendTo[t, q]]; k++ ]; t]; Array[f, 10] // Flatten (* Robert G. Wilson v, Nov 17 2005 *)
PROG
(Python)
from itertools import count
from sympy import isprime, prime
def row(n):
if n == 1: return [2]
pn, c = prime(n), 1; out = [pn]
for d in count(1):
pow10 = 10**d
base = pn * pow10
for i in range(1, pow10, 2):
t = base + i
if isprime(t): out.append(t); c += 1
if c == n: return out
print([an for r in range(1, 11) for an in row(r)]) # Michael S. Branicky, Jan 19 2023
CROSSREFS
Cf. A000040 (first column).
Sequence in context: A048986 A093712 A035514 * A307453 A143665 A074479
KEYWORD
base,nonn,tabl
AUTHOR
Amarnath Murthy, Nov 12 2005
EXTENSIONS
More terms from Robert G. Wilson v, Nov 17 2005
Name clarified by Michel Marcus, Sep 16 2013
STATUS
approved