Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #23 Sep 08 2022 08:46:22
%S 50,1150,917990,27921250,27658786250,890883616630,953780917514270,
%T 35292771610455205250,1188569463078058297390,
%U 46461372967525788391551250,54339408694585566675022336250,1865231796118578544316494648870,2211609309235145328175672372758350,91503540845067670142505715662203731250
%N a(n) = (2^(p-2) + 3^(p-2) + 6^(p-2) - 1)/p where p = prime(n).
%C 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.
%C 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.
%C Note that a(1) = 1 is also an integer, while a(2) = 10/3 is not.
%H International Mathematical Olympiad, <a href="/A318760/a318760.pdf">46th IMO 2005</a>
%e 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 ...
%t Table[(2^(Prime[n] - 2) + 3^(Prime[n] - 2) + 6^(Prime[n] - 2) - 1) / Prime[n], {n, 3, 20}] (* _Vincenzo Librandi_, Sep 03 2018 *)
%o (PARI) a(n) = (2^(prime(n)-2) + 3^(prime(n)-2) + 6^(prime(n)-2) - 1)/prime(n)
%o (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
%Y For composite k such that (2^(k-2) + 3^(k-2) + 6^(k-2) - 1)/k is an integer, see A318761.
%K nonn
%O 3,1
%A _Jianing Song_, Sep 02 2018