login
The OEIS is supported by the many generous donors to the OEIS 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
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
Sequence in context: A346383 A337453 A071887 * A111043 A041683 A064172
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 17:39 EDT 2024. Contains 371797 sequences. (Running on oeis4.)