# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a304822 Showing 1-1 of 1 %I A304822 #31 May 12 2020 09:33:38 %S A304822 1,1,2,5,1,7,1,3,5,11,1,13,7,5,1,17,1,19,5,7,11,23,1,5,13,3,1,29,5,31, %T A304822 1,11,17,1,1,37,19,13,1,41,1,43,11,5,23,47,1,7,1,17,13,53,1,1,1,19,29, %U A304822 59,1,61,31,1,1,13,11,67,17,23,1,71,1,73 %N A304822 a(n) = A304821(n+3)/A304821(n) - 1. %C A304822 Conjecture: This sequence consists of 1's and primes only. %C A304822 a(n) divides n+1. - _A.H.M. Smeets_, Jul 02 2018 %H A304822 A.H.M. Smeets, Table of n, a(n) for n = 1..20000 %t A304822 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 *) %o A304822 (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)} %o A304822 (Python) %o A304822 from math import gcd %o A304822 n,an0,an1,an2 = 3,6,6,6 %o A304822 while n-3 < 200: %o A304822 n += 1 %o A304822 an0,an1,an2,an3 = an2+an2*(n-2)//gcd(an2,n-2),an0,an1,an2 %o A304822 # an0 = A304821(n), an3 = A304821(n-3) %o A304822 print(n-3,an0//an3-1) %o A304822 # _A.H.M. Smeets_, Jul 02 2018 %Y A304822 Cf. A135504, A217662, A217663, A304821. %K A304822 nonn %O A304822 1,3 %A A304822 _Pedja Terzic_, May 19 2018 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE