The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A178146 a(n) is the number of distinct prime factors <= 5 of n. 3
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,6
COMMENTS
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.
LINKS
FORMULA
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.
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
From Amiram Eldar, Sep 16 2023:
Additive with a(p^e) = 1 if p <= 5, and 0 otherwise.
a(n) = A059841(n) + A079978(n) + A079998(n).
a(n) = A001221(gcd(n, 30)).
a(n) = A001221(A355582(n)).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 31/30. (End)
MATHEMATICA
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 *)
LinearRecurrence[{-2, -2, -1, 0, 1, 2, 2, 1}, {0, 1, 1, 1, 1, 2, 0, 1}, 120] (* Harvey P. Dale, Sep 29 2021 *)
a[n_] := PrimeNu[GCD[n, 30]]; Array[a, 100] (* Amiram Eldar, Sep 16 2023 *)
PROG
(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
(PARI) a(n) = omega(gcd(n, 30)); \\ Amiram Eldar, Sep 16 2023
CROSSREFS
Number of distinct prime factors <= p: A171182 (p=3), this sequence (p=5), A210679 (p=7).
Sequence in context: A116949 A359244 A204427 * A305435 A350658 A114708
KEYWORD
nonn,easy
AUTHOR
Vladimir Shevelev, May 21 2010
EXTENSIONS
Name edited by Amiram Eldar, Sep 16 2023
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 26 02:41 EDT 2024. Contains 372807 sequences. (Running on oeis4.)