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.

A349872 a(1) = 2; for n > 1, a(n) is the smallest unused number > 1 such that none of the previous a(n) terms divide a(n).

This page as a plain text file.
%I A349872 #23 Dec 03 2021 19:27:29
%S A349872 2,3,5,7,11,4,13,17,6,19,23,9,29,10,8,31,37,41,14,15,43,12,47,53,59,
%T A349872 21,61,22,25,67,18,16,71,26,20,73,79,83,33,27,35,89,34,97,101,103,24,
%U A349872 28,38,39,30,107,109,49,113,127,131,46,137,51,55,139,149,151,32,45,157,36,42,57,163,58,44
%N A349872 a(1) = 2; for n > 1, a(n) is the smallest unused number > 1 such that none of the previous a(n) terms divide a(n).
%C A349872 Slightly under two-thirds of the terms are between the lines a(n) = n/2 and a(n) = n; in the range studied all of these numbers are composite. The remaining terms, all of which are primes, lie approximately on a curve that starts with a slope near 2 that slowly increases. See the linked image.
%C A349872 There are no fixed points up to 10000 terms so it is likely none exist.
%C A349872 For many even terms a(n) where n > a(n) it is found that a(n - a(n) - 1) = a(n)/2. The first even term where that is not the case is a(113) = 68, as a(113 - 68 - 1) = a(44) = 97, not 34. In this case a(43) = 34.
%C A349872 For a given number k the longest possible sequence of unique numbers that contains a number every k terms that divides k is finite, ~ 2*sqrt(k)*k; this implies all numbers > 1 eventually appear.
%H A349872 Scott R. Shannon, <a href="/A349872/a349872.png">Image of the first 10000 terms</a>. The green line is a(n) = n.
%F A349872 a(2) = 3 as the previous term 2 does not divide 3.
%F A349872 a(6) = 4 as none of the previous four terms, 3, 5, 7, 11, divide 4.
%F A349872 a(9) = 6 as none of the previous six terms, 5, 7, 11, 4, 13, 17, divide 6.
%t A349872 a[1]=2;a[n_]:=a[n]=(k=2;While[MemberQ[s=Array[a,n-1],k]||Or@@(IntegerQ/@(k/s[[-If[k>=n,n-1,k];;]])),k++];k);Array[a,73] (* _Giorgos Kalogeropoulos_, Dec 03 2021 *)
%o A349872 (Python)
%o A349872 def aupton(terms):
%o A349872     alst, aset = [2], {2}
%o A349872     for n in range(2, terms+1):
%o A349872         k = 2
%o A349872         while k in aset or any(k%j == 0 for j in alst[-k:]): k += 1
%o A349872         alst.append(k); aset.add(k)
%o A349872     return alst
%o A349872 print(aupton(73)) # _Michael S. Branicky_, Dec 03 2021
%Y A349872 Cf. A027750, A093714, A064413, A000040.
%K A349872 nonn
%O A349872 1,1
%A A349872 _Scott R. Shannon_, Dec 03 2021