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.
%I A366911 #17 Mar 04 2024 19:48:02 %S A366911 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,-3, %T A366911 2,-2,1,-1,1,-1,2,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1, %U A366911 -1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1 %N A366911 a(n) = (A364054(n+1) - A364054(n)) / prime(n) (where prime(n) denotes the n-th prime number). %C A366911 a(n) is the number of steps of size prime(n) in going from A364054(n) to A364054(n+1). %H A366911 N. J. A. Sloane, <a href="/A366911/b366911.txt">Table of n, a(n) for n = 1..9999</a> %H A366911 Rémy Sigrist, <a href="/A366911/a366911.gp.txt">PARI program</a> %e A366911 a(7) = (A364054(8) - A364054(7)) / prime(7) = (19 - 2) / 17 = 1. %t A366911 nn = 2^16; c[_] := False; m[_] := 0; j = 1; c[0] = c[1] = True; %t A366911 Monitor[Do[p = Prime[n - 1]; r = Mod[j, p]; %t A366911 While[Set[k, p m[p] + r ]; c[k], m[p]++]; %t A366911 Set[{a[n - 1], c[k], j}, {(k - j)/p, True, k}], {n, 2, nn + 1}], n]; %t A366911 Array[a, nn] (* _Michael De Vlieger_, Oct 27 2023 *) %o A366911 (PARI) See Links section. %o A366911 (Python) %o A366911 from itertools import count, islice %o A366911 from sympy import nextprime %o A366911 def A366911_gen(): # generator of terms %o A366911 a, aset, p = 1, {0,1}, 2 %o A366911 while True: %o A366911 k, b = divmod(a,p) %o A366911 for i in count(-k): %o A366911 if b not in aset: %o A366911 aset.add(b) %o A366911 a, p = b, nextprime(p) %o A366911 yield i %o A366911 break %o A366911 b += p %o A366911 A366911_list = list(islice(A366911_gen(),30)) # _Chai Wah Wu_, Oct 27 2023 %Y A366911 Cf. A160357, A364054, A366912 (partial sums). %K A366911 sign %O A366911 1,29 %A A366911 _Rémy Sigrist_, Oct 27 2023