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.

A360614 Numerator of the average distance between consecutive 0-prepended prime indices of n; a(1) = 0.

Original entry on oeis.org

0, 1, 2, 1, 3, 1, 4, 1, 1, 3, 5, 2, 6, 2, 3, 1, 7, 2, 8, 1, 2, 5, 9, 1, 3, 3, 2, 4, 10, 1, 11, 1, 5, 7, 2, 1, 12, 4, 3, 3, 13, 4, 14, 5, 1, 9, 15, 2, 2, 1, 7, 2, 16, 1, 5, 1, 4, 5, 17, 3, 18, 11, 4, 1, 3, 5, 19, 7, 9, 4, 20, 2, 21, 6, 1, 8, 5, 2, 22, 3, 1, 13, 23, 1, 7, 7, 5, 5, 24, 3, 3, 3, 11, 15, 4, 1, 25, 4, 5, 3
Offset: 1

Views

Author

Gus Wiseman, Feb 19 2023

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The 0-prepended prime indices of 100 are {0,1,1,3,3}, with differences (1,0,2,0), with mean 3/4, so a(100) = 3.
		

Crossrefs

Positions of 1's are A340609, a superset of A106529.
For twice median instead of mean we have A360555.
The denominator is A360615.
A112798 lists prime indices, length A001222, sum A056239, max A061395.
A124010 gives prime signature, mean A088529/A088530.
A316413 lists numbers with integer mean prime index, complement A348551.
A326567/A326568 gives mean of prime indices.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[If[n==1,0,Numerator[Mean[Differences[Prepend[prix[n],0]]]]],{n,100}]
  • PARI
    A360614(n) = if(1==n,0, my(u=primepi(vecmax(factor(n)[, 1]))); (u/gcd(u, bigomega(n)))); \\ Antti Karttunen, Oct 23 2023

Formula

Numerator of A061395(n)/A001222(n).
a(1) = 0; and for n >= 1, a(n) = A061395(n) / A366785(n) = A061395(n) / gcd(A001222(n), A061395(n)). - Antti Karttunen, Oct 23 2023

Extensions

Data section extended up to a(100) by Antti Karttunen, Oct 23 2023