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.
%I A084400 #26 Apr 22 2025 03:51:07 %S A084400 1,2,3,4,5,7,9,11,13,16,17,19,23,25,29,31,37,41,43,47,49,53,59,61,67, %T A084400 71,73,79,81,83,89,97,101,103,107,109,113,121,127,131,137,139,149,151, %U A084400 157,163,167,169,173,179,181,191,193,197,199,211,223,227,229,233,239 %N A084400 a(1) = 1; for n>1, a(n) = smallest number that does not divide the product of all previous terms. %C A084400 All numbers of the form p^(2^k) are members. %C A084400 Except for the first term, same as A050376. - _David Wasserman_, Dec 22 2004 %C A084400 Also, the lexicographically earliest sequence of distinct positive integers such that the number of divisors of the product of n initial terms (for any n) is a power of 2. - _Ivan Neretin_, Aug 12 2015 %H A084400 Giovanni Resta, <a href="/A084400/b084400.txt">Table of n, a(n) for n = 1..10000</a> %o A084400 (PARI) find(pv)=k = 1; while (! (pv % k), k++); return (k); %o A084400 lista(nn) = print1(pv=1, ", "); for (i=1, nn, nv = find(pv); pv *= nv; print1(nv, ", ")) \\ _Michel Marcus_, Aug 12 2015 %o A084400 (PARI) A209229(n)=if(n%2, n==1, isprimepower(n)) %o A084400 is(n)=A209229(isprimepower(n)) || n==1 \\ _Charles R Greathouse IV_, Oct 19 2015 %o A084400 (Python) %o A084400 from sympy import primepi, integer_nthroot %o A084400 def A084400(n): %o A084400 def bisection(f,kmin=0,kmax=1): %o A084400 while f(kmax) > kmax: kmax <<= 1 %o A084400 kmin = kmax >> 1 %o A084400 while kmax-kmin > 1: %o A084400 kmid = kmax+kmin>>1 %o A084400 if f(kmid) <= kmid: %o A084400 kmax = kmid %o A084400 else: %o A084400 kmin = kmid %o A084400 return kmax %o A084400 def f(x): return n-1+x-sum(primepi(integer_nthroot(x,1<<i)[0]) for i in range(x.bit_length().bit_length())) %o A084400 return bisection(f,n,n) # _Chai Wah Wu_, Mar 25 2025 %Y A084400 Cf. A000040 (primes), A026416, A000028, A066724, A026477, A050376. %K A084400 nonn %O A084400 1,2 %A A084400 _Amarnath Murthy_, May 31 2003 %E A084400 More terms from _Patrick De Geest_, Jun 05 2003