login

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”).

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
OFFSET
2,1
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
print([an for b in range(2, 13) for an in row(b)]) # Michael S. Branicky, Jul 01 2024
(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
Cf. A033274.
Sequence in context: A306997 A056160 A106245 * A129568 A177892 A341758
KEYWORD
base,easy,nonn,tabf
AUTHOR
Nicolas Bělohoubek, Jul 01 2024
STATUS
approved