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.

A343880 Positions of 0's in A342585.

This page as a plain text file.
%I A343880 #17 Oct 12 2021 21:54:37
%S A343880 1,4,8,14,20,28,37,46,57,69,82,95,110,125,142,159,177,196,216,238,260,
%T A343880 285,310,335,362,390,418,448,478,511,544,578,613,648,685,722,761,800,
%U A343880 842,884,927,971,1018,1065,1112,1161,1210,1259,1309,1361,1413,1467,1521
%N A343880 Positions of 0's in A342585.
%C A343880 This sequence is infinite.
%H A343880 Rémy Sigrist, <a href="/A343880/b343880.txt">Table of n, a(n) for n = 1..10000</a>
%H A343880 Rémy Sigrist, <a href="/A343880/a343880.gp.txt">PARI program for A343880</a>
%H A343880 Rémy Sigrist, <a href="/A343880/a343880.png">Colored scatterplot of (n, a(n+1)-a(n)) for n = 1..9999</a> (where the color is function of a(n+1)-a(n))
%e A343880 A342585(8) = 0, so 8 belongs to the sequence.
%t A343880 Position[Block[{c, k, m}, c[0] = 1; {0}~Join~Reap[Do[k = 0; While[IntegerQ[c[k]], Set[m, c[k]]; Sow[m]; If[IntegerQ@ c[m], c[m]++, c[m] = 1]; k++]; Sow[0]; c[0]++, 52]][[-1, -1]]], 0][[All, 1]] (* _Michael De Vlieger_, Oct 12 2021 *)
%o A343880 (PARI) See Links section.
%o A343880 (Python)
%o A343880 from collections import Counter
%o A343880 def aupton(terms):
%o A343880     num, A342585lst, inventory, alst, idx = 0, [0], Counter([0]), [1], 1
%o A343880     while len(alst) < terms:
%o A343880         idx += 1
%o A343880         c = inventory[num]
%o A343880         if c == 0:
%o A343880             num = 0
%o A343880             alst.append(idx)
%o A343880         else:
%o A343880             num += 1
%o A343880         A342585lst.append(c)
%o A343880         inventory.update([c])
%o A343880     return alst
%o A343880 print(aupton(53)) # _Michael S. Branicky_, Oct 12 2021
%Y A343880 Cf. A342585.
%K A343880 nonn
%O A343880 1,2
%A A343880 _Rémy Sigrist_, May 02 2021