This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A186253 #39 Oct 02 2022 14:51:56 %S A186253 2,5,11,23,47,79,157,313,619,1237,2473,4909,9817,19603,39199,78193, %T A186253 156019,311347,622669,1244149,2487739,4975111,9950221,19900399, %U A186253 39800797,79601461,159202369,318404629,636788881,1273577761,2547155419,5094310069,10188620041 %N A186253 Indices of zeros of the sequence u(n)=abs(u(n-1)-gcd(u(n-1),n-1)), u(1)=1. %C A186253 For any fixed integer m>=1 define u(1)=1 and u(n)=abs(u(n-1)-gcd(u(n-1),m*n-1)). Then (b_m(k))_{k>=1} is the sequence of integers such that u(b_m(k))=0 and we conjecture that for k large enough m*b_m(k)+m-1 is a prime number. Here for m=1 it appears a(n) is prime for n>=1. %C A186253 See A261301 for the sequence u relevant here (m=1). - _M. F. Hasler_, Aug 14 2015 %C A186253 A261301(a(n)-1) = 1; A261301(a(n)) = 0; A261301(a(n)+1) = a(n). - _Reinhard Zumkeller_, Sep 07 2015 %H A186253 Moritz Firsching, <a href="/A186253/b186253.txt">Table of n, a(n) for n = 1..315</a> %H A186253 B. Cloitre, <a href="http://arxiv.org/abs/1101.4274">10 conjectures in additive number theory</a>, arXiv:1101.4274 [math.NT], 2011. %H A186253 M. F. Hasler, <a href="https://oeis.org/wiki/User:M._F._Hasler/Work_in_progress/Rowland-Cloitre_type_prime_generating_sequences">Rowland-Cloître type prime generating sequences</a>, OEIS Wiki, August 2015. %F A186253 Conjecture: a(n) is asymptotic to c*2^n with c = 1.1861... %t A186253 a = m = 1; Reap[For[n = 2, n <= 10^7, n++, a = Abs[a - GCD[a, m*n - 1]]; If[a == 0, Print[m*n + m - 1]; Sow[m*n + m - 1]]]][[2, 1]] (* _Jean-François Alcover_, Feb 05 2019, from PARI *) %t A186253 nxt[{n_,a_}]:={n+1,Abs[a-GCD[a,n]]}; Position[NestList[nxt,{1,1},13*10^5][[All,2]],0]// Flatten (* The program generates the first 20 terms of the sequence. *) (* _Harvey P. Dale_, Oct 02 2022 *) %o A186253 (PARI) a=1;m=1;for(n=2,1e7,a=abs(a-gcd(a,m*n-1));if(a==0,print1(m*n+m-1,","))) %o A186253 (PARI) %o A186253 next_a(last_a) = { %o A186253 local(A=last_a,B=last_a,C=2*last_a+1); %o A186253 while(A>0, %o A186253 D=divisors(C); %o A186253 k1=10*D[2]; %o A186253 for(j=2,#D, d=D[j];k=((A+1-B+d)/2)%d; %o A186253 if(k==0,k=d); if(k<=k1,k1=k;d1=d)); %o A186253 if(k1-1+d1==A,B=B+1); %o A186253 A = max(A-(k1-1)-d1,0); %o A186253 B = B + k1; %o A186253 C = C - (d1 - 1); %o A186253 ); %o A186253 return(B); %o A186253 } %o A186253 a=2 %o A186253 for(n=1,99,print1(a,", ");a=next_a(a)) \\ _Jan Büthe_ and _Moritz Firsching_, Aug 04 2015 %o A186253 (PARI) m=a=k=1; for(n=1, 30, while( a>d=vecmin(apply(p->a%p, factor(N=m*(k+a)+m-1)[,1])), a-=d+gcd(a-d,N); k+=1+d); k+=a+1; print1(a=N,",")) \\ _M. F. Hasler_, Aug 22 2015 %o A186253 (Haskell) %o A186253 a186253 n = a186253_list !! (n-1) %o A186253 a186253_list = filter ((== 0) . a261301) [1..] %o A186253 -- _Reinhard Zumkeller_, Sep 07 2015 %Y A186253 Cf. A106108. %Y A186253 Cf. A261301 - A261310; A186254 - A186263. %K A186253 nonn %O A186253 1,1 %A A186253 _Benoit Cloitre_, Feb 16 2011 %E A186253 Definition clarified by _M. F. Hasler_, Aug 14 2015