login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A294919
Numbers n such that 2^(n-1), (2*n-1)*(2^((n-1)/2)), (4*ceiling((1/4)*n)-2), and (2^((n+1)/2) + floor((3/4)*n)*2^(((n+1)/2)+1)) are all congruent to 1 (mod n).
1
5, 13, 29, 37, 53, 61, 101, 109, 149, 157, 173, 181, 197, 229, 269, 277, 293, 317, 349, 373, 389, 397, 421, 461, 509, 541, 557, 613, 653, 661, 677, 701, 709, 733, 757, 773, 797, 821, 829, 853, 877, 941, 997, 1013, 1021, 1061, 1069, 1093, 1109, 1117, 1181, 1213
OFFSET
1,1
COMMENTS
It appears that A007521 is a subsequence.
a(118) = 3277 = 29*113 is the first nonprime term.
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