login
A178334
Number of mountain numbers <= n.
4
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
OFFSET
0,122
COMMENTS
a(n) = 21846 for n >= 12345678987654321.
LINKS
FORMULA
a(n) = Sum_{k=0..n} A178333(k).
PROG
(Python)
from itertools import count, islice
def agen(): # generator of terms; uses code in A134941
A134941_full = A134941() + [-1]
c = i = 0
for j in count(0):
if j == A134941_full[i]: i, c = i+1, c+1
yield c
print(list(islice(agen(), 122))) # Michael S. Branicky, Jan 09 2023
CROSSREFS
Cf. A135417.
Sequence in context: A103131 A112347 A057427 * A000007 A240351 A358008
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, May 25 2010
STATUS
approved