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 A177929 #14 May 13 2023 05:56:25 %S A177929 4,6,10,12,22,24,28,30,58,60,118,120,126,130,132,138,274,276,280,282, %T A177929 562,564,568,570,1138,1140,1146,1150,1152,2302,2304,2308,2310,4618, %U A177929 4620,4650,9298,9300,9316,9318,9324,9328,9330,9336,9340,9342,18682,18684 %N A177929 a(1)=4. a(n+1) = a(n)+d-1, where d is the smallest prime divisor of (a(n)-1)*(a(n)+1). %F A177929 a(n) = a(n-1) + A020639(a(n-1)^2 - 1) - 1. - _R. J. Mathar_, May 31 2010 %p A177929 A020639 := proc(n) numtheory[factorset](n) ; min(op(%)) ; end proc: %p A177929 A177929 := proc(n) local d1,d2; if n = 1 then 4; else d1 := A020639(procname(n-1)-1) ; d2 := A020639(procname(n-1)+1) ; procname(n-1)+min(d1,d2) -1; end if; end proc: %p A177929 seq(A177929(n),n=1..52) ; # _R. J. Mathar_, May 31 2010 %t A177929 lpf[n_] := FactorInteger[n][[1, 1]]; %t A177929 a[n_] := a[n] = If[n == 1, 4, a[n-1]+lpf[a[n-1]^2-1]-1]; %t A177929 Table[a[n], {n, 1, 50}] (* _Jean-François Alcover_, May 13 2023 *) %Y A177929 Cf. A020639. %K A177929 nonn %O A177929 1,1 %A A177929 _Vladimir Shevelev_, May 15 2010