|
|
A249405
|
|
Numbers such that any two adjacent digits sum to a prime and such that any digit 0,...,9 can be inserted somewhere preserving this property.
|
|
1
|
|
|
411203, 411205, 3202114, 4111203, 4111205, 4112023, 4112025, 5202114, 30211234, 30232114, 30234114, 30252114, 30256114, 32021114, 32032114, 32034114, 32052114, 32056114, 32074114, 32076114, 32112034, 32112074, 32302114, 32502114, 41111203
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
"Inserted" includes the possibility of appending the digit or prefixing it if nonzero.
There are only two terms, a(1)=411203 and a(2)=411205, below 10^6, and six more terms below 10^7, but many 8-digit terms.
|
|
LINKS
|
|
|
EXAMPLE
|
a(n)=411203 is the least member of A182175 such that each of the digits 0-9 can be inserted somewhere such that another term of A182175 is obtained; e.g., 411203[0], 41[1]1203, 41[2]1203, 4112[3]03, 41[4]1203, 4112[5]03, 41[6]1203, [7]411203, 411203[8], [9]411203.
|
|
PROG
|
(PARI) is(n)={is_A182175(n)||return; n=digits(n); !for(D=0, 9, isprime(n[#n]+D)&&next; D&&isprime(n[1]+D)&&next; for(i=3-!D, #n-1, isprime(n[i-1]+D)&&isprime(n[i]+D)&&next(2)); return)} \\ A digit D=0 may not be prefixed but may be inserted after the first digit (which is irrelevant for digits > 0).
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|