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.

A377900 After A121053(n) has been found, a(n) is the smallest candidate for A121053(n+1) that has not been eliminated.

This page as a plain text file.
%I A377900 #9 Nov 29 2024 07:36:25
%S A377900 1,1,1,6,6,9,9,9,12,12,12,15,15,15,18,18,18,21,21,21,24,24,24,26,26,
%T A377900 28,28,32,32,32,32,34,34,36,36,39,39,39,42,42,42,45,45,45,48,48,48,50,
%U A377900 50,52,52,55,55,55,57,57,60,60,60,63,63,63,65,65,68,68,68,70
%N A377900 After A121053(n) has been found, a(n) is the smallest candidate for A121053(n+1) that has not been eliminated.
%H A377900 Michael S. Branicky, <a href="/A377900/b377900.txt">Table of n, a(n) for n = 1..20000</a>
%F A377900 a(n) = A099862(k+1) for A099862(k) <= n < A099862(k+1). - _Jinyuan Wang_, Nov 29 2024
%e A377900 After a(8) = 9, and A121053(9) = 10 has been determined, the smallest prime not yet used is 17 and the smallest composite not yet used or eliminated is 12 (10 is now eliminated because the terms of A121053 must be distinct), so a(9) = 12.
%o A377900 (PARI) lista(nn) = my(c=4, t=0); print1("1, 1, 1"); forcomposite(k=4, nn, if(t%2, for(n=c, k-1, print1(", ", k)); c=k); t++); \\ _Jinyuan Wang_, Nov 29 2024
%o A377900 (Python)
%o A377900 from sympy import isprime
%o A377900 from itertools import count, islice
%o A377900 def nextcomposite(n): return next(k for k in count(n+1) if not isprime(k))
%o A377900 def agen(): # generator of terms
%o A377900     yield from [1, 1, 1]
%o A377900     c, c2 = 4, 6
%o A377900     for n in count(4):
%o A377900         if n == c2: c, c2 = c2, nextcomposite(nextcomposite(c2))
%o A377900         yield c2
%o A377900 print(list(islice(agen(), 70))) # _Michael S. Branicky_, Nov 29 2024
%Y A377900 Cf. A099862, A121053, A377898.
%K A377900 nonn
%O A377900 1,4
%A A377900 _N. J. A. Sloane_, Nov 14 2024
%E A377900 More terms from _Jinyuan Wang_, Nov 29 2024