cp's OEIS Frontend

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.

Showing 1-2 of 2 results.

A261301 a(n+1) = abs(a(n) - gcd(a(n), n)), a(1) = 1.

Original entry on oeis.org

1, 0, 2, 1, 0, 5, 4, 3, 2, 1, 0, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 47, 46, 45, 40, 39, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 79, 78, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60
Offset: 1

Views

Author

M. F. Hasler, Aug 14 2015

Keywords

Comments

The absolute value is relevant only when a(n) = 0 in which case a(n+1) = gcd(a(n),n) = n.
It is conjectured that a(n) = 0 implies that n is prime, see A186253. (This is the sequence {u(n)} mentioned there.)
a(A186253(n)-1) = 1; a(A186253(n)) = 0; a(A186253(n)+1) = A186253(n). - Reinhard Zumkeller, Sep 07 2015

Examples

			a(2) = a(1) - gcd(a(1),1) = 1 - 1 = 0.
a(3) = |a(2) - gcd(a(2),2)| = gcd(0,2) = 2 is prime.
a(3+2) = a(5) = 0, a(6)  = gcd(0,5) = 5 is prime.
a(6+5) = a(11) = 0, a(12) = gcd(0,11) = 11 is prime.
a(12+11) = a(23) = 0, a(24) = 23 is prime.
a(24+23) = a(47) = 0, a(48) = 47 is prime.
a(50) = 45 and gcd(45,50) = 5, thus a(51) = 45 - 5 = 40.
a(52) = 39 and gcd(39,52) = 13, thus a(53) = 39 - 13 = 26. Then, a(53+26) = 0 and 79 = a(80) is prime.
		

Crossrefs

Programs

  • Haskell
    a261301 n = a261301_list !! (n-1)
    a261301_list = 1 : map abs
       (zipWith (-) a261301_list (zipWith gcd [1..] a261301_list))
    -- Reinhard Zumkeller, Sep 07 2015
  • Mathematica
    FoldList[Abs[#1-GCD[#1,#2]]&,1,Range@96] (* Ivan N. Ianakiev, Aug 15 2015 *)
  • PARI
    print1(a=1);m=1;for(n=1,199, print1( ",",a=abs(a-gcd(a,n))))
    

A186254 a(n) = 2*b(n)+1, where b(n) lists the zeros of the sequence u(n)=abs(u(n-1)-gcd(u(n-1),2*n-1)), u(1)=1.

Original entry on oeis.org

5, 17, 53, 149, 449, 1289, 3761, 11261, 33773, 101117, 302681, 907757, 2723069, 8169137, 24506597, 73519793, 220559369, 661677761, 1985001917, 5955003077, 17865008333, 53595020201, 160785060361, 482355180761, 1447065541373, 4341196624109, 13023589872329
Offset: 1

Views

Author

Benoit Cloitre, Feb 16 2011

Keywords

Comments

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 all k large enough, m*b_m(k)+m-1 is a prime number. Here for m=2 it appears a(n) is prime for n>=1.
See A261302 for the sequence u relevant here (m=2). - M. F. Hasler, Aug 14 2015

Crossrefs

Programs

  • PARI
    a=1; m=2; for(n=2, 9e9, if(!a=abs(a-gcd(a, m*n-1)), print1(m*n+m-1, ", ")))
    
  • PARI
    m=2; 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

Formula

a(n+1) <= 3*a(n)+2 for all n.- See the wiki link for a sketch of a proof that a(n) ~ c*3^n with c = 1.7078779... - M. F. Hasler, Aug 22 2015

Extensions

More terms from M. F. Hasler, Aug 22 2015
Showing 1-2 of 2 results.