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!)
A078897 Number of times the greatest prime factor of n is a factor in all numbers <=n; a(1)=1. 4
1, 1, 1, 3, 1, 2, 1, 7, 4, 2, 1, 5, 1, 2, 3, 15, 1, 8, 1, 4, 3, 2, 1, 10, 6, 2, 13, 4, 1, 7, 1, 31, 3, 2, 5, 17, 1, 2, 3, 9, 1, 6, 1, 4, 10, 2, 1, 22, 8, 12, 3, 4, 1, 26, 5, 9, 3, 2, 1, 14, 1, 2, 10, 63, 5, 6, 1, 4, 3, 11, 1, 34, 1, 2, 18, 4, 7, 6, 1, 19, 40, 2, 1, 13, 5, 2, 3, 8, 1, 21, 7, 4, 3, 2, 5 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
For n>1: a(n) = 1 iff n is prime.
a(n) = A078896(n) iff n is a prime power (A000961).
LINKS
MAPLE
f:= proc(n) local p;
p:= max(numtheory:-factorset(n));
add(padic:-ordp(k, p), k=1..n);
end proc:
1, seq(f(n), n=2..1000); # Robert Israel, Dec 23 2014
MATHEMATICA
a[1] = 1; a[n_] := With[{p = FactorInteger[n][[-1, 1]]}, IntegerExponent[ Range[n], p] // Total]; Array[a, 100] (* Jean-François Alcover, Mar 09 2019 *)
PROG
(PARI) a(n) = if (n==1, 1, my(p = vecmax(factor(n)[, 1])); sum(i=1, n, valuation(i, p))); \\ Michel Marcus, Dec 23 2014, Mar 09 2019
CROSSREFS
Sequence in context: A229341 A372245 A106790 * A322034 A351436 A226629
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Dec 12 2002
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 20 15:51 EDT 2024. Contains 372717 sequences. (Running on oeis4.)