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.

A330256 a(0) = 0; for n > 0, a(n) = n - a((Sum_{k=0..n-1} a(k)) mod n).

This page as a plain text file.
%I A330256 #26 Dec 19 2019 08:37:24
%S A330256 0,1,1,2,4,3,3,7,5,4,10,4,7,6,13,5,12,16,12,18,14,21,9,11,10,14,22,15,
%T A330256 14,28,9,10,23,31,24,33,22,15,37,24,16,40,14,34,37,36,43,23,34,42,13,
%U A330256 18,37,50,17,18,32,40,40,19,46,57,39,59,30,15,32,21,11,32,40,65,32,62,41,58,63,60
%N A330256 a(0) = 0; for n > 0, a(n) = n - a((Sum_{k=0..n-1} a(k)) mod n).
%H A330256 Samuel B. Reid, <a href="/A330256/b330256.txt">Table of n, a(n) for n = 0..10000</a>
%H A330256 Samuel B. Reid, <a href="/A330256/a330256.png">Colored plot of one billion terms</a>. This plot is normalized by column. Within each column, density corresponds, in a linear fashion, to <a href="/A330256/a330256_2.png">this spectrum</a>.
%H A330256 Samuel B. Reid, <a href="/A330256/a330256_1.png">Distribution, between 0 and n, of the first billion terms</a>
%e A330256 a(1) = 1 - a(0 mod 1) = 1.
%e A330256 a(2) = 2 - a((0+1) mod 2) = 1.
%e A330256 a(3) = 3 - a((0+1+1) mod 3) = 2.
%e A330256 a(4) = 4 - a((0+1+1+2) mod 4) = 4.
%t A330256 a[0] = 0; a[n_] := a[n] = n - a[Mod[Sum[a[k], {k, 0, n - 1}], n]]; Array[a, 100, 0] (* _Amiram Eldar_, Dec 07 2019 *)
%o A330256 (PARI) s=0; for (n=1, #(a=vector(78)), print1 (a[n]=if (n==1, 0, (n-1)-a[1+(s%(n-1))])", "); s+=a[n]) \\ _Rémy Sigrist_, Dec 08 2019
%Y A330256 Cf. A330249, A066910.
%K A330256 nonn
%O A330256 0,4
%A A330256 _Samuel B. Reid_, Dec 07 2019