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.

A252044 Numbers n such that s + 1/p = 0, where {d(i), i=1..q} are the q distinct prime divisors of n, s = Sum_{i=1..q} (-1)^(i+1)*i/d(i) and p = Product_{i=1..q} d(i).

Original entry on oeis.org

6, 12, 15, 18, 24, 36, 45, 48, 54, 72, 75, 91, 96, 108, 114, 135, 144, 162, 192, 216, 225, 228, 288, 324, 342, 375, 384, 405, 432, 456, 486, 576, 637, 648, 675, 684, 703, 768, 864, 912, 972, 1026, 1125, 1152, 1183, 1215, 1296, 1368, 1458, 1536, 1728, 1824, 1875
Offset: 1

Views

Author

Michel Lagneau, Dec 13 2014

Keywords

Comments

The semiprimes p*q, p and q prime with q=2*p-1 (A129521) are in the sequence.

Examples

			18 is in the sequence because the prime factors of 18 are {2,3} => s = 1/2 - 2/3, 1/p = 1/6 and 1/2 - 2/3 + 1/6 = -1/6 + 1/6 = 0.
114 is in the sequence because the prime factors of 114 are {2,3,19} => s = 1/2 - 2/3 + 3/19, 1/p = 1/114 and 1/2 - 2/3 + 3/19 + 1/114 = -1/114 + 1/114 = 0.
		

Crossrefs

Cf. A129521, A007947 (product of the distinct prime factors of n).

Programs

  • Maple
    with(numtheory):nn:=10000:
    for n from 1 to nn do:
       x:=factorset(n):n0:=nops(x):
       s:=sum('i*((-1)^(i+1))/x[i]','i'=1..n0):s0:=product('x[i]','i'=1..n0):
       p:=product('x[i]','i'=1..n0):s2:=s+1/s0:
        if s2=0
        then
        printf(`%d, `,n):
        else
        fi:
      od:
  • Mathematica
    fQ[n_] := Block[{pd = First@# & /@ FactorInteger@ n, rng}, rng = Range@ Length@ pd; 1 == (Times @@ pd)*Total[rng/pd*((-1)^rng)]]; Select[ Range@ 2000, fQ@# &] (* Robert G. Wilson v, Jan 11 2015 *)
  • PARI
    isok(n) = {my(vp = factor(n)[,1]~); 1/prod(i=1, #vp, vp[i]) + sum(i=1, #vp, (-1)^(i+1)*i/vp[i]) == 0;} \\ Michel Marcus, Jan 12 2015