login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Number of times the largest prime power factor of n (A034699) is largest prime power factor for numbers <= n; a(1) = 1.
3

%I #16 Jan 03 2022 11:13:51

%S 1,1,1,1,1,2,1,1,1,2,1,2,1,2,3,1,1,2,1,4,3,2,1,2,1,2,1,4,1,5,1,1,3,2,

%T 5,3,1,2,3,3,1,6,1,4,4,2,1,2,1,2,3,4,1,2,5,4,3,2,1,6,1,2,5,1,5,6,1,4,

%U 3,7,1,6,1,2,3,4,7,6,1,3,1,2,1,8,5,2,3,8,1,7,7,4,3,2,5,2,1,2,9,4,1,6,1,8,9

%N Number of times the largest prime power factor of n (A034699) is largest prime power factor for numbers <= n; a(1) = 1.

%C Ordinal transform of A034699.

%H Antti Karttunen, <a href="/A303759/b303759.txt">Table of n, a(n) for n = 1..65537</a>

%p b:= proc() 0 end:

%p a:= proc(n) option remember; local t;

%p t:= max(1, seq(i[1]^i[2], i=ifactors(n)[2]));

%p b(t):= b(t)+1

%p end:

%p seq(a(n), n=1..120); # _Alois P. Heinz_, Apr 30 2018

%t f[n_] := Max[Power @@@ FactorInteger[n]];

%t b[_] = 0;

%t a[n_] := With[{t = f[n]}, b[t] = b[t]+1];

%t Array[a, 105] (* _Jean-François Alcover_, Jan 03 2022 *)

%o (PARI)

%o up_to = 65537;

%o ordinal_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), pt); for(i=1, length(invec), if(mapisdefined(om,invec[i]), pt = mapget(om, invec[i]), pt = 0); outvec[i] = (1+pt); mapput(om,invec[i],(1+pt))); outvec; };

%o A034699(n) = if(1==n,n,fordiv(n, d, if(isprimepower(n/d), return(n/d))));

%o v303759 = ordinal_transform(vector(up_to,n,A034699(n)));

%o A303759(n) = v303759[n];

%Y Cf. A000961 (positions of ones), A034699.

%Y Cf. also A078899, A284600, A302789.

%K nonn

%O 1,6

%A _Antti Karttunen_, Apr 30 2018