cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A294390 a(n) = 2^(n-4) mod n, for n >= 4.

This page as a plain text file.
%I A294390 #33 Dec 27 2024 03:50:59
%S A294390 1,2,4,1,0,5,4,7,4,5,2,8,0,15,4,12,16,11,14,3,16,2,10,5,8,11,4,4,0,17,
%T A294390 30,23,4,14,24,20,16,36,4,27,12,32,6,6,16,8,14,26,40,20,22,13,16,29,
%U A294390 22,37,16,23,8,32,0,2,4,42,52,35,64,9,40,64,28,23,20,30,4
%N A294390 a(n) = 2^(n-4) mod n, for n >= 4.
%C A294390 Every nonnegative integer seems to appear in the sequence, and every integer seems to appear in the sequence of first differences (see link).
%C A294390 From _Robert Israel_, Dec 04 2017: (Start)
%C A294390 a(n) = 0 iff n>=8 is a power of 2.
%C A294390 a(n) = 1 iff n=4 or n is in A033984.
%C A294390 a(n) = 2 iff n>=4 is in A015925 and is not divisible by 4. (End)
%H A294390 Robert Israel, <a href="/A294390/b294390.txt">Table of n, a(n) for n = 4..10000</a>
%H A294390 Enrique Navarrete, <a href="/A294390/a294390.pdf">Sequences derived from residues of 2^n (mod n)</a>
%e A294390 For n=9, 2^5 = 32 == 5 mod 9.
%p A294390 A294390:=n->2&^(n-4) mod n: seq(A294390(n), n=4..150); # _Wesley Ivan Hurt_, Nov 30 2017
%t A294390 Array[Mod[2^(# - 4), #] &, 75, 4] (* _Michael De Vlieger_, Dec 02 2017 *)
%t A294390 Array[PowerMod[2,#-4,#]&,80,4] (* _Harvey P. Dale_, Dec 01 2018 *)
%o A294390 (PARI) a(n) = lift(Mod(2, n)^(n-4)); \\ _Michel Marcus_, Oct 30 2017
%o A294390 (Magma) [Modexp(2, n-4, n): n in [4..120]]; // _G. C. Greubel_, Dec 27 2024
%o A294390 (SageMath) print([power_mod(2, n-4, n) for n in range(4, 101)]) # _G. C. Greubel_, Dec 27 2024
%Y A294390 Cf. A015910, A015925, A033984, A294389.
%K A294390 nonn,easy,look
%O A294390 4,2
%A A294390 _Enrique Navarrete_, Oct 29 2017
%E A294390 More terms from _Michel Marcus_, Oct 30 2017