|
|
A088253
|
|
Smallest prime whose digits can be partitioned into n successive terms of an A.P. with common difference n, or 0 if no such number exists.
|
|
1
|
|
|
2, 13, 0, 15913, 38131823, 0, 55626976839097, 715233139475563, 0, 2939495969798999109119, 1324354657687990101112123, 0, 4760738699112125138151164177190203, 617589103117131145159173187201215229243, 0, 2339557187103119135151167183199215231247263
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
The terms of the A.P. in triangular form
2
1 3
0 0 0
1 5 9 13
3 8 13 18 23
0 0 0 0 0 0
...
Sequence contains the primes arising as a concatenation of the terms of the n-th row.
|
|
PROG
|
(Python)
from gmpy2 import is_prime
from itertools import count
def a(n): return next(t for t in (int("".join(str(i) for i in range(k, k+n*n, n))) for k in count(1)) if is_prime(t)) if n%3 else 0
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|