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.

A203908 Multiplicative with a(p^e) = abs(p-e).

Original entry on oeis.org

1, 1, 2, 0, 4, 2, 6, 1, 1, 4, 10, 0, 12, 6, 8, 2, 16, 1, 18, 0, 12, 10, 22, 2, 3, 12, 0, 0, 28, 8, 30, 3, 20, 16, 24, 0, 36, 18, 24, 4, 40, 12, 42, 0, 4, 22, 46, 4, 5, 3, 32, 0, 52, 0, 40, 6, 36, 28, 58, 0, 60, 30, 6, 4, 48, 20, 66, 0, 44, 24, 70, 1, 72, 36
Offset: 1

Views

Author

Keywords

Comments

Density of nonzero terms is 0.85317570460439... = Product(1 - p^-p + p^-(p+1)) where p runs over the primes. - Charles R Greathouse IV, Jan 23 2012 [corrected by Amiram Eldar, Jan 14 2023]

Crossrefs

Cf. A100717 (n such that a(n)=0).

Programs

  • Haskell
    a203908 n = product $ map abs $
                zipWith (-) (a027748_row n) (a124010_row n)
    -- Reinhard Zumkeller, Dec 24 2013
  • Mathematica
    ar[p_,s_] := Abs[p-s]; arit[1] = 1; arit[n_] := Product[ar[FactorInteger[n][[i,1]], FactorInteger[n][[i,2]]], {i, Length[FactorInteger[n]]}]; Array[arit, 100] (* José María Grau Ribas, Jan 25 2012 *)

Formula

Sum_{k=1..n} a(k) ~ c * n^2, where c = (Pi^4/72) * Product_{p prime} ((1 - 1/p^5 + 2/p^4 + 2/p^3 - 4/p^2)*(1 - p - 3*p^2 + p^3 + p^4 + 2*p^(2-2*p))/(1 - p - 3*p^2 + p^3 + p^4)) = 0.2228124152... . - Amiram Eldar, Jan 14 2023