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.

A070008 Arithmetic mean of distinct primes dividing n is a power of 2 (powers of 2 are not left out).

Original entry on oeis.org

2, 4, 8, 15, 16, 32, 39, 42, 45, 55, 64, 75, 84, 87, 114, 117, 126, 128, 135, 168, 170, 183, 225, 228, 247, 252, 256, 258, 261, 275, 294, 295, 336, 340, 342, 351, 375, 378, 405, 410, 456, 504, 507, 512, 516, 549, 583, 588, 605, 672, 675, 680, 684, 756, 774
Offset: 1

Views

Author

Labos Elemer, Apr 11 2002

Keywords

Examples

			n=9189=3*1021, mean=(3+1021)/2=512.
		

Crossrefs

Programs

  • Mathematica
    ffi[x_] := Flatten[FactorInteger[x]] lf[x_] := Length[FactorInteger[x]] ba[x_] := Table[Part[ffi[x], 2*w-1], {w, 1, lf[x]}] Do[s=Apply[Plus, ba[n]]/lf[n]; If[IntegerQ[Log[2, s]], Print[{n, s}]], {n, 2, 10000}]
    fQ[n_] := Block[{pf = FactorInteger@ n}, Length@ pf == 1 && pf[[1, 1]] == 2]; Select[Range[2, 780], fQ[Total[First /@ FactorInteger@#]/PrimeNu@#] &] (* Michael De Vlieger, Mar 28 2015 *)