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.

A287170 a(n) = number of runs of consecutive prime numbers among the prime divisors of n.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Jun 04 2017

Keywords

Comments

a(n) = 0 iff n = 1.
a(n) = 1 iff n belongs to A073491.
a(p) = 1 for any prime p.
a(A002110(n)) = 1 for any n > 0.
a(n!) = 1 for any n > 1.
a(A066205(n)) = n for any n > 0.
a(n) = a(A007947(n)) for any n > 0.
a(n) = a(A003961(n)) for any n > 0.
a(n*m) <= a(n) + a(m) for any n > 0 and m > 0.
Each number n can be uniquely represented as a product of a(n) distinct terms from A073491; this representation is minimal relative to the number of terms.

Examples

			See illustration of the first terms in the Links section.
The prime indices of 18564 are {1,1,2,4,6,7}, which separate into maximal gapless submultisets {1,1,2}, {4}, {6,7}, so a(18564) = 3; this corresponds to the ordered factorization 18564 = 12 * 7 * 221. - _Gus Wiseman_, Sep 03 2022
		

Crossrefs

Positions of first appearances are A066205.
These are the row-lengths of A356226 and A356234. Other statistics are:
- length: A287170 (this sequence)
- minimum: A356227
- maximum: A356228
- bisected length: A356229
- standard composition: A356230
- Heinz number: A356231
- positions of first appearances: A356603 or A356232 (sorted)
A001222 counts prime factors, distinct A001221.
A003963 multiplies together the prime indices.
A056239 adds up the prime indices, row sums of A112798.
A073491 lists numbers with gapless prime indices, complement A073492.

Programs

  • Mathematica
    Table[Length[Select[First/@If[n==1,{},FactorInteger[n]],!Divisible[n,NextPrime[#]]&]],{n,30}] (* Gus Wiseman, Sep 03 2022 *)
  • PARI
    a(n) = my (f=factor(n)); if (#f~==0, return (0), return (#f~ - sum(i=1, #f~-1, if (primepi(f[i,1])+1 == primepi(f[i+1,1]), 1, 0))))
    
  • Python
    from sympy import factorint, primepi
    def a087207(n):
        f=factorint(n)
        return sum([2**primepi(i - 1) for i in f])
    def a069010(n): return sum(1 for d in bin(n)[2:].split('0') if len(d)) # this function from Chai Wah Wu
    def a(n): return a069010(a087207(n)) # Indranil Ghosh, Jun 06 2017

Formula

a(n) = A069010(A087207(n))