OFFSET
1,2
COMMENTS
Contains 2^(2^k) = A001146(k) for k >= 2. - Robert Israel, Dec 02 2014
a(9) > 10^12. - Hiroaki Yamanouchi, Sep 16 2018
For each n, a(n)^2 + 1 belongs to A176997, and thus a(n) belongs to either A005574 or A135590. - Max Alekseyev, Feb 08 2024
EXAMPLE
0 is in this sequence because 0^2 + 1 = 1 divides 2^0 - 1 = 1.
MAPLE
select(n -> (2 &^ n - 1) mod (n^2 + 1) = 0, [$1..10^6]); # Robert Israel, Dec 02 2014
MATHEMATICA
a247165[n_Integer] := Select[Range[0, n], Divisible[2^# - 1, #^2 + 1] &]; a247165[1500000] (* Michael De Vlieger, Nov 30 2014 *)
PROG
(Magma) [n: n in [1..100000] | Denominator((2^n-1)/(n^2+1)) eq 1];
(PARI) for(n=0, 10^9, if(Mod(2, n^2+1)^n==+1, print1(n, ", "))); \\ Joerg Arndt, Nov 30 2014
(Python)
A247165_list = [n for n in range(10**6) if n == 0 or pow(2, n, n*n+1) == 1]
# Chai Wah Wu, Dec 04 2014
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Juri-Stepan Gerasimov, Nov 30 2014
EXTENSIONS
a(8) from Chai Wah Wu, Dec 04 2014
Edited by Jon E. Schoenfield, Dec 06 2014
STATUS
approved