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!)
A322818 a(n) = A001222(n) - A001222(A285328(n)), where A285328(n) gives the next smaller m that has same prime factors as n (ignoring multiplicity), or 1 if n is squarefree, and A001222 gives the number of prime factors, when counted with multiplicity. 2
0, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 0, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 2, 2, 2, 0, 1, 2, 2, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, -1, 2, 1, 1, -1, 2, 1, 2, 2, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 2, 3, 1, 1, 1, 2, 0, 1, 2, 3, 1, 2, 1, 2, 1, 1, 2, 2, 2, 1, 1, 0, 2, 1, 2, 2, 2, 1, 1, -1, 1, -1, 1, 3, 1, 1, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,6
LINKS
FORMULA
a(n) = A001222(n) - A001222(A285328(n)).
a(A005117(n)) = A001222(A005117(n)).
EXAMPLE
For n = 6 = 2*3, there is no smaller number with only the prime factors 2 and 3 as 6 is squarefree, thus A285328(6) = 1, and a(6) = A001222(6) = 2.
For n = 40 = 2^3 * 5^1, the next smaller number with the same prime factors is 20 = 2^2 * 5^1. While 40 has 3+1 = 4 prime factors in total, 20 has 2+1 = 3, thus a(40) = 4-3 = 1.
For n = 50 = 2^1 * 5^2, the next smaller number with the same prime factors is 40 = 2^3 * 5^1, thus a(50) = (1+2)-(3+1) = -1.
PROG
(PARI)
A007947(n) = factorback(factorint(n)[, 1]); \\ From A007947
A285328(n) = { my(r); if((n > 1 && !bitand(n, (n-1))), (n/2), r=A007947(n); if(r==n, 1, n = n-r; while(A007947(n) <> r, n = n-r); n)); };
A322818(n) = (bigomega(n)-bigomega(A285328(n)));
CROSSREFS
Sequence in context: A354999 A136177 A212178 * A362611 A353507 A362613
KEYWORD
sign
AUTHOR
Antti Karttunen, Dec 27 2018
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 15 21:53 EDT 2024. Contains 372549 sequences. (Running on oeis4.)