OFFSET
1,1
COMMENTS
It appears that A007521 is a subsequence.
a(118) = 3277 = 29*113 is the first nonprime term.
LINKS
Jonas Kaiser, On the relationship between the Collatz conjecture and Mersenne prime numbers, arXiv:1608.00862 [math.GM], 2016.
MATHEMATICA
okQ[n_] := AllTrue[{2^(n-1), (2*n-1)*(2^((n-1)/2)), (4*Ceiling@(n/4) - 2), (2^((n+1)/2) + Floor@((3/4)*n)*2^(((n+1)/2) + 1))}, Mod[#, n] == 1&];
Select[Range[1300], okQ] (* Jean-François Alcover, Feb 18 2019 *)
PROG
(PARI) isok(n) = (n%2) && lift((Mod(2, n)^(n-1))==1)&&lift((Mod((2*n-1), n)*Mod(2, n)^((n-1)/2)) == 1)&&lift((Mod(((4*ceil((1/4)*n)-2)), n) )== 1)&&lift((Mod(2, n)^((n+1)/2) +Mod(floor((3/4)*n), n)*Mod(2, n)^(((n+1)/2)+1 ))== 1)
CROSSREFS
KEYWORD
nonn
AUTHOR
Jonas Kaiser, Nov 10 2017
EXTENSIONS
More terms from Alois P. Heinz, Nov 10 2017
STATUS
approved