OFFSET
1,1
COMMENTS
Prime p divides 3^p - 2^p - 1. 42 = 2*3*7 divides a(n) for n>2.
Numbers n such that n divides 3^n - 2^n - 1 are listed in A127072.
Pseudoprimes in A127072 include all powers of primes {2,3,7} and some composite numbers that are listed in A127073.
Numbers n such that n^2 divides 3^n - 2^n - 1 are listed in A127074.
Numbers n such that n^3 divides 3^n - 2^n - 1 are {1,4,7,...}.
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..315
FORMULA
a(n) = (3^prime(n) - 2^prime(n) - 1)/prime(n).
MAPLE
seq((3^ithprime(n) -2^ithprime(n) -1)/(ithprime(n)), n=1..20); # G. C. Greubel, Aug 11 2019
MATHEMATICA
Table[(3^Prime[n]-2^Prime[n]-1)/Prime[n], {n, 1, 20}]
PROG
(PARI) vector(20, n, p=prime; (3^p(n) - 2^p(n) -1)/p(n) ) \\ G. C. Greubel, Aug 11 2019
(Magma) p:=NthPrime; [(3^p(n) -2^p(n) -1)/p(n): n in [1..20]]; // G. C. Greubel, Aug 11 2019
(Sage) p=nth_prime; [(3^p(n) -2^p(n) -1)/p(n) for n in (1..20)] # G. C. Greubel, Aug 11 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Alexander Adamchuk, Jan 04 2007
STATUS
approved