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.

A318760 a(n) = (2^(p-2) + 3^(p-2) + 6^(p-2) - 1)/p where p = prime(n).

Original entry on oeis.org

50, 1150, 917990, 27921250, 27658786250, 890883616630, 953780917514270, 35292771610455205250, 1188569463078058297390, 46461372967525788391551250, 54339408694585566675022336250, 1865231796118578544316494648870, 2211609309235145328175672372758350, 91503540845067670142505715662203731250
Offset: 3

Views

Author

Jianing Song, Sep 02 2018

Keywords

Comments

Related to 46th IMO 2005 Problem 4, which asks to find all positive integers k such that gcd(2^n + 3^n + 6^n - 1, k) = 1 for all n. The answer is k = 1. The main part of the solution is to show that for all primes p >= 5 satisfies p divides 2^(p-2) + 3^(p-2) + 6^(p-2) - 1. By Fermat's little theorem, 2^(p-1) == 3^(p-1) == 6^(p-1) == 1 (mod p), so 2^(p-2) + 3^(p-2) + 6^(p-2) - 1 == 2^(-1) + 3^(-1) + 6^(-1) - 1 == 0 (mod p). Here a^(-1) is the multiplicative inverse of a modulo p.
All terms are multiples of 10 but not divisible by 4. If prime(n) !== 3 (mod 8) then a(n) is divisible by 50; if n > 3 and prime(n) == 1 (mod 4) then a(n) is divisible by 250; if prime(n) == 1, 13, 17 (mod 20) then a(n) is divisible by 1250.
Note that a(1) = 1 is also an integer, while a(2) = 10/3 is not.

Examples

			a(3) = (2^3 + 3^3 + 6^3 - 1)/5 = 50, a(4) = (2^5 + 3^5 + 6^5 - 1)/7 = 1150, a(5) = (2^9 + 3^9 + 6^9 - 1)/11 = 917990 ...
		

Crossrefs

For composite k such that (2^(k-2) + 3^(k-2) + 6^(k-2) - 1)/k is an integer, see A318761.

Programs

  • Magma
    [(2^(NthPrime(n)-2)+3^(NthPrime(n)-2)+6^(NthPrime(n)-2)- 1)/NthPrime(n): n in [3..20]]; // Vincenzo Librandi, Sep 03 2018
  • Mathematica
    Table[(2^(Prime[n] - 2) + 3^(Prime[n] - 2) + 6^(Prime[n] - 2) - 1) / Prime[n], {n, 3, 20}] (* Vincenzo Librandi, Sep 03 2018 *)
  • PARI
    a(n) = (2^(prime(n)-2) + 3^(prime(n)-2) + 6^(prime(n)-2) - 1)/prime(n)