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.

A279952 Number of primes with prime subscripts dividing n.

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 2, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 2, 1, 0, 2, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 2, 0, 0, 1, 0, 1, 2, 0, 0, 1, 2, 0, 1, 0, 1, 2, 0, 1, 1, 0, 1, 2, 1, 1, 1, 1, 0, 1, 0, 0, 2, 0, 1, 1, 0, 1, 1, 1, 1, 1, 2, 0, 1, 1, 0, 2, 0, 0, 2, 0, 1, 1, 0, 0, 2, 1, 0, 2, 0, 0, 2, 0, 0, 1, 1, 2, 1, 0, 0, 1, 1, 0, 1, 1, 1, 2
Offset: 1

Views

Author

Ilya Gutkovskiy, Dec 23 2016

Keywords

Examples

			a(15) = 2 because 15 has 4 divisors {1,3,5,15} among which 2 divisors {3,5} are primes with prime subscripts.
		

Crossrefs

Programs

  • Maple
    with(numtheory): seq(add(pi(pi(d))-pi(pi(d-1)), d in divisors(n)), n=1..80); # Ridouane Oudra, Sep 12 2023
  • Mathematica
    Rest[nmax = 120; CoefficientList[Series[Sum[x^Prime[Prime[k]]/(1 - x^Prime[Prime[k]]), {k, 1, nmax}], {x, 0, nmax}], x]]
    f[p_, e_] := If[PrimeQ[PrimePi[p]], 1, 0]; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Nov 03 2023 *)
  • PARI
    my(x='x+O('x^120)); concat([0, 0], Vec(sum(k=1, 120, x^prime(prime(k))/(1 - x^prime(prime(k)))))) \\ Indranil Ghosh, May 23 2017

Formula

G.f.: Sum_{k>=1} x^prime(prime(k))/(1 - x^prime(prime(k))).
a(n) = Sum_{d|n} A111406(d-1). - Ridouane Oudra, Sep 12 2023
Additive with a(p^e) = 1 if primepi(p) is prime, and 0 otherwise. - Amiram Eldar, Nov 03 2023
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{n>=1} 1/A006450(n) = 1.04... (see A006450 for a better estimate of this constant). - Amiram Eldar, Jan 01 2024