OFFSET
0,3
COMMENTS
The restriction to positive indices yields the corresponding sequence of positive integers.
(We consider that (0+1)/2 = .5 without a leading 0, otherwise the 0-based sequence would start (0, 2, 4, ...).)
Some numbers will never occur, in particular no pandigital number can ever occur (and almost all numbers are pandigital!). [Thanks to Rémy Sigrist for this observation.]
LINKS
Michael S. Branicky, Table of n, a(n) for n = 0..10000
Eric Angelini, Make the average of two successive terms and look, personal blog "Cinquante signes" on blogspot.com, also posted that day on the math-fun mailing list, Sep 07 2022
Michael S. Branicky, Python program
PROG
(PARI) A357043_first(N, U=0/*starting index*/, a=0)={vector(N, d, d=Set(digits(a)); for(k=valuation(U+1, 2), oo, bittest(U, k) || #setintersect(setunion(d, Set(digits(k))), Set(digits((a+k)*if(bittest(a+k, 0), 5, 1/2)))) || [a=k; break]); U+=1<<a; a)}
(Python) # see link for faster algorithm
from itertools import count, islice
def d(n): return set(str(n//2).lstrip("0")) | ({"5"} if n&1 else set())
def c(s, t, u): return (s | t) & u
def agen():
aset, k, mink = set(), 0, 1
for n in count(1):
an = k; yield an; aset.add(an); s, k = set(str(an)), mink
while k in aset or c(s, set(str(k)), d(an+k)): k += 1
while mink in aset: mink += 1
print(list(islice(agen(), 101))) # Michael S. Branicky, Sep 10 2022
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Eric Angelini and M. F. Hasler, Sep 10 2022
STATUS
approved