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.
%I A287170 #36 Sep 05 2022 22:38:15 %S A287170 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, %T A287170 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, %U A287170 2,2,1,1,1,2,1,2,1,2,1,2,1,2,1,2,2,2,2 %N A287170 a(n) = number of runs of consecutive prime numbers among the prime divisors of n. %C A287170 a(n) = 0 iff n = 1. %C A287170 a(n) = 1 iff n belongs to A073491. %C A287170 a(p) = 1 for any prime p. %C A287170 a(A002110(n)) = 1 for any n > 0. %C A287170 a(n!) = 1 for any n > 1. %C A287170 a(A066205(n)) = n for any n > 0. %C A287170 a(n) = a(A007947(n)) for any n > 0. %C A287170 a(n) = a(A003961(n)) for any n > 0. %C A287170 a(n*m) <= a(n) + a(m) for any n > 0 and m > 0. %C A287170 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. %H A287170 Rémy Sigrist, <a href="/A287170/b287170.txt">Table of n, a(n) for n = 1..10000</a> %H A287170 Rémy Sigrist, <a href="/A287170/a287170.pdf">Illustration of the first terms</a> %H A287170 Rémy Sigrist, <a href="/A287170/a287170.png">Scatterplot of the ordinal transform of the first 1000000 terms</a> %F A287170 a(n) = A069010(A087207(n)) %e A287170 See illustration of the first terms in the Links section. %e A287170 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 %t A287170 Table[Length[Select[First/@If[n==1,{},FactorInteger[n]],!Divisible[n,NextPrime[#]]&]],{n,30}] (* _Gus Wiseman_, Sep 03 2022 *) %o A287170 (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)))) %o A287170 (Python) %o A287170 from sympy import factorint, primepi %o A287170 def a087207(n): %o A287170 f=factorint(n) %o A287170 return sum([2**primepi(i - 1) for i in f]) %o A287170 def a069010(n): return sum(1 for d in bin(n)[2:].split('0') if len(d)) # this function from _Chai Wah Wu_ %o A287170 def a(n): return a069010(a087207(n)) # _Indranil Ghosh_, Jun 06 2017 %Y A287170 Cf. A002110, A003961, A007947, A069010, A087207. %Y A287170 Positions of first appearances are A066205. %Y A287170 These are the row-lengths of A356226 and A356234. Other statistics are: %Y A287170 - length: A287170 (this sequence) %Y A287170 - minimum: A356227 %Y A287170 - maximum: A356228 %Y A287170 - bisected length: A356229 %Y A287170 - standard composition: A356230 %Y A287170 - Heinz number: A356231 %Y A287170 - positions of first appearances: A356603 or A356232 (sorted) %Y A287170 A001222 counts prime factors, distinct A001221. %Y A287170 A003963 multiplies together the prime indices. %Y A287170 A056239 adds up the prime indices, row sums of A112798. %Y A287170 A073491 lists numbers with gapless prime indices, complement A073492. %Y A287170 Cf. A000005, A053251, A055932, A061395, A073493, A107428, A132747, A137921, A193829, A286470. %K A287170 nonn %O A287170 1,10 %A A287170 _Rémy Sigrist_, Jun 04 2017