A370578 Numbers k such that k + 1 divides 3^k + 1.
0, 1, 3, 27, 531, 1035, 4635, 6363, 11475, 19683, 40131, 80955, 266475, 280755, 307395, 356643, 490371, 544347, 557955, 565515, 572715, 808227, 1256355, 1695483, 1959075, 1995075, 2771595, 2837835, 3004155, 3208491, 3337635, 3886443, 4670955, 5619411, 6434595, 6942817
Offset: 1
Keywords
Examples
(3^27+1)/(27+1) is an integer, so 27 is in the sequence. This can be shown efficiently using a modular exponentiation algorithm to find 3^27 mod 28.
Links
- Zubin Mukerjee, Table of n, a(n) for n = 1..214
- Mathematics Stack Exchange, Why do so many solutions to n+1 | 3^n+1 satisfy n = 27 (mod 72)?
Programs
-
Mathematica
Select[Range[0,7000000],TrueQ[PowerMod[3,#,#+1]==#]&] (* James C. McMahon, Feb 25 2024 *)
-
Python
for n in range(100_000_000): if (pow(3,n,n+1)==n): print(n)
Comments