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.

A073929 a(1) = 1, a(n) = smallest number not included earlier such that the n-th partial sum (n>1) is divisible by n+1.

This page as a plain text file.
%I A073929 #23 Oct 19 2018 05:55:50
%S A073929 1,2,5,7,3,10,4,13,15,6,18,20,8,23,9,26,28,11,31,12,34,36,14,39,41,16,
%T A073929 44,17,47,49,19,52,54,21,57,22,60,62,24,65,25,68,70,27,73,75,29,78,30,
%U A073929 81,83,32,86,33,89,91,35,94,96,37,99,38,102,104,40,107,109,42,112,43
%N A073929 a(1) = 1, a(n) = smallest number not included earlier such that the n-th partial sum (n>1) is divisible by n+1.
%C A073929 a(n) = A002251(n) for 2 < n < 10000. - _Georg Fischer_, Oct 19 2018
%H A073929 R. J. Cano, <a href="/A073929/b073929.txt">Table of n, a(n) for n = 1..10000</a>
%e A073929 4 divides 1+2+5, but does not divide 1+2+3 or 1+2+4, so a(3)=5.
%p A073929 s := {1}:summe := 1:a[1] := 1:for j from 2 to 1000 do b := (j+1)-(summe mod (j+1)); i := 0:while(true) do if nops(s union {b+i*(j+1)})-nops(s)=1 then break; fi; i := i+1; od:a[j] := b+i*(j+1):s := s union {b+i*(j+1)}:summe := summe+a[j]:od:c := seq(a[k],k=1..1000);
%t A073929 Nest[Append[#, Block[{k = 2}, While[Nand[FreeQ[#, k], Mod[Total@ # + k, Length@ # + 2] == 0], k++]; k]] &, {1}, 69] (* _Michael De Vlieger_, May 10 2018 *)
%o A073929 (PARI) vecA073929(n)={my(w=1,s=List(vector(100*n,u,u)),t);for(m=2,n,for(i=m,#s,if(!((w+s[i])%(m+1)),t=s[i];w+=t;listpop(s,i);listinsert(s,t,m);break)));Vec(s)[1..n]} \\ _R. J. Cano_, May 07 2018
%Y A073929 A002251
%K A073929 nonn
%O A073929 1,2
%A A073929 _Amarnath Murthy_, Aug 19 2002
%E A073929 Corrected and edited by _John W. Layman_ and _Sascha Kurz_, Aug 21 2002
%E A073929 Offset corrected by _R. J. Cano_, May 07 2018