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 A051454 #29 Aug 15 2024 02:02:26 %S A051454 2,3,7,13,61,421,29,2521,19,89,71,1693,232792561,6659,26771144401,331, %T A051454 101,72201776446801,1801,173,54941,89,442720643463713815201,593,5171, %U A051454 239,1222615931,103,7265496855919,6562349363,4447,147099357127,1931 %N A051454 a(n) is the smallest prime factor of 1 + lcm(1..k) where k is the n-th prime power A000961(n). %H A051454 Sean A. Irvine, <a href="/A051454/b051454.txt">Table of n, a(n) for n = 1..82</a> %e A051454 1 + lcm(1..8) = 29^2, so its smallest prime divisor is 29; it occurs as the 7th term in the sequence because 8 is the 7th prime power: A000961(7) = 8. %t A051454 Join[{2},With[{ppwr=Select[Range[200],PrimePowerQ]},Table[FactorInteger[LCM@@Take[ ppwr,n]+ 1][[1,1]],{n,40}]]] (* _Harvey P. Dale_, May 28 2024 *) %o A051454 (Magma) a:=[]; lcm:=1; for k in [1..83] do if (k eq 1) or IsPrimePower(k) then lcm:=Lcm(lcm,k); a:=a cat [Factorization(1+lcm)[1][1]]; end if; end for; a; // _Jon E. Schoenfield_, May 28 2018 %o A051454 (PARI) a(n) = {my(nb = 1, lc = 1, k = 2); while (nb != n, if (isprimepower(k), nb++; lc = lcm(lc, k)); k++;); vecmin(factor(lc +1)[,1]);} \\ _Michel Marcus_, May 29 2018 %o A051454 (Python) %o A051454 from math import prod %o A051454 from sympy import primepi, integer_nthroot, integer_log, primerange, primefactors %o A051454 def A051454(n): %o A051454 def f(x): return int(n+x-1-sum(primepi(integer_nthroot(x,k)[0]) for k in range(1,x.bit_length()))) %o A051454 m, k = n, f(n) %o A051454 while m != k: %o A051454 m, k = k, f(k) %o A051454 return min(primefactors(1+prod(p**integer_log(m, p)[0] for p in primerange(m+1)))) # _Chai Wah Wu_, Aug 15 2024 %Y A051454 Cf. A000961, A003418, A049536, A049537, A051301, A051342, A051452. %K A051454 nonn %O A051454 1,1 %A A051454 _Labos Elemer_