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 A284259 #24 Mar 27 2021 06:17:05 %S A284259 0,1,1,1,1,2,1,1,1,1,1,2,1,1,2,1,1,2,1,1,2,1,1,2,1,1,1,1,1,2,1,1,1,1, %T A284259 2,2,1,1,1,1,1,2,1,1,2,1,1,2,1,1,1,1,1,2,2,1,1,1,1,2,1,1,2,1,2,2,1,1, %U A284259 1,1,1,2,1,1,2,1,2,2,1,1,1,1,1,2,2,1,1,1,1,2,2,1,1,1,2,2,1,1,1,1,1,2,1,1,3,1,1,2,1,1,1,1,1,2,2,1,1,1,2,2 %N A284259 a(n) = number of distinct prime factors of n that are < the square of smallest prime factor of n, a(1) = 0. %H A284259 Antti Karttunen, <a href="/A284259/b284259.txt">Table of n, a(n) for n = 1..10001</a> %F A284259 a(n) = Sum_{p|n, p prime and < spf(n)^2} sign(p), where spf(n) (A020639) gives the smallest prime factor of n, and sign(p) = A057427(p) = 1 for all p. %F A284259 a(n) = A001221(A284255(n)). %F A284259 a(n) = A001221(n) - A284258(n). %F A284259 a(n) <= A284257(n). %F A284259 a(A284262(n)) = n. %e A284259 For n = 4 = 2*2, the prime factor 2 is less than 2^2, and it is counted only once, thus a(4) = 1. %e A284259 For n = 45 = 3*3*5, both prime factors 3 and 5 are less than 3^2, thus a(45) = 2. %t A284259 Table[If[n == 1, 0, Count[#, d_ /; d < First[#]^2] &@ FactorInteger[n][[All, 1]]], {n, 120}] (* _Michael De Vlieger_, Mar 24 2017 *) %o A284259 (Scheme) (define (A284259 n) (A001221 (A284255 n))) %o A284259 (PARI) A(n) = if(n<2, return(1), my(f=factor(n)[, 1]); for(i=2, #f, if(f[i]>f[1]^2, return(f[i]))); return(1)); %o A284259 a(n) = if(A(n)==1, 1, A(n)*a(n/A(n))); %o A284259 for(n=1, 150, print1(omega(n/a(n)),", ")) \\ _Indranil Ghosh_, after _David A. Corneth_, Mar 24 2017 %o A284259 (Python) %o A284259 from sympy import primefactors %o A284259 def omega(n): return len(primefactors(n)) %o A284259 def A(n): %o A284259 for i in primefactors(n): %o A284259 if i>min(primefactors(n))**2: return i %o A284259 return 1 %o A284259 def a(n): return 1 if A(n)==1 else A(n)*a(n//A(n)) %o A284259 print([omega(n//a(n)) for n in range(1, 151)]) # _Indranil Ghosh_, Mar 24 2017 %Y A284259 Cf. A001221, A020639, A057427, A284252, A284253, A284254, A284255, A284257, A284258, A284260. %Y A284259 Cf. A284262 (where obtains first time value n, also positions of records). %K A284259 nonn %O A284259 1,6 %A A284259 _Antti Karttunen_, Mar 24 2017