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.

A015922 Numbers k such that 2^k == 8 (mod k).

This page as a plain text file.
%I A015922 #64 Nov 04 2023 06:23:10
%S A015922 1,2,3,4,8,9,15,21,33,39,51,57,63,69,87,93,111,123,129,141,159,177,
%T A015922 183,195,201,213,219,237,248,249,267,291,303,309,315,321,327,339,381,
%U A015922 393,399,411,417,447,453,471,489,501,519,537,543,573,579,591,597,633
%N A015922 Numbers k such that 2^k == 8 (mod k).
%C A015922 For all m, 2^A015921(m) - 1 belongs to this sequence.
%H A015922 Michael De Vlieger, <a href="/A015922/b015922.txt">Table of n, a(n) for n = 1..29055</a> (first 6822 terms from Zak Seidov)
%H A015922 OEIS Wiki, <a href="/wiki/2^n mod n">2^n mod n</a>.
%t A015922 a015922Q[n_Integer] := If[Mod[2^n, n] == Mod[8, n], True, False];
%t A015922 a015922[n_Integer] :=
%t A015922 Flatten[Position[Thread[a015922Q[Range[n]]], True]];
%t A015922 a015922[1000000] (* _Michael De Vlieger_, Jul 16 2014 *)
%t A015922 m = 8; Join[Select[Range[m], Divisible[2^# - m, #] &], Select[Range[m + 1, 10^3], PowerMod[2, #, #] == m &]] (* _Robert Price_, Oct 12 2018 *)
%t A015922 Join[{1,2,3,4,8},Select[Range[650],PowerMod[2,#,#]==8&]] (* _Harvey P. Dale_, Aug 22 2020 *)
%o A015922 (PARI) isok(n) = Mod(2, n)^n == Mod(8, n); \\ _Michel Marcus_, Oct 13 2013, Jul 16 2014
%Y A015922 Contains A033553 as a subsequence.
%Y A015922 The odd terms form A276967.
%Y A015922 Cf. A015921, A130133, A130134.
%K A015922 nonn
%O A015922 1,2
%A A015922 _Robert G. Wilson v_
%E A015922 First 5 terms inserted by _David W. Wilson_