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!)
A035531 a(n) = A000120(n) + A001221(n) - 1. 3
0, 1, 2, 1, 2, 3, 3, 1, 2, 3, 3, 3, 3, 4, 5, 1, 2, 3, 3, 3, 4, 4, 4, 3, 3, 4, 4, 4, 4, 6, 5, 1, 3, 3, 4, 3, 3, 4, 5, 3, 3, 5, 4, 4, 5, 5, 5, 3, 3, 4, 5, 4, 4, 5, 6, 4, 5, 5, 5, 6, 5, 6, 7, 1, 3, 4, 3, 3, 4, 5, 4, 3, 3, 4, 5, 4, 5, 6, 5, 3, 3, 4, 4, 5, 5, 5, 6, 4, 4, 6, 6, 5, 6, 6, 7, 3, 3, 4, 5, 4, 4, 6, 5, 4, 6, 5, 5, 5, 5, 7, 7 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..65537 (first 1000 terms from G. C. Greubel)
FORMULA
G.f.: Sum a(n) x^n = Sum A000120(p)*x^p/(1-x^p), p = prime.
MAPLE
A035531 := proc(n)
A000120(n)+A001221(n)-1 ;
end proc:
seq(A035531(n), n=1..100) ; # R. J. Mathar, Mar 12 2018
MATHEMATICA
Table[DigitCount[n, 2, 1] + PrimeNu[n] - 1, {n, 1, 100}] (* G. C. Greubel, Apr 24 2017 *)
PROG
(PARI) a(n) = hammingweight(n) + omega(n) - 1; \\ Michel Marcus, Apr 25 2017
(Python)
from sympy import primefactors
def a(n): return 0 if n<2 else bin(n)[2:].count("1") + len(primefactors(n)) - 1 # Indranil Ghosh, Apr 25 2017
CROSSREFS
Cf. also A336149.
Sequence in context: A136624 A033763 A033803 * A118977 A071766 A007305
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from David W. Wilson.
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 25 05:18 EDT 2024. Contains 372782 sequences. (Running on oeis4.)