login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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 2
37, 38, 43, 44, 45, 46, 55, 56, 57, 58, 59, 60, 61, 62, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157 (list; graph; refs; listen; history; text; internal format)
OFFSET

17,1

COMMENTS

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

LINKS

Robert Israel, Table of n, a(n) for n = 17..10000

E. S. Rowland, A natural prime-generating recurrence, Journal of Integer Sequences, Vol. 11 (2008), Article 08.2.8.

V. Shevelev, A new generator of primes based on the Rowland idea, arXiv:0910.4676 [math.NT], 2009.

V. Shevelev, Generalizations of the Rowland theorem, arXiv:0911.3491 [math.NT], 2009-2010.

MAPLE

A[17]:= 37:

q:= convert(select(isprime, [$2..17]), `*`);

for n from 18 to 100 do

  if igcd(n, A[n-1]) > 1 and igcd(n, q) = 1 then A[n]:= 3*n-14

    else A[n]:= A[n-1]+1 fi

od:

seq(A[i], i=17..100); # Robert Israel, Aug 21 2017

MATHEMATICA

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 *)

CROSSREFS

Cf. A167495, A167494, A167493, A167197, A167195, A167170, A167168, A106108, A132199, A167054, A167053, A166944, A166945, A116533, A163961, A163963, A084662, A084663, A134162, A135506, A135508, A118679, A120293.

Sequence in context: A043611 A296871 A071887 * A111043 A041683 A064172

Adjacent sequences:  A168140 A168141 A168142 * A168144 A168145 A168146

KEYWORD

nonn,uned

AUTHOR

Vladimir Shevelev, Nov 19 2009

EXTENSIONS

Corrected by Harvey P. Dale, Aug 15 2017

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 28 07:07 EST 2020. Contains 331317 sequences. (Running on oeis4.)