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!)
A297167 a(1) = 0, for n > 1, a(n) = -1 + the excess of n (A046660) + the index of the largest prime factor (A061395). 26
0, 0, 1, 1, 2, 1, 3, 2, 2, 2, 4, 2, 5, 3, 2, 3, 6, 2, 7, 3, 3, 4, 8, 3, 3, 5, 3, 4, 9, 2, 10, 4, 4, 6, 3, 3, 11, 7, 5, 4, 12, 3, 13, 5, 3, 8, 14, 4, 4, 3, 6, 6, 15, 3, 4, 5, 7, 9, 16, 3, 17, 10, 4, 5, 5, 4, 18, 7, 8, 3, 19, 4, 20, 11, 3, 8, 4, 5, 21, 5, 4, 12, 22, 4, 6, 13, 9, 6, 23, 3, 5, 9, 10, 14, 7, 5, 24, 4, 5, 4, 25, 6, 26, 7, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,5
LINKS
FORMULA
a(n) = A252464(n) - A001221(n).
For n > 1, a(n) = A033265(A156552(n)) = A297113(n) - 1.
For n > 1, a(n) = A046660(n) + A061395(n) - 1. - Antti Karttunen, Mar 13 2018
MATHEMATICA
Array[-1 + PrimeOmega@ # - PrimeNu@ # + PrimePi[FactorInteger[#][[-1, 1]]] /. k_ /; k < 0 -> 0 &, 105] (* or, slightly faster *)
Array[-1 + Length@ # - Length@ Union@ # + PrimePi@ Last@ # /. k_ /; k < 0 -> 0 &@ Flatten@ Map[ConstantArray[#1, #2] & @@ # &, #] &@ FactorInteger[#] &, 105] (* Michael De Vlieger, Mar 13 2018 *)
PROG
(PARI)
A061395(n) = if(1==n, 0, primepi(vecmax(factor(n)[, 1]))); \\ After M. F. Hasler's code for A006530.
A252464(n) = if(1==n, 0, (bigomega(n) + A061395(n) - 1));
A297167(n) = (A252464(n) - omega(n));
\\ Or just as:
A297167(n) = if(1==n, 0, (A061395(n) + (bigomega(n)-omega(n)) - 1));
\\ Antti Karttunen, Mar 13 2018
(Scheme) (define (A297167 n) (- (A252464 n) (A001221 n)))
(Python)
from sympy import factorint, primepi
def A297167(n): return primepi(max(f:=factorint(n)))+sum(e-1 for e in f.values())-1 if n>1 else 0 # Chai Wah Wu, Jul 29 2023
CROSSREFS
Sequence in context: A103151 A035221 A035191 * A325224 A303389 A276166
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 27 2018
EXTENSIONS
Name changed, original equivalent definition is the first entry in the Formula section - Antti Karttunen, Mar 13 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 June 3 03:48 EDT 2024. Contains 373054 sequences. (Running on oeis4.)