cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A319744 Partial sums of bouncy numbers (A152054).

This page as a plain text file.
%I A319744 #29 Oct 21 2024 20:24:20
%S A319744 101,203,306,410,515,621,728,836,945,1065,1186,1316,1447,1579,1719,
%T A319744 1860,2002,2145,2295,2446,2598,2751,2905,3065,3226,3388,3551,3715,
%U A319744 3880,4050,4221,4393,4566,4740,4915,5091,5271,5452,5634,5817,6001,6186,6372,6559,6749,6940,7132,7325,7519
%N A319744 Partial sums of bouncy numbers (A152054).
%H A319744 David F. Marrs, <a href="/A319744/b319744.txt">Table of n, a(n) for n = 1..10000</a>
%e A319744 a(1) = 101.
%e A319744 a(2) = 101 + 102 = 203.
%e A319744 a(10) = 101 + 102 + 103 + 104 + 105 + 106 + 107 + 108 + 109 + 120 = 1065.
%o A319744 (Python)
%o A319744 for n in range(50):
%o A319744   a = n
%o A319744   b = 0
%o A319744   c = 0
%o A319744   while a:
%o A319744     if ''.join(sorted(str(b))) != str(b) and ''.join(sorted(str(b)))[::-1] != str(b): c += b; a -= 1
%o A319744     b += 1
%o A319744   print(c)
%o A319744 (Python)
%o A319744 from itertools import count, islice
%o A319744 def A319744_gen(): # generator of terms
%o A319744     c = 0
%o A319744     for n in count(101):
%o A319744         l = len(s:=tuple(int(d) for d in str(n)))
%o A319744         for i in range(1,l-1):
%o A319744             if (s[i-1]-s[i])*(s[i]-s[i+1]) < 0:
%o A319744                 c += n
%o A319744                 yield c
%o A319744                 break
%o A319744 A319744_list = list(islice(A319744_gen(),30)) # _Chai Wah Wu_, Jul 28 2023
%Y A319744 Cf. A152054 (bouncy numbers).
%K A319744 nonn,base
%O A319744 1,1
%A A319744 _David F. Marrs_, Oct 21 2018