A167197 a(6) = 7, for n >= 7, a(n) = a(n - 1) + gcd(n, a(n - 1)).
7, 14, 16, 17, 18, 19, 20, 21, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 52, 53, 54, 55, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 116, 117, 120, 121, 122, 123, 124, 125, 126, 127, 128
Offset: 6
Keywords
Links
- G. C. Greubel, Table of n, a(n) for n = 6..1000
- E. S. Rowland, A natural prime-generating recurrence, Journal of Integer Sequences, 11 (2008), Article 08.2.8.
- Vladimir Shevelev, An infinite set of generators of primes based on the Rowland idea and conjectures concerning twin primes, arXiv:0910.4676 [math.NT], 2009.
Crossrefs
Programs
-
Maple
A[6]:= 7: for n from 7 to 100 do A[n]:= A[n-1] + igcd(n,A[n-1]) od: seq(A[i],i=6..100); # Robert Israel, Jun 05 2016
-
Mathematica
a[6] = 7; a[n_ /; n > 6] := a[n] = a[n - 1] + GCD[n, a[n - 1]]; Table[a[n], {n, 6, 58}]
-
Python
from math import gcd def aupton(nn): alst = [7] for n in range(7, nn+1): alst.append(alst[-1] + gcd(n, alst[-1])) return alst print(aupton(68)) # Michael S. Branicky, Jul 14 2021
Extensions
Verified and edited by Alonso del Arte, Nov 30 2009
Comments