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.

A260626 a(n) = gcd(m, 2^m-1) where m is the n-th nonprime positive integer.

Original entry on oeis.org

1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 9, 5, 7, 1, 3, 1, 1, 1, 1, 3, 1, 1, 1, 1, 9, 1, 1, 5, 21, 1, 1, 1, 3, 1, 1, 1, 1, 27, 1, 1, 1, 1, 15, 1, 7, 1, 1, 3, 1, 1, 1, 9, 1, 1, 1, 1, 3, 5, 1, 1, 21, 1, 1, 1, 1, 9, 1, 1, 1, 1, 1, 3, 1, 1, 25, 3, 1, 7, 1, 27, 11, 1, 1, 3, 1
Offset: 1

Views

Author

Michel Lagneau, Oct 31 2015

Keywords

Comments

2^m - 1 is a nonprime number if m is a nonprime number.

Crossrefs

Programs

  • Maple
    seq(`if`(isprime(m), NULL, igcd(m, 2^m-1)), m=1..150);
  • Mathematica
    GCDnonPrime[n_Integer]:=GCD[2^FixedPoint[n+PrimePi@#&,n+PrimePi@n]-1,FixedPoint[n+PrimePi@#&,n+PrimePi@n]];Array[GCDnonPrime,120]
    GCD[#,2^#-1]&/@Select[Range[200],!PrimeQ[#]&] (* Harvey P. Dale, Aug 25 2019 *)
  • PARI
    for(n=1, 1e3, if(!isprime(n), print1(gcd(n,2^n-1)", "))) \\ Altug Alkan, Nov 01 2015

Formula

a(n) = gcd(A018252(n), 2^A018252(n)-1).
a(n) = A014491(A018252(n)). - Michel Marcus, Nov 01 2015