OFFSET
1,1
COMMENTS
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
PROG
(PARI) is(n, base=10) = my (d=digits(n, base)); for (i=1, #d-2, if (d[i]+d[i+2]-2*d[i+1], return (1))); return (0)
(Python)
def ok(n):
d = list(map(int, str(n)))
return any(d[i]+d[i+2]-2*d[i+1] != 0 for i in range(len(d)-2))
print([k for k in range(1002) if ok(k)]) # Michael S. Branicky, Aug 03 2022 after Rémy Sigrist
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Dec 16 2018
STATUS
approved