A014945 Numbers k such that k divides 4^k - 1.
1, 3, 9, 21, 27, 63, 81, 147, 171, 189, 243, 441, 513, 567, 657, 729, 903, 1029, 1197, 1323, 1539, 1701, 1971, 2187, 2667, 2709, 3087, 3249, 3591, 3969, 4599, 4617, 5103, 5913, 6321, 6561, 7077, 7203, 8001, 8127, 8379, 9261, 9747, 10773, 11907, 12483
Offset: 1
Keywords
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..872 from Muniru A Asiru, terms 873..2000 from Alois P. Heinz)
Programs
-
GAP
a:=Filtered([1..13000],n->(4^n-1) mod n=0);; Print(a); # Muniru A Asiru, Dec 28 2018
-
Magma
[n: n in [1..12500] | (4^n-1) mod n eq 0 ]; // Vincenzo Librandi, Dec 29 2018
-
Maple
select(n->modp(4^n-1,n)=0,[$1..13000]); # Muniru A Asiru, Dec 28 2018
-
Mathematica
Select[Range[12500],Divisible[4^#-1,#]&] (* Harvey P. Dale, Mar 23 2011 *)
-
PARI
is(n)=Mod(4,n)^n==1 \\ Charles R Greathouse IV, Nov 03 2016
-
Python
for n in range(1,1000): if (4**n-1) % n ==0: print(n, end=', ') # Stefano Spezia, Jan 05 2019
Formula
a(n) = A014741(n+1)/2.
Extensions
More terms and better description from Benoit Cloitre, Mar 05 2002
Comments