OFFSET
1,2
COMMENTS
"Nonprime" digits are 0, 1, 4, 6, 8 and 9.
LINKS
David Consiglio, Jr., Table of n, a(n) for n = 1..1000
EXAMPLE
Nonprime digits are between brackets:
Sequence: (1),3,(4),(6),7,(8),(9),(1)(0),(1)(1),(1)2,(1)4, ...
Digit position in the sequence: 1st, 3rd, 4th, 6th, 7th, 8th, 9th, 10th, 11th, 12th, 14th, ... = a reordering of the sequence itself.
PROG
(Python)
nonprime = [0, 1, 4, 6, 8, 9]
terms = [1, 3, 4, 6, 7, 8, 9]
def si(test_list):#all terms greater than 0 and no repetitions
a = all(i > 0 for i in test_list)
b = len(test_list) == len(set(test_list))
return a & b
def clear(test_list):#sequence meets definitional criteria
full = (''.join(str(x) for x in test_list))
for a in test_list:
if int(a)-1 >= len(full):
return True
elif int(full[int(a)-1]) not in nonprime:
return False
return True
while len(terms) < 1000:
start = 1
while True:
terms.append(start)
if si(terms) and clear(terms):
break
else:
terms.pop()
start += 1
# David Consiglio, Jr., Oct 30 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Eric Angelini, Feb 05 2006
EXTENSIONS
a(63) and beyond from David Consiglio, Jr., Oct 30 2023
STATUS
approved