OFFSET
1,3
COMMENTS
Conjecture: This sequence consists of 1's and primes only.
a(n) divides n+1. - A.H.M. Smeets, Jul 02 2018
LINKS
A.H.M. Smeets, Table of n, a(n) for n = 1..20000
MATHEMATICA
Drop[#, 3] &@ Fold[Append[#1, {#2, #2/#1 - 1} & @@ {#1[[-3, 1]], #1[[-3, 1]] + LCM[#1[[-3, 1]], #2 + 1]}] &, {{6, 0}, {6, 0}, {6, 0}}, Range@ 72] [[All, -1]] (* Michael De Vlieger, May 20 2018 *)
PROG
(PARI) Generator(n)={b1=6; b2=6; b3=6; list=[]; for(k=4, n, b4=b1+lcm(k-2, b1); a=b4/b1-1; list=concat(list, a); b1=b2; b2=b3; b3=b4); print(list)}
(Python)
from math import gcd
n, an0, an1, an2 = 3, 6, 6, 6
while n-3 < 200:
n += 1
an0, an1, an2, an3 = an2+an2*(n-2)//gcd(an2, n-2), an0, an1, an2
print(n-3, an0//an3-1)
# A.H.M. Smeets, Jul 02 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Pedja Terzic, May 19 2018
STATUS
approved