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.

A064535 a(n) = (2^prime(n)-2)/prime(n); a(0) = 0 by convention.

Original entry on oeis.org

0, 1, 2, 6, 18, 186, 630, 7710, 27594, 364722, 18512790, 69273666, 3714566310, 53634713550, 204560302842, 2994414645858, 169947155749830, 9770521225481754, 37800705069076950, 2202596307308603178, 33256101992039755026, 129379903640264252430
Offset: 0

Views

Author

Shane Findley, Oct 09 2001

Keywords

Comments

As a corollary to Fermat's little theorem, (2^p - 2)/p is always an integer for p prime. - Alonso del Arte, May 04 2013

Examples

			a(3) = 6, because prime(3) = 5, and (2^5 - 2)/5 = 30/5 = 6.
a(4) = 18, because prime(4) = 7, and (2^7  - 2)/7 = 126/7 = 18.
		

Crossrefs

Cf. A007663, A056743, A225101 (superset).

Programs

  • Magma
    [0] cat [(2^NthPrime(n)-2)/NthPrime(n): n in [1..25]]; // Vincenzo Librandi, Sep 14 2018
  • Maple
    A064535 := proc(n) ( 2^ithprime(n) - 2 )/ithprime(n); end;
  • Mathematica
    Table[(2^Prime[n] - 2)/Prime[n], {n, 50}] (* Alonso del Arte, Apr 28 2013 *)
  • PARI
    { for (n=0, 100, if (n, a=(2^prime(n) - 2)/prime(n), a=0); write("b064535.txt", n, " ", a) ) } \\ Harry J. Smith, Sep 17 2009
    

Formula

a(n) = A001037(prime(n)) for n >= 1. - Hilko Koning, Sep 10 2018
a(n) = 2*A007663(n) for n > 1. - Jeppe Stig Nielsen, May 16 2021