OFFSET
1,1
COMMENTS
The first 150000000 differences are all primes or 1. Is this true in general?
The proof of the conjecture is identical to the proof in the Rowland link. - Yifan Xie, Apr 11 2025
REFERENCES
Eric S. Rowland, A simple prime-generating recurrence, Abstracts Amer. Math. Soc., 29 (No. 1, 2008), p. 50 (Abstract 1035-11-986).
LINKS
Indranil Ghosh, Table of n, a(n) for n = 1..50000
Eric S. Rowland, A natural prime-generating recurrence, arXiv:0710.3217 [math.NT], 2007-2008.
Eric S. Rowland, A natural prime-generating recurrence, JIS 11 (2008) 08.2.8.
MAPLE
S := 8; f := proc(n) option remember; global S; if n=1 then S else f(n-1)+igcd(n, f(n-1)); fi; end;
MATHEMATICA
a[n_]:= a[n]= If[n==1, 8, a[n-1] + GCD[n, a[n-1]]]; Table[a[n], {n, 70}]
RecurrenceTable[{a[1]==8, a[n]==a[n-1]+GCD[a[n-1], n]}, a, {n, 70}] (* Harvey P. Dale, Apr 12 2016 *)
PROG
(Haskell)
a084663 n = a084663_list !! (n-1)
a084663_list =
8 : zipWith (+) a084663_list (zipWith gcd a084663_list [2..])
-- Reinhard Zumkeller, Nov 15 2013
(SageMath)
@CachedFunction
def a(n): # a = A084663
if (n==1): return 8
else: return a(n-1) + gcd(a(n-1), n)
[a(n) for n in range(1, 71)] # G. C. Greubel, Mar 22 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Matthew Frank (mfrank(AT)wopr.wolfram.com) on behalf of the 2003 New Kind of Science Summer School, Jul 15 2003
STATUS
approved
