OFFSET
6,1
COMMENTS
LINKS
G. C. Greubel, Table of n, a(n) for n = 6..1000
Eric S. Rowland, A natural prime-generating recurrence, J. of Integer Sequences 11 (2008), Article 08.2.8.
V. Shevelev, An infinite set of generators of primes based on the Rowland idea and conjectures concerning twin primes, arXiv:0910.4676 [math.NT], 2009.
MAPLE
A167170 := proc(n) option remember; if n = 6 then 14; else procname(n-1)+igcd(n, procname(n-1)) ; end if; end proc: seq(A167170(i), i=6..80) ; # R. J. Mathar, Oct 30 2010
MATHEMATICA
RecurrenceTable[{a[n] == a[n - 1] + GCD[n, a[n - 1]], a[6] == 14}, a, {n, 6, 100}] (* G. C. Greubel, Jun 04 2016 *)
nxt[{n_, a_}]:={n+1, a+GCD[a, n+1]}; NestList[nxt, {6, 14}, 60][[All, 2]] (* Harvey P. Dale, Nov 03 2019 *)
PROG
(PARI) first(n)=my(v=vector(n-5)); v[1]=14; for(k=7, n, v[k-5]=v[k-6]+gcd(k, v[k-6])); v \\ Charles R Greathouse IV, Aug 22 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, Oct 29 2009, Nov 06 2009
EXTENSIONS
Terms > 91 from R. J. Mathar, Oct 30 2010
STATUS
approved