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.

A124276 Terms k of A068563 such that k/2 is not a term of A068563.

Original entry on oeis.org

1, 6, 18, 20, 42, 54, 60, 100, 126, 136, 156, 162, 180, 220, 294, 300, 342, 378, 408, 420, 468, 486, 500, 540, 620, 660, 680, 780, 820, 882, 900, 1026, 1092, 1100, 1134, 1224, 1260, 1314, 1332, 1404, 1458, 1500, 1620, 1806, 1860, 1980, 2028, 2040, 2058, 2100
Offset: 1

Views

Author

Alexander Adamchuk, Oct 23 2006

Keywords

Comments

A068563 are the numbers n such that 2^n (mod n) = 4^n (mod n). If k is in the sequence A068563 then 2k is also in the sequence A068563, but if 2m is in the sequence A068563 m is not necessarily a term of the sequence A068563.

Examples

			A068563 begins 1, 2, 4, 6, 8, 12, 16, 18, 20, 24, 32, 36, 40, 42, ... .
Thus a(0) = 1, a(1) = 6, a(2) = 18, a(3) = 20, a(4) = 42 because 1/2, 3, 9, 10, 21 are not the terms of A068563.
		

Crossrefs

Cf. A068563.

Programs

  • Maple
    a:= proc(n) option remember; local k;
          for k from `if`(n=1, 1, a(n-1)+1)
          while (2&^k mod k <> 4&^k mod k) or
             (irem(k, 2, 'r')=0 and (2&^r mod r = 4&^r mod r))
          do od; k
        end:
    seq(a(n), n=1..50);  # Alois P. Heinz, May 16 2013
  • Mathematica
    Prepend[Select[Range[2, 2100], (PowerMod[2, #, #] == PowerMod[4, #, #]) && ! (PowerMod[2, #/2, #/2] == PowerMod[4, #/2, #/2]) &], 1]