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-3 of 3 results.

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

A330718 a(n) = numerator(Sum_{k=1..n} (2^k-2)/k).

Original entry on oeis.org

0, 1, 3, 13, 25, 137, 245, 871, 517, 4629, 8349, 45517, 83317, 1074679, 1992127, 7424789, 13901189, 78403447, 147940327, 280060651, 531718651, 11133725681, 21243819521, 40621501691, 15565330735, 388375065019, 248882304985, 479199924517, 923951191477, 2973006070891
Offset: 1

Views

Author

Amiram Eldar and Thomas Ordowski, Dec 28 2019

Keywords

Comments

If p > 3 is prime, then p^2 | a(p).
Note the similarity to Wolstenholme's theorem.
Conjecture: for n > 3, if n^2 | a(n), then n is prime.
Are there the weak pseudoprimes m such that m | a(m)?
Primes p such that p^3 | a(p) are probably A088164.
If p is an odd prime, then a(p+1) == A330719(p+1) (mod p).
If p > 3 is a prime, then p^2 | numerator(Sum_{k=1..p+1} F(k)), where F(n) = Sum_{k=1..n} (2^(k-1)-1)/k. Cf. A027612 (a weaker divisibility).

Examples

			Numerators of 0, 1, 3, 13/2, 25/2, 137/6, 245/6, ...
		

Crossrefs

Programs

  • Magma
    [Numerator( &+[(2^k -2)/k: k in [1..n]] ): n in [1..30]]; // G. C. Greubel, Dec 28 2019
    
  • Maple
    seq(numer(add((2^k -2)/k, k = 1..n)), n = 1..30); # G. C. Greubel, Dec 28 2019
  • Mathematica
    Numerator @ Accumulate @ Array[(2^# - 2)/# &, 30]
    Table[Numerator[Simplify[-(2^(n+1)*LerchPhi[2,1,n+1] +Pi*I +2*HarmonicNumber[n])]], {n,30}] (* G. C. Greubel, Dec 28 2019 *)
  • PARI
    a(n) = numerator(sum(k=1, n, (2^k-2)/k)); \\ Michel Marcus, Dec 28 2019
    
  • Sage
    [numerator( sum((2^k -2)/k for k in (1..n)) ) for n in (1..30)] # G. C. Greubel, Dec 28 2019

Formula

a(n) = numerator(Sum_{k=1..n} (2^(k-1)-1)/k).
a(n+1) = numerator(a(n)/A330719(n) + A225101(n+1)/(2*A159353(n+1))).
a(p) = a(p-1) + A007663(n)*A330719(p-1) for p = prime(n) > 2.
a(n) = numerator(-(2^(n+1)*LerchPhi(2,1,n+1) + Pi*i + 2*HarmonicNumber(n))). - G. C. Greubel, Dec 28 2019
a(n) = numerator(A279683(n)/n!) for n > 0. - Amiram Eldar and Thomas Ordowski, Jan 15 2020
For n > 1, a(n) = A000265(A290347(n)). - Thomas Ordowski, Mar 29 2025

A091669 a(n) = (2^(n-1)/n!) * Product_{k=1..n-1} (2^k-1).

Original entry on oeis.org

1, 1, 2, 7, 42, 434, 7812, 248031, 14055090, 1436430198, 267176016828, 91151551074486, 57425477176926180, 67196011936600334340, 146782968474309770332296, 601204690999713530559792879
Offset: 1

Views

Author

Karol A. Penson, Jan 27 2004

Keywords

Comments

Primes p such that 2^p-2 divides a(p) are A216838. - Amiram Eldar and Thomas Ordowski, Jan 16 2020
For odd n > 1, if a(n-1) divides a(n) and n does not divide a(n), then n is a prime (for which 2 is a primitive root, A001122). Composite numbers m such that a(m-1) divides a(m) are the pseudoprimes A001567 and A006935. Numbers n > 1 such that a(m) divides a(n) for all m < n are primes 2, 3, 5, 7, and 13. These are the primes p for which gpf(2^p-2) = p. - Thomas Ordowski, Jan 17 2020
If p is a prime with primitive root 2, A001122, then p | a(p-1) + 2^(p-2). Conjecture: (for n > 2), if n | a(n-1) + 2^(n-2), then n is a prime (A001122). Note that if p is an odd prime for which 2 is not a primitive root, A216838, then p | a(p-1). - Amiram Eldar and Thomas Ordowski, Jan 19 2020

Crossrefs

Programs

  • Magma
    [1] cat [2^(n-1)/Factorial(n)*&*[(2^k-1):k in [1..n-1]]:n in [2..16]]; // Marius A. Burtea, Jan 16 2020
    
  • Maple
    seq( (2^(n-1)/n!)*mul(2^j-1, j=1..n-1), n=1..20); # G. C. Greubel, Feb 05 2020
  • Mathematica
    Table[QFactorial[n-1, 2] 2^(n-1)/n!, {n, 20}]
  • PARI
    a(n) = (2^(n-1)/n!) * prod(k=1, n-1, 2^k-1); \\ Michel Marcus, Jan 16 2020
    
  • Sage
    from sage.combinat.q_analogues import q_factorial
    [2^(n-1)*q_factorial(n-1, 2)/factorial(n) for n in (1..20)] # G. C. Greubel, Feb 05 2020

Formula

a(n) = 2^(n-1)*A005329(n-1)/n!.
a(n) = Product_{k=2..n} (2^k-2)/k = Product_{k=2..n} A225101(k)/A159353(k). - Thomas Ordowski, Jan 16 2020

Extensions

Corrected and edited by Thomas Ordowski, Jan 16 2020
Showing 1-3 of 3 results.