A135506 a(n) = x(n+1)/x(n) - 1 where x(1)=1 and x(k) = x(k-1) + lcm(x(k-1),k). Here x(n) = A135504(n).
2, 1, 2, 5, 1, 7, 1, 1, 5, 11, 1, 13, 1, 5, 1, 17, 1, 19, 1, 1, 11, 23, 1, 5, 13, 1, 1, 29, 1, 31, 1, 11, 17, 1, 1, 37, 1, 13, 1, 41, 1, 43, 1, 1, 23, 47, 1, 1, 1, 17, 13, 53, 1, 1, 1, 1, 29, 59, 1, 61, 1, 1, 1, 13, 1, 67, 1, 23, 1, 71, 1, 73, 1, 1, 1, 1, 13, 79, 1, 1, 41, 83, 1, 1, 43, 29, 1, 89
Offset: 1
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 1..65537 (first 10000 terms from Robert Israel)
- Eric S. Rowland, Prime-Generating Recurrences and a Tale of Logarithmic Scale, YouTube video, 2023. (See especially the last section beginning at 20:08).
- Serafín Ruiz-Cabello, On the use of the lowest common multiple to build a prime-generating recurrence, arXiv:1504.05041 [math.CO], 2015.
Crossrefs
Programs
-
Maple
x[1]:= 1; for n from 2 to 101 do x[n]:= x[n-1] + ilcm(x[n-1],n); a[n-1]:= x[n]/x[n-1]-1; od: seq(a[n],n=1..100); # Robert Israel, Jan 11 2015
-
Mathematica
a[n_] := x[n+1]/x[n] - 1; x[1] = 1; x[k_] := x[k] = x[k-1] + LCM[x[k-1], k]; Table[a[n], {n, 1, 88}] (* Jean-François Alcover, Jan 08 2013 *)
-
PARI
x1=1;for(n=2,40,x2=x1+lcm(x1,n);t=x1;x1=x2;print1(x2/t-1,","))
-
Python
from itertools import count, islice from math import lcm def A135506_gen(): # generator of terms x = 1 for n in count(2): y = x+lcm(x,n) yield y//x-1 x = y A135506_list = list(islice(A135506_gen(),20)) # Chai Wah Wu, Mar 13 2023
Formula
a(n) = (n+1) / A361470(n). - Antti Karttunen, Mar 26 2023
Extensions
References to A135504 added by Antti Karttunen, Mar 07 2023
Comments