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.

A070005 Arithmetic mean of prime factors of n is an integer and n is neither a prime nor power of a prime.

Original entry on oeis.org

15, 21, 33, 35, 39, 42, 45, 51, 55, 57, 63, 65, 69, 75, 77, 78, 84, 85, 87, 91, 93, 95, 99, 105, 110, 111, 114, 115, 117, 119, 123, 126, 129, 133, 135, 141, 143, 145, 147, 153, 155, 156, 159, 161, 168, 170, 171, 175, 177, 183, 185, 186, 187, 189, 195, 201, 203
Offset: 1

Views

Author

Labos Elemer, Apr 11 2002

Keywords

Examples

			n=33=3*11, mean=(3+11)/2=6.
		

Crossrefs

Cf. A000961, A010055; subsequence of A078174.

Programs

  • Haskell
    a070005 n = a070005_list !! (n-1)
    a070005_list = filter ((== 0) . a010055) a078174_list
    -- Reinhard Zumkeller, Jun 01 2013
    
  • Mathematica
    ffi[x_] := Flatten[FactorInteger[x]] lf[x_] := Length[FactorInteger[x]] ba[x_] := Table[Part[ffi[x], 2*w-1], {w, 1, lf[x]}] ep[x_] := Table[Part[ffi[x], 2*w], {w, 1, lf[x]}] Do[s=Apply[Plus, ba[n]]/lf[n]; If[IntegerQ[s]&&Greater[lf[n], 1], Print[n]], {n, 2, 1000}]
  • PARI
    lista(nn) = {for (n=2, nn, f = factor(n); if ((#f~ != 1) && (sum(k=1, #f~, f[k,1]) % #f~ == 0), print1(n, ", ")););} \\ Michel Marcus, Mar 28 2015