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.

A226957 Number of prime divisors p of 2n such that p-1 divides n.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 3, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 3, 1, 1, 1, 1, 1, 2
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A136141.

Programs

  • Mathematica
    fa = FactorInteger; a[n_] := Sum[If[IntegerQ[n/(fa[2 n][[i,1]]-1)],1,0],{i, Length[fa[2 n]]}]; Table[a[n], {n, 1, 100}]
  • PARI
    a(n)=my(f=factor(2*n)[,1]);sum(i=1,#f,n%(f[i]-1)==0) \\ Charles R Greathouse IV, Jun 26 2013

Formula

Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 1/2 + Sum_{p prime} 1/(p*(p-1)) = 1/2 + A136141 = 1.273156669... . - Amiram Eldar, May 17 2024

Extensions

Erroneous a(87) added by T. D. Noe, corrected by Charles R Greathouse IV, Jun 26 2013