cp's OEIS Frontend

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.

A168143 a(17)=37; for n>=17, a(n)=3n-14 if gcd(n,a(n-1))>1 and all prime divisors of n more than 17; a(n)=a(n-1)+1, otherwise.

This page as a plain text file.
%I A168143 #19 Jul 22 2025 07:30:00
%S A168143 37,38,43,44,45,46,55,56,57,58,59,60,61,62,79,80,81,82,83,84,85,86,87,
%T A168143 88,89,90,91,92,93,94,127,128,129,130,131,132,133,134,135,136,137,138,
%U A168143 139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157
%N A168143 a(17)=37; for n>=17, a(n)=3n-14 if gcd(n,a(n-1))>1 and all prime divisors of n more than 17; a(n)=a(n-1)+1, otherwise.
%C A168143 a(n+1)-a(n)+14 is either 15 or a prime > 17. For a generalization, see the second Shevelev link. - Edited by _Robert Israel_, Aug 21 2017
%H A168143 Robert Israel, <a href="/A168143/b168143.txt">Table of n, a(n) for n = 17..10000</a>
%H A168143 E. S. Rowland, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL11/Rowland/rowland21.html">A natural prime-generating recurrence</a>, Journal of Integer Sequences, Vol. 11 (2008), Article 08.2.8.
%H A168143 V. Shevelev, <a href="https://arxiv.org/abs/0910.4676">A new generator of primes based on the Rowland idea</a>, arXiv:0910.4676 [math.NT], 2009.
%H A168143 V. Shevelev, <a href="https://arxiv.org/abs/0911.3491">Generalizations of the Rowland theorem</a>, arXiv:0911.3491 [math.NT], 2009-2010.
%p A168143 A[17]:= 37:
%p A168143 q:= convert(select(isprime,[$2..17]),`*`);
%p A168143 for n from 18 to 100 do
%p A168143   if igcd(n,A[n-1]) > 1 and igcd(n,q) = 1 then A[n]:= 3*n-14
%p A168143     else A[n]:= A[n-1]+1 fi
%p A168143 od:
%p A168143 seq(A[i],i=17..100); # _Robert Israel_, Aug 21 2017
%t A168143 nxt[{n_,a_}]:={n+1,If[GCD[n+1,a]>1&&FactorInteger[n+1][[1,1]]>17,3(n+1)-14,a+1]}; NestList[nxt,{17,37},60][[All,2]] (* _Harvey P. Dale_, Aug 15 2017 *)
%Y A168143 Cf. A167495, A167494, A167493, A167197, A167195, A167170, A167168, A106108, A132199, A167054, A167053, A166944, A166945, A116533, A163961, A163963, A084662, A084663, A134162, A135506, A135508, A118679, A120293.
%K A168143 nonn
%O A168143 17,1
%A A168143 _Vladimir Shevelev_, Nov 19 2009
%E A168143 Corrected by _Harvey P. Dale_, Aug 15 2017