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.

A124652 a(1)=1. a(n) = smallest positive integer not occurring earlier in the sequence such that every positive integer <= and coprime to (sum{k=1 to n-1} a(k)) is also coprime to a(n).

This page as a plain text file.
%I A124652 #16 Apr 24 2024 13:07:55
%S A124652 1,2,3,4,5,9,6,8,16,12,11,7,14,28,18,24,21,27,32,31,81,10,20,13,169,
%T A124652 22,33,19,17,39,26,49,37,44,36,48,54,64,25,35,40,29,41,15,45,30,50,80,
%U A124652 58,52,60,72,47,1369,42,56,98,59,57,38,76,62,116,128,75,87,23,115,46,91
%N A124652 a(1)=1. a(n) = smallest positive integer not occurring earlier in the sequence such that every positive integer <= and coprime to (sum{k=1 to n-1} a(k)) is also coprime to a(n).
%C A124652 Is this sequence a permutation of the positive integers?
%C A124652 Alternatively, let a(1) = 1 and S = Sum_{i=1..n-1} a(i); a(n) = smallest positive k != a(i), i < n, such that all primes p | k also either divide or exceed S. - _Michael De Vlieger_, Apr 22 2024
%H A124652 Michael De Vlieger, <a href="/A124652/b124652.txt">Table of n, a(n) for n = 1..10000</a>
%e A124652 The sum of the first 7 terms of the sequence is 30. The positive integers <= 30 and coprime to 30 are 1,7,11,13,17,19,23,29. The smallest positive integer not occurring among the first 7 terms of the sequence which is coprime to 1,7,11,13,17,19,23,29 is 8. (7 does not occur among the first 7 terms of {a(k)}, but 7 is not coprime to 7.) So a(8) = 8.
%t A124652 f[n_] := Select[Range[n], GCD[ #, n] == 1 &];g[l_List] := Block[{k = 1, t = f[Plus @@ l]},While[MemberQ[l, k] || Times @@ GCD[t, k] > 1, k++ ];Append[l, k]];Nest[g, {1}, 70] (* _Ray Chandler_, Dec 24 2006 *)
%K A124652 nonn
%O A124652 1,2
%A A124652 _Leroy Quet_, Dec 22 2006
%E A124652 Extended by _Ray Chandler_, Dec 24 2006