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 A177941 #12 Dec 14 2018 06:05:06 %S A177941 5,7,9,15,27,31,33,37,39,75,81,159,165,327,331,333,337,339,349,351, %T A177941 699,715,717,721,723,727,729,745,747,751,753,757,759,1515,1531,1533, %U A177941 1537,1539,1561,1563,1567,1569,3135,3147,3151,3153,3157,3159,3165,6327,6331,6333,6337 %N A177941 a(1)=5; for n>0, a(n+1)=a(n)+p-1, where p is the smallest prime divisor of (a(n))^2-4. %p A177941 A020639 := proc(n) if n = 1 then 1 ; else numtheory[factorset](n) ; min(op(%)) ; end if; end proc: %p A177941 A177941 := proc(n) option remember; if n = 1 then 5 else A020639((procname(n-1))^2-4) ; procname(n-1)+%-1 ; end if; end proc: seq(A177941(n),n=1..120) ; # _R. J. Mathar_, Jun 30 2010 %t A177941 NestList[# + FactorInteger[#^2 - 4][[1, 1]] - 1 &, 5, 52] (* or *) %t A177941 a[1] = 5; a[n_] := a[n] = # + FactorInteger[#^2 - 4][[1, 1]] - 1 &@ a[n - 1]; Array[a, {53}] (* _Michael De Vlieger_, Feb 07 2016 *) %o A177941 (PARI) lista(nn) = {my(va = vector(nn)); va[1] = 5; for (n=2, nn, va[n] = va[n-1] + factor(va[n-1]^2-4)[1,1] - 1;); va;} \\ _Michel Marcus_, Dec 14 2018 %Y A177941 Cf. A177929. %K A177941 nonn %O A177941 1,1 %A A177941 _Vladimir Shevelev_, May 15 2010 %E A177941 Entries checked by _R. J. Mathar_, Jun 30 2010