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.

A125147 a(0)=1; for n >= 1, a(n) is the smallest positive integer not occurring earlier in the sequence such that Sum_{k=0..n} a(k) is a multiple of n.

This page as a plain text file.
%I A125147 #25 Aug 15 2023 08:13:44
%S A125147 1,2,3,6,4,9,5,12,14,7,17,8,20,22,10,25,11,28,30,13,33,35,15,38,16,41,
%T A125147 43,18,46,19,49,51,21,54,56,23,59,24,62,64,26,67,27,70,72,29,75,77,31,
%U A125147 80,32,83,85,34,88,90,36,93,37,96,98,39,101,40,104,106,42,109,111,44
%N A125147 a(0)=1; for n >= 1, a(n) is the smallest positive integer not occurring earlier in the sequence such that Sum_{k=0..n} a(k) is a multiple of n.
%C A125147 Sequence A019444 is a similar sequence, but it has an offset of 1 and a(1) =1 instead.
%C A125147 This sequence is a permutation of the positive integers.  This can be proved using the theorem-prover Walnut. - _Jeffrey Shallit_, Aug 12 2023
%H A125147 Ivan Neretin, <a href="/A125147/b125147.txt">Table of n, a(n) for n = 0..10000</a>
%H A125147 J. Shallit, <a href="https://arxiv.org/abs/2308.06544">Proving properties of some greedily-defined integer recurrences via automata theory</a>, arXiv:2308.06544 [cs.DM], August 12 2023.
%e A125147 a(5) = 9 because 9 is the smallest positive integer m which does not occur earlier in the sequence and which is such that 5 divides m + Sum_{k=0..4} a(k).
%e A125147 So Sum_{k=0..5} a(k) = 25, which is divisible by 5.
%t A125147 f[l_List] := Block[{k = 1, n = Length[l], s = Plus @@ l},While[MemberQ[l, k] || Mod[s + k, n] > 0, k++ ];Append[l, k]];Nest[f, {1}, 70] (* _Ray Chandler_, Jan 23 2007 *)
%Y A125147 Cf. A019444.
%K A125147 nonn
%O A125147 0,2
%A A125147 _Leroy Quet_, Jan 11 2007
%E A125147 Extended by _Ray Chandler_, Jan 23 2007