|
|
A374233
|
|
Irregular triangle read by rows where row n lists the primes containing at least one digit not seen in any smaller prime in base n, for n >= 2.
|
|
0
|
|
|
2, 2, 3, 2, 3, 5, 17, 2, 3, 5, 19, 2, 3, 5, 7, 29, 37, 2, 3, 5, 7, 11, 13, 2, 3, 5, 7, 11, 37, 53, 67, 2, 3, 5, 7, 11, 13, 17, 59, 83, 2, 3, 5, 7, 11, 19, 41, 61, 83, 101, 2, 3, 5, 7, 11, 17, 19, 31, 37, 43, 2, 3, 5, 7, 11, 13, 53, 73, 97, 109, 127, 149
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
2,1
|
|
LINKS
|
|
|
EXAMPLE
|
Row n=4 is 2, 3, 5, 17, which is 2_4, 3_4, 11_4, 101_4.
First few rows:
k=1 2 3 4 5 6 7 8
n=2: [2],
n=3: [2, 3],
n=4: [2, 3, 5, 17],
n=5: [2, 3, 5, 19],
n=6: [2, 3, 5, 7, 29, 37],
n=7: [2, 3, 5, 7, 11, 13],
n=8: [2, 3, 5, 7, 11, 37, 53, 67],
...
|
|
PROG
|
(Python)
from sympy.ntheory import digits, nextprime
def row(n):
if n == 2: return [2]
p, r, used = 2, [2], {2}
while len(used) < n:
while (ds:=set(digits(p:=nextprime(p), n)[1:])) <= used: pass
r.append(p)
used |= ds
return r
(PARI) isok(d, digs) = for (i=1, #d, if (!vecsearch(digs, d[i]), return(1)));
row(n) = my(digs=List(), v=List()); forprime(p=2, , my(d = digits(p, n)); if (isok(d, Vec(digs)), listput(v, p); for (i=1, #d, listput(digs, d[i])); listsort(digs, 1); if (#digs == n, return(Vec(v))); ); ); \\ Michel Marcus, Jul 02 2024
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,easy,nonn,tabf
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|