login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A127074
Numbers k such that k^2 divides 3^k - 2^k - 1.
10
1, 2, 3, 4, 7, 49, 179, 619, 17807
OFFSET
1,2
COMMENTS
No other terms below 10^9.
Prime p divides 3^p - 2^p - 1. Quotients (3^p - 2^p - 1)/p are listed in A127071.
Numbers k such that k divides 3^k - 2^k - 1 are listed in A127072.
The pseudoprimes in A127072 include all powers of primes and some composite numbers that are listed in A127073.
Numbers k such that k^3 divides 3^k - 2^k - 1 begin 1, 4, 7 (with no other terms < 10^8).
Primes in {a(n)} are {2,3,7,179,619,...}.
MATHEMATICA
Do[f=(3^n-2^n-1); If[IntegerQ[f/n^2], Print[n]], {n, 1, 1000}]
Select[Range[20000], Mod[3^# -2^# -1, #^2]==0 &] (* G. C. Greubel, Jan 30 2020 *)
PROG
(PARI) for(n=1, 20000, if((3^n-2^n-1)%n^2 == 0, print1(n", "))) \\ G. C. Greubel, Jan 30 2020
(Magma) [n: n in [1..20000] | (3^n-2^n-1) mod n^2 eq 0]; // G. C. Greubel, Jan 30 2020
(Sage) [n for n in (1..20000) if mod(3^n-2^n-1, n^2)==0 ] # G. C. Greubel, Jan 30 2020
CROSSREFS
KEYWORD
nonn,hard,more
AUTHOR
Alexander Adamchuk, Jan 04 2007
EXTENSIONS
6 incorrect terms deleted by D. S. McNeil, Mar 16 2009 (the old version was 1,2,3,4,7,49,179,619,17807,95041,135433,393217,589825,1376257,1545601)
Edited by Max Alekseyev, Oct 21 2011
STATUS
approved