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 A256393 #89 Mar 01 2025 09:51:50 %S A256393 2,4,6,9,12,15,18,21,24,27,30,35,40,45,48,51,54,57,60,65,70,77,84,91, %T A256393 98,105,108,111,114,133,140,147,150,155,160,165,168,175,180,185,190, %U A256393 209,220,231,234,247,260,273,276,299,312,325,330,341,352,363,366,427 %N A256393 Start from a(1) = 2, then alternately add either the largest (if n is even), or the smallest (if n is odd) prime factor of the preceding term a(n-1) to get a(n). %C A256393 After the initial term, each even-indexed term equals the preceding term plus its largest prime factor, and each odd-indexed term equals the preceding term plus its smallest prime factor. %C A256393 See also sequence A076271 where a(n+1) = a(n) + lpf(a(n)). %C A256393 Each term shares exactly one prime factor with the immediately preceding term, and because the sequence is strictly increasing, all the terms after 2 are composite. - _Antti Karttunen_, Apr 19 2015 %C A256393 From a(3) onward, the terms are alternately even and odd. - _Jan Guichelaar_, Apr 24 2015 %C A256393 a(2*n) = A070229(a(2*n-1)); a(2*n+1) = A061228(a(2*n)). - _Reinhard Zumkeller_, May 06 2015 %C A256393 For prime p let [p] denote the sequence with a(1)=p, and generated as for the terms of the current sequence (which according to this notation is then the same as [2]). It so happens that the sequence [p] (for any p?) merges with [2] sooner or later, taking the form of a "tree" as shown in the attached image (Including prime starts up to p=67). Is this pattern of merging bounded or not? Is there just one tree or are there many? Interesting to speculate. The numbers corresponding to the arrival points in [2] of [p] is the sequence 2,6,15,21,51,57,77,84.... The sequence of ("excluded") numbers which do not arise in [p] for any prime p starts as 8,16,20,25,28,32,36,44... Other sequences may refer to the number of iterations required to merge [p] into [2]. See tree picture. - _David James Sycamore_, Aug 25 2016 %C A256393 In this picture, one could also include some [c] sequences, with composite c, see A276269. - _Michel Marcus_, Aug 26 2016 %H A256393 Antti Karttunen, <a href="/A256393/b256393.txt">Table of n, a(n) for n = 1..4096</a> %H A256393 David Sycamore, <a href="/A256393/a256393_1.jpg">Tree showing what happens if the initial 2 is replaced by a different prime</a> (Corrected Aug 29 2016) %F A256393 a(1) = 2; a(2n) = a(2n-1) + gpf(a(2n-1)), a(2n+1) = a(2n) + lpf(a(2n)), where gpf = greatest prime factor = A006530, lpf = least prime factor = A020639. %p A256393 a[1]:= 2; %p A256393 for n from 2 to 100 do %p A256393 if n::even then a[n]:= a[n-1] + max(numtheory:-factorset(a[n-1])) %p A256393 else a[n]:= a[n-1] + min(numtheory:-factorset(a[n-1])) %p A256393 fi %p A256393 od: %p A256393 seq(a[i],i=1..100); # _Robert Israel_, May 03 2015 %t A256393 f[n_] := Block[{pf = First /@ FactorInteger@ n}, If[EvenQ@ n, Max@ pf, Min@ pf]]; s = {2}; lmt = 58; For[k = 2, k <= lmt, k++, AppendTo[s, s[[k - 1]] + f@ s[[k - 1]]]]; s (* _Michael De Vlieger_, Apr 19 2015 *) %t A256393 FoldList[Function[f, If[EvenQ@ #2, #1 + First@ f, #1 + Last@ f]][FactorInteger[#1][[All, 1]]] &, Range[2, 59]] (* _Michael De Vlieger_, Aug 26 2016 *) %o A256393 (PARI) lista(nn) = {print1(a = 2, ", "); for (n=2, nn, f = factor(a); if (n % 2, a += f[1, 1], a += f[#f~, 1]); print1(a, ", "););} \\ _Michel Marcus_, Apr 02 2015 %o A256393 (Scheme) %o A256393 ;; With memoization-macro definec. %o A256393 (definec (A256393 n) (cond ((= 1 n) 2) ((even? n) (+ (A256393 (- n 1)) (A006530 (A256393 (- n 1))))) (else (+ (A256393 (- n 1)) (A020639 (A256393 (- n 1))))))) ;; _Antti Karttunen_, Apr 18 2015 %o A256393 (Haskell) %o A256393 a256393 n = a256393_list !! (n-1) %o A256393 a256393_list = 2 : zipWith ($) (cycle [a070229, a061228]) a256393_list %o A256393 -- _Reinhard Zumkeller_, May 06 2015 %Y A256393 Cf. A006530 (greatest prime factor), A020639 (least prime factor), A076271. %Y A256393 Cf. A257244 (the first differences; the unique prime factors shared by each pair of successive terms), A257245, A257246 (their bisections), A257247 (numbers n such that GCD(a(2n-1),a(2n)) = GCD(a(2n),a(2n+1)), which is prime). %Y A256393 Cf. A061228, A070229. %K A256393 nonn %O A256393 1,1 %A A256393 _Jan Guichelaar_, Mar 28 2015 %E A256393 More terms from _Michel Marcus_, Apr 02 2015 %E A256393 Replaced the name with more succinct description, moved old name to comments - _Antti Karttunen_, Apr 18-19 2015