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.

A309239 Numbers m > 1 having the property that for any prime divisor p of m, k=p-1 is the smallest positive integer such that p-k|m-k.

Original entry on oeis.org

2, 4, 6, 8, 10, 12, 14, 16, 18, 22, 24, 26, 30, 32, 34, 36, 38, 40, 46, 48, 54, 56, 58, 60, 62, 64, 72, 74, 82, 84, 86, 90, 94, 96, 98, 100, 106, 108, 118, 120, 122, 126, 128, 132, 134, 142, 144, 146, 150, 158, 160, 162, 166, 168, 178, 180, 192, 194, 198, 202, 206, 210
Offset: 1

Views

Author

David James Sycamore, Jul 17 2019

Keywords

Comments

All terms in this sequence are even. Proof: If m is odd and p a prime factor, then p is odd. Put t=p-2, then m-t is even, and since p-(p-2)=2, p-t|m-t. Therefore k <= p-2 < p-1, and p-1 is not the smallest number satisfying the definition of k. Therefore there are no odd numbers in this sequence.

Examples

			For m=1 the predicate would not be well defined.
For m=2, k=1=2-1, so 2 is a term.
For m=10=2*5: p=2->k=1=2-1; p=5->k=4=5-1 therefore 10 is a term.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local p,k;
      for p in numtheory:-factorset(n) minus {2} do
         for k from 2 to p-3 by 2 do
           if (n-k) mod (p-k) = 0 then return false fi
      od od;
      true
    end proc:
    select(filter, [seq(i,i=2..200,2)]); # Robert Israel, Jul 17 2019
  • Mathematica
    fQ[n_, p_] := Module[{k = 1}, While[!Divisible[n - k, p - k], k++]; k == p - 1]; aQ[n_] := And @@ (fQ[n, #] & /@ FactorInteger[n][[;; , 1]]); Select[Range[2, 200], aQ] (* Amiram Eldar, Jul 17 2019 *)
  • PARI
    findleast(m, p) = {for (k=1, p-1, if (!((m-k) % (p-k)), return(k)););}
    isok(m) = {if (m == 1, return(0)); my (f = factor(m)); for (i=1, #f~, my(k = findleast(m, f[i,1])); if (k != f[i,1] - 1, return (0));); return (1);} \\ Michel Marcus, Aug 18 2019

Formula

A001414(m) - A001222(m) = A059975(m) = A309155(m), for m in this sequence.