cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A078897 Number of times the greatest prime factor of n is a factor in all numbers <=n; a(1)=1.

This page as a plain text file.
%I A078897 #25 Mar 09 2019 07:23:03
%S A078897 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,
%T A078897 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,
%U A078897 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
%N A078897 Number of times the greatest prime factor of n is a factor in all numbers <=n; a(1)=1.
%C A078897 For n>1: a(n) = 1 iff n is prime.
%C A078897 a(n) = A078896(n) iff n is a prime power (A000961).
%H A078897 Michel Lagneau, <a href="/A078897/b078897.txt">Table of n, a(n) for n = 1..10000</a>
%p A078897 f:= proc(n) local p;
%p A078897   p:= max(numtheory:-factorset(n));
%p A078897   add(padic:-ordp(k,p),k=1..n);
%p A078897 end proc:
%p A078897 1, seq(f(n), n=2..1000); # _Robert Israel_, Dec 23 2014
%t A078897 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 *)
%o A078897 (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
%Y A078897 Cf. A006530, A078896, A078899.
%K A078897 nonn
%O A078897 1,4
%A A078897 _Reinhard Zumkeller_, Dec 12 2002