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.

A073631 Nonprimes k such that k divides 3^(k-1) - 2^(k-1).

Original entry on oeis.org

1, 65, 133, 529, 793, 1105, 1649, 1729, 2059, 2321, 2465, 2701, 2821, 4187, 5185, 6305, 6541, 6601, 6697, 6817, 7471, 7613, 8113, 8911, 10585, 10963, 11521, 13213, 13333, 13427, 14701, 14981, 15841, 18721, 19171, 19201, 19909, 21349, 21667, 22177, 26065
Offset: 1

Views

Author

Benoit Cloitre, Aug 29 2002

Keywords

Comments

Terms 1,65,2059,6305,19171,... are also in A001047
All primes p>3 divide 3^(p-1) - 2^(p-1). It appears that a(1) = 1 and a(4) = 529 = 23^2 are the only perfect squares in a(n). Most terms of a(n) are squarefree. First 50 nonsquarefree terms of a(n) are the multiples of 23^2. Conjecture: All nonsquarefree terms of a(n) are the multiples of 23^2. Numbers n such that k=n*23^2 divides 3^(k-1) - 2^(k-1) are listed in A130058 = {1, 67, 89, 133, 199, 331, 617, 793, 881, 5281, 8911, 1419, 13333,...}. - Alexander Adamchuk, May 04 2007
Contains all Carmichael numbers (A002997) that are not divisible by 3. - Robert Israel, May 19 2015

Crossrefs

Cf. A001047 (3^n - 2^n), A002997.
Cf. A038876, A097934 (primes p such that p divides 3^((p-1)/2) - 2^((p-1)/2)).
Cf. A130059, A130058 (numbers n such that k=n*23^2 divides 3^(k-1) - 2^(k-1)).

Programs

  • Magma
    [n: n in [1..3*10^4] | not IsPrime(n) and IsDivisibleBy(3^(n-1)-2^(n-1), n)]; // Vincenzo Librandi, May 20 2015
  • Maple
    1,op(select(n -> (3 &^ (n-1) - 2 &^ (n-1) mod n = 0 and not isprime(n)), [seq(2*i+1,i=1..10000)])); # Robert Israel, May 19 2015
  • Mathematica
    Select[Range[3 10^4], ! PrimeQ[#] && Mod[3^(# - 1) - 2^(# - 1), #] == 0 &] (* Vincenzo Librandi, May 20 2015 *)
    Select[Range[3*10^4], PowerMod[3, # - 1, #] == PowerMod[2, # - 1, #] && !PrimeQ[#] &] (* Amiram Eldar, Mar 27 2021 *)
  • PARI
    isok(n) = ! isprime(n) && !((3^(n-1)-2^(n-1)) % n); \\ Michel Marcus, Nov 28 2013
    

Extensions

Term 14701 added and more terms from Michel Marcus, Nov 28 2013