OFFSET
1,1
LINKS
Michel Marcus, Table of n, a(n) for n = 1..10000
FORMULA
Conjecture (Superseeker): a(n) = A263458(n)/2. - R. J. Mathar, Aug 02 2024
The conjectured formula is false. There exist numbers k such that 2*k + 1 is composite and k^(k + 1) == k + 1 (mod 2*k + 1). For example, when k = 1023: 1023^1024 == 1024 (mod 2047) and 2047 = 23*89 is composite. - Jedrzej Miarecki, Jan 16 2025
MATHEMATICA
Select[Range[350], Mod[#^(#+1), 2#+1]==#+1 &] (* Stefano Spezia, Jul 23 2024 *)
PROG
(Magma) [n: n in [0..350] | n^(n+1) mod (2*n+1) eq n+1];
(PARI) isok(k) = Mod(k, 2*k+1)^(k+1) == k+1; \\ Michel Marcus, Feb 05 2025
CROSSREFS
KEYWORD
nonn,changed
AUTHOR
Juri-Stepan Gerasimov, Jul 23 2024
STATUS
approved