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 A178146 #30 Aug 16 2025 17:09:40 %S A178146 0,1,1,1,1,2,0,1,1,2,0,2,0,1,2,1,0,2,0,2,1,1,0,2,1,1,1,1,0,3,0,1,1,1, %T A178146 1,2,0,1,1,2,0,2,0,1,2,1,0,2,0,2,1,1,0,2,1,1,1,1,0,3,0,1,1,1,1,2,0,1, %U A178146 1,2,0,2,0,1,2,1,0,2,0,2,1,1,0,2,1,1,1,1,0,3,0,1,1,1,1,2,0,1,1,2,0,2,0,1,2 %N A178146 a(n) is the number of distinct prime factors <= 5 of n. %C A178146 The sequence is periodic with period {0 1 1 1 1 2 0 1 1 2 0 2 0 1 2 1 0 2 0 2 1 1 0 2 1 1 1 1 0 3} of length 30. There are 26 coincidences on the interval [1,30] with A156542. %H A178146 Vladimir Shevelev, <a href="http://arXiv.org/abs/0903.1743">A recursion for divisor function over divisors belonging to a prescribed finite sequence of positive integers and a solution of the Lahiri problem for divisor function sigma_x(n)</a>, arXiv:0903.1743 [math.NT], 2009. %H A178146 <a href="/index/Rec#order_08">Index entries for linear recurrences with constant coefficients</a>, signature (-2,-2,-1,0,1,2,2,1). %F A178146 a(n) = a(n-2) + a(n-3) - a(n-7) - a(n-8) + a(n-10), a(1) = 0, a(2) = 1, a(3) = 1, a(4) = 1, a(5) = 1, a(6) = 2, a(7) = 0, a(8) = 1, a(9) = 1, a(10) = 2. %F A178146 G.f.: -x^2*(3*x^6+6*x^5+7*x^4+6*x^3+5*x^2+3*x+1) / ((x-1)*(x+1)*(x^2+x+1)*(x^4+x^3+x^2+x+1)). - _Colin Barker_, Mar 13 2013 %F A178146 From _Amiram Eldar_, Sep 16 2023: (Start) %F A178146 Additive with a(p^e) = 1 if p <= 5, and 0 otherwise. %F A178146 a(n) = A059841(n) + A079978(n) + A079998(n). %F A178146 a(n) = A001221(gcd(n, 30)). %F A178146 a(n) = A001221(A355582(n)). %F A178146 Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 31/30. (End) %t A178146 Rest@ CoefficientList[Series[-x^2*(3*x^6 + 6*x^5 + 7*x^4 + 6*x^3 + 5*x^2 + 3*x + 1)/((x - 1)*(x + 1)*(x^2 + x + 1)*(x^4 + x^3 + x^2 + x + 1)), {x, 0, 50}], x] (* _G. C. Greubel_, May 16 2017 *) %t A178146 LinearRecurrence[{-2,-2,-1,0,1,2,2,1},{0,1,1,1,1,2,0,1},120] (* _Harvey P. Dale_, Sep 29 2021 *) %t A178146 a[n_] := PrimeNu[GCD[n, 30]]; Array[a, 100] (* _Amiram Eldar_, Sep 16 2023 *) %o A178146 (PARI) my(x='x+O('x^50)); concat([0], Vec(-x^2*(3*x^6+6*x^5+7*x^4+6*x^3+5*x^2+3*x+1)/((x-1)*(x+1)*(x^2+x+1)*(x^4+x^3+x^2+x+1)))) \\ _G. C. Greubel_, May 16 2017 %o A178146 (PARI) a(n) = omega(gcd(n, 30)); \\ _Amiram Eldar_, Sep 16 2023 %Y A178146 Cf. A000005, A001221, A156542, A171182, A178143, A178144, A178142. %Y A178146 Cf. A059841, A079978, A079998, A355582, A356006. %Y A178146 Number of distinct prime factors <= p: A171182 (p=3), this sequence (p=5), A210679 (p=7). %K A178146 nonn,easy %O A178146 1,6 %A A178146 _Vladimir Shevelev_, May 21 2010 %E A178146 Name edited by _Amiram Eldar_, Sep 16 2023