OFFSET
1,1
LINKS
David F. Marrs, Table of n, a(n) for n = 1..10000
EXAMPLE
a(1) = 101.
a(2) = 101 + 102 = 203.
a(10) = 101 + 102 + 103 + 104 + 105 + 106 + 107 + 108 + 109 + 120 = 1065.
PROG
(Python)
for n in range(50):
a = n
b = 0
c = 0
while a:
if ''.join(sorted(str(b))) != str(b) and ''.join(sorted(str(b)))[::-1] != str(b): c += b; a -= 1
b += 1
print(c)
(Python)
from itertools import count, islice
def A319744_gen(): # generator of terms
c = 0
for n in count(101):
l = len(s:=tuple(int(d) for d in str(n)))
for i in range(1, l-1):
if (s[i-1]-s[i])*(s[i]-s[i+1]) < 0:
c += n
yield c
break
CROSSREFS
KEYWORD
nonn,base
AUTHOR
David F. Marrs, Oct 21 2018
STATUS
approved