A033555 Duplicate of A130134.
2, 4, 8, 248, 17608, 90148, 106978, 253828, 364808
Offset: 1
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.
a015922Q[n_Integer] := If[Mod[2^n, n] == Mod[8, n], True, False]; a015922[n_Integer] := Flatten[Position[Thread[a015922Q[Range[n]]], True]]; a015922[1000000] (* Michael De Vlieger, Jul 16 2014 *) m = 8; Join[Select[Range[m], Divisible[2^# - m, #] &], Select[Range[m + 1, 10^3], PowerMod[2, #, #] == m &]] (* Robert Price, Oct 12 2018 *) Join[{1,2,3,4,8},Select[Range[650],PowerMod[2,#,#]==8&]] (* Harvey P. Dale, Aug 22 2020 *)
isok(n) = Mod(2, n)^n == Mod(8, n); \\ Michel Marcus, Oct 13 2013, Jul 16 2014
a:= proc(n) option remember; local k; for k from 1+`if`(n=1, 0, a(n-1)) while irem(k, 3)=0 or 2&^k mod k <> 8 mod k do od; k end: seq(a(n), n=1..30); # Alois P. Heinz, Jun 04 2014
{1, 2, 4, 8} ~Join~ Select[Range[2 10^6], PowerMod[2, #, #] == 8 && !Divisible[#, 3]&] (* Jean-François Alcover, Nov 02 2020 *)
isok(n) = (n % 3) && (Mod(2^n, n) == Mod(8, n)); \\ Michel Marcus, Oct 13 2013
Do[ If[ PowerMod[2, 2n, 2n + 2] == 2, Print@2n], {n, 10^9}] (* Robert G. Wilson v, Sep 27 2006 *)
Comments