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 A061228 #37 Jul 02 2025 16:02:01 %S A061228 2,4,6,6,10,8,14,10,12,12,22,14,26,16,18,18,34,20,38,22,24,24,46,26, %T A061228 30,28,30,30,58,32,62,34,36,36,40,38,74,40,42,42,82,44,86,46,48,48,94, %U A061228 50,56,52,54,54,106,56,60,58,60,60,118,62,122,64,66,66,70,68,134,70,72,72 %N A061228 a(1) = 2, a(n) = smallest number greater than n that is not coprime to n. %H A061228 Reinhard Zumkeller, <a href="/A061228/b061228.txt">Table of n, a(n) for n = 1..10000</a> %F A061228 a(n) = A020639(n) + n. %F A061228 a(2m) = 2m+2, a(p) = 2p if p is a prime. %F A061228 a(n) = n + the smallest divisor of n that is larger than 1, for n >= 2. %F A061228 a(p^k) = p^k + p if p is prime. - _Robert Israel_, Oct 21 2015 %F A061228 a(n) = A087349(n-1) + 1 for n >= 2. - _Amiram Eldar_, Apr 10 2025 %e A061228 a(9) = 12 as 10 and 11 are coprime to 9. %e A061228 a(11) = 22 as 11 is a prime. %p A061228 for n from 1 to 150 do if n=1 then printf(`%d,`,2); fi: for k from n+1 to 2*n do if igcd(n,k)>1 then printf(`%d,`,k); break; fi: od: od: %p A061228 # alternative: %p A061228 2, seq(t + min(numtheory:-factorset(t)), t = 2..1000); # _Robert Israel_, Oct 21 2015 %t A061228 Table[n+First@(First/@FactorInteger[n]),{n,200}] (* _Vladimir Joseph Stephan Orlovsky_, Apr 08 2011 *) %t A061228 nxt[{n_,a_}]:=Module[{c=n+2},While[CoprimeQ[n+1,c],c++];{n+1,c}]; NestList[nxt,{1,2},70][[;;,2]] (* _Harvey P. Dale_, May 21 2025 *) %o A061228 (Haskell) %o A061228 a061228 n = n + a020639 n -- _Reinhard Zumkeller_, May 06 2015 %o A061228 (PARI) a(n) = n + if(n == 1, 1, factor(n)[1,1]); \\ _Amiram Eldar_, Apr 10 2025 %Y A061228 Cf. A020639, A046666, A064413, A087349. %Y A061228 Cf. A070229, A256393. %K A061228 nonn %O A061228 1,1 %A A061228 _Amarnath Murthy_, Apr 23 2001 %E A061228 More terms from _James Sellers_, Apr 24 2001