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.

A127074 Numbers k such that k^2 divides 3^k - 2^k - 1.

Original entry on oeis.org

1, 2, 3, 4, 7, 49, 179, 619, 17807
Offset: 1

Views

Author

Alexander Adamchuk, Jan 04 2007

Keywords

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,...}.

Crossrefs

Programs

  • Magma
    [n: n in [1..20000] | (3^n-2^n-1) mod n^2 eq 0]; // G. C. Greubel, Jan 30 2020
    
  • 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 *)
  • PARI
    for(n=1, 20000, if((3^n-2^n-1)%n^2 == 0, print1(n", "))) \\ 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

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