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.

Showing 1-10 of 18 results. Next

A305799 Dirichlet convolution of A078899 with itself.

Original entry on oeis.org

1, 2, 2, 5, 2, 6, 2, 10, 7, 6, 2, 16, 2, 6, 8, 18, 2, 20, 2, 16, 8, 6, 2, 34, 11, 6, 20, 16, 2, 26, 2, 30, 8, 6, 12, 50, 2, 6, 8, 36, 2, 26, 2, 16, 28, 6, 2, 66, 15, 32, 8, 16, 2, 56, 12, 38, 8, 6, 2, 68, 2, 6, 30, 47, 12, 26, 2, 16, 8, 38, 2, 104, 2, 6, 38, 16, 16, 26, 2, 74, 47, 6, 2, 70, 12, 6, 8, 38, 2, 88, 16, 16, 8, 6, 12, 118, 2, 42
Offset: 1

Views

Author

Antti Karttunen, Jun 13 2018

Keywords

Crossrefs

Programs

  • PARI
    up_to = 65537;
    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; };
    A006530(n) = if(n>1, vecmax(factor(n)[, 1]), 1);
    v078899 = ordinal_transform(vector(up_to,n,A006530(n)));
    A078899(n) = v078899[n];
    A305799(n) = sumdiv(n,d,A078899(d)*A078899(n/d));

Formula

a(n) = Sum_{d|n} A078899(d)*A078899(n/d).

A317834 Numerators of rational valued sequence whose Dirichlet convolution with itself yields A078899 (the ordinal transform of A006530, the largest prime factor of n).

Original entry on oeis.org

1, 1, 1, 7, 1, 3, 1, 17, 11, 3, 1, 19, 1, 3, 5, 139, 1, 23, 1, 19, 5, 3, 1, 39, 19, 3, 45, 19, 1, 13, 1, 263, 5, 3, 9, 77, 1, 3, 5, 55, 1, 13, 1, 19, 43, 3, 1, 387, 27, 47, 5, 19, 1, 59, 9, 71, 5, 3, 1, 43, 1, 3, 51, 995, 9, 13, 1, 19, 5, 25, 1, 87, 1, 3, 59, 19, 13, 13, 1, 707, 467, 3, 1, 59, 9, 3, 5, 71, 1, 53, 13, 19, 5, 3, 9, 1069, 1
Offset: 1

Views

Author

Antti Karttunen, Aug 12 2018

Keywords

Comments

The first negative term is a(216) = -97.

Crossrefs

Cf. A078899, A046644 (denominators).
Cf. also A305799, A317833, A317830.

Programs

  • Mathematica
    gpf[n_] := If[n == 1, 1, FactorInteger[n][[-1, 1]]];
    b[_] = 1;
    A078899[n_] := A078899[n] = With[{t = gpf[n]}, b[t]++];
    f[n_] := f[n] = If[n == 1, 1, (1/2)(A078899[n] -
         Sum[If[1Jean-François Alcover, Dec 19 2021 *)
  • PARI
    up_to = 16384;
    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; };
    A006530(n) = if(n>1, vecmax(factor(n)[, 1]), 1);
    v078899 = ordinal_transform(vector(up_to,n,A006530(n)));
    A078899(n) = v078899[n];
    A317834aux(n) = if(1==n,n,(A078899(n)-sumdiv(n,d,if((d>1)&&(dA317834aux(d)*A317834aux(n/d),0)))/2);
    A317834(n) = numerator(A317834aux(n));

Formula

a(n) = numerator of f(n), where f(1) = 1, f(n) = (1/2) * (A078899(n) - Sum_{d|n, d>1, d 1.

A305797 Dirichlet convolution of A078898 with A078899.

Original entry on oeis.org

1, 2, 2, 5, 2, 7, 2, 11, 6, 9, 2, 19, 2, 11, 8, 23, 2, 24, 2, 25, 9, 15, 2, 45, 8, 17, 17, 31, 2, 39, 2, 47, 11, 21, 10, 66, 2, 23, 12, 62, 2, 48, 2, 43, 27, 27, 2, 100, 10, 48, 14, 49, 2, 76, 11, 79, 15, 33, 2, 113, 2, 35, 32, 95, 12, 66, 2, 61, 17, 69, 2, 161, 2, 41, 37, 67, 12, 75, 2, 142, 44, 45, 2, 142, 13, 47, 20, 111, 2, 143, 13, 79, 21, 51, 14
Offset: 1

Views

Author

Antti Karttunen, Jun 13 2018

Keywords

Crossrefs

Programs

  • PARI
    up_to = 65537;
    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; };
    A006530(n) = if(n>1, vecmax(factor(n)[, 1]), 1);
    A020639(n) = if(n>1, if(n>n=factor(n, 0)[1, 1], n, factor(n)[1, 1]), 1); \\ From A020639
    v078898 = ordinal_transform(vector(up_to,n,A020639(n)));
    A078898(n) = v078898[n];
    v078899 = ordinal_transform(vector(up_to,n,A006530(n)));
    A078899(n) = v078899[n];
    A305797(n) = sumdiv(n,d,A078898(d)*A078899(n/d));

Formula

a(n) = Sum_{d|n} A078898(d)*A078899(n/d).

A319694 Product of A078899(x) for all x encountered when map x -> A252463(x) is iterated, starting from x = A252463(n); a(1) = 1.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 2, 6, 1, 6, 1, 2, 2, 1, 1, 8, 6, 1, 6, 2, 1, 6, 1, 24, 2, 1, 6, 30, 1, 1, 2, 8, 1, 6, 1, 2, 8, 1, 1, 48, 30, 30, 2, 2, 1, 42, 6, 8, 2, 1, 1, 36, 1, 1, 8, 120, 6, 6, 1, 2, 2, 30, 1, 240, 1, 1, 30, 2, 30, 6, 1, 56, 24, 1, 1, 36, 6, 1, 2, 8, 1, 64, 30, 2, 2, 1, 6, 432, 1, 210, 8, 270, 1, 6, 1, 8, 36
Offset: 1

Views

Author

Antti Karttunen, Nov 21 2018

Keywords

Crossrefs

Cf. also A319689.

Programs

  • PARI
    up_to = 16384;
    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; };
    A006530(n) = if(n>1, vecmax(factor(n)[, 1]), 1);
    v078899 = ordinal_transform(vector(up_to,n,A006530(n)));
    A078899(n) = v078899[n];
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A252463(n) = if(!(n%2),n/2,A064989(n));
    A319694(n) = { my(m=1); while(1<(n=A252463(n)), m *= A078899(n)); (m); };

A300246 Filter sequence combining A046523(n) and A078899(n), the prime signature of n and the number of times the greatest prime factor of n is the greatest prime factor for numbers <= n.

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 2, 5, 6, 4, 2, 7, 2, 4, 8, 9, 2, 10, 2, 7, 8, 4, 2, 11, 12, 4, 13, 7, 2, 14, 2, 15, 8, 4, 16, 17, 2, 4, 8, 18, 2, 14, 2, 7, 19, 4, 2, 20, 21, 22, 8, 7, 2, 23, 16, 24, 8, 4, 2, 25, 2, 4, 22, 26, 16, 14, 2, 7, 8, 27, 2, 28, 2, 4, 29, 7, 30, 14, 2, 31, 32, 4, 2, 33, 16, 4, 8, 24, 2, 34, 30, 7, 8, 4, 16, 35, 2, 36, 22, 37, 2, 14, 2, 24, 38
Offset: 1

Views

Author

Antti Karttunen, Mar 09 2018

Keywords

Comments

Restricted growth sequence transform of P(A046523(n), A078899(n)), where P(a,b) is a two-argument form of A000027 used as a Cantor pairing function N x N -> N.

Examples

			a(30) = a(42) (= 14) because A078899(30) = A078899(42) = 6 and both numbers are products of three distinct primes, thus have the same prime signature.
a(35) = a(55) = a(65) (= 16) because A078899(35) = A078899(55) = A078899(65) = 5 and because all three are nonsquare semiprimes.
		

Crossrefs

Cf. also A300247, A300248.
Differs from A300226 for the first time at n=40, where a(40) = 18.

Programs

  • PARI
    up_to = 65537;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
    A006530(n) = if(1==n, n, vecmax(factor(n)[, 1]));
    A078899(n) = { if(n<=1,n, my(gpf=A006530(n),k=1,m=n/gpf); while(m>1,if(A006530(m)<=gpf,k++); m--); (k)); };
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
    Aux300246(n) = if(1==n,0,(1/2)*(2 + ((A078899(n)+A046523(n))^2) - A078899(n) - 3*A046523(n)));
    write_to_bfile(1,rgs_transform(vector(up_to,n,Aux300246(n))),"b300246.txt");

A078898 Number of times the smallest prime factor of n is the smallest prime factor for numbers <= n; a(0)=0, a(1)=1.

Original entry on oeis.org

0, 1, 1, 1, 2, 1, 3, 1, 4, 2, 5, 1, 6, 1, 7, 3, 8, 1, 9, 1, 10, 4, 11, 1, 12, 2, 13, 5, 14, 1, 15, 1, 16, 6, 17, 3, 18, 1, 19, 7, 20, 1, 21, 1, 22, 8, 23, 1, 24, 2, 25, 9, 26, 1, 27, 4, 28, 10, 29, 1, 30, 1, 31, 11, 32, 5, 33, 1, 34, 12, 35, 1, 36, 1, 37, 13, 38, 3, 39, 1, 40, 14, 41, 1, 42, 6, 43
Offset: 0

Views

Author

Reinhard Zumkeller, Dec 12 2002

Keywords

Comments

From Antti Karttunen, Dec 06 2014: (Start)
For n >= 2, a(n) tells in which column of the sieve of Eratosthenes (see A083140, A083221) n occurs in. A055396 gives the corresponding row index.
(End)

Crossrefs

Programs

  • Haskell
    import Data.IntMap (empty, findWithDefault, insert)
    a078898 n = a078898_list !! n
    a078898_list = 0 : 1 : f empty 2 where
       f m x = y : f (insert p y m) (x + 1) where
               y = findWithDefault 0 p m + 1
               p = a020639 x
    -- Reinhard Zumkeller, Apr 06 2015
  • Maple
    N:= 1000: # to get a(0) to a(N)
    Primes:= select(isprime, [2,seq(2*i+1,i=1..floor((N-1)/2))]):
    A:= Vector(N):
    for p in Primes do
      t:= 1:
      A[p]:= 1:
      for n from p^2 to N by p do
        if A[n] = 0 then
           t:= t+1:
           A[n]:= t
        fi
      od
    od:
    0,1,seq(A[i],i=2..N); # Robert Israel, Jan 04 2015
  • Mathematica
    Module[{nn=90,spfs},spfs=Table[FactorInteger[n][[1,1]],{n,nn}];Table[ Count[ Take[spfs,i],spfs[[i]]],{i,nn}]] (* Harvey P. Dale, Sep 01 2014 *)
  • PARI
    \\ Not practical for computing, but demonstrates the sum moebius formula:
    A020639(n) = { if(1==n,n,vecmin(factor(n)[, 1])); };
    A055396(n) = { if(1==n,0,primepi(A020639(n))); };
    A002110(n) = prod(i=1, n, prime(i));
    A078898(n) = { my(k,p); if(1==n, n, k = A002110(A055396(n)-1); p = A020639(n); sumdiv(k, d, moebius(d)*(n\(p*d)))); };
    \\ Antti Karttunen, Dec 05 2014
    
  • Scheme
    ;; With memoizing definec-macro.
    (definec (A078898 n) (if (< n 2) n (+ 1 (A078898 (A249744 n)))))
    ;; Much better for computing. Needs also code from A249738 and A249744. - Antti Karttunen, Dec 06 2014
    

Formula

Ordinal transform of A020639 (Lpf). - Franklin T. Adams-Watters, Aug 28 2006
From Antti Karttunen, Dec 05-08 2014: (Start)
a(0) = 0, a(1) = 1, a(n) = 1 + a(A249744(n)).
a(0) = 0, a(1) = 1, a(n) = sum_{d | A002110(A055396(n)-1)} moebius(d) * floor(n / (A020639(n)*d)).
a(0) = 0, a(1) = 1, a(n) = sum_{d | A002110(A055396(n)-1)} moebius(d) * floor(A032742(n) / d).
[Instead of Moebius mu (A008683) one could use Liouville's lambda (A008836) in the above formulas, because all primorials (A002110) are squarefree. A020639(n) gives the smallest prime dividing n, and A055396 gives its index].
a(0) = 0, a(1) = 1, a(2n) = n, a(2n+1) = a(A250470(2n+1)). [After a similar recursive formula for A246277. However, this cannot be used for computing the sequence, unless a definition for A250470(n) is found which doesn't require computing the value of A078898(n).]
For n > 1: a(n) = A249810(n) - A249820(n).
(End)
Other identities:
a(2*n) = n.
For n > 1: a(n)=1 if and only if n is prime.
For n > 1: a(n) = A249808(n, A055396(n)) = A249809(n, A055396(n)).
For n > 1: a(n) = A246277(A249818(n)).
From Antti Karttunen, Jan 04 2015: (Start)
a(n) = 2 if and only if n is a square of a prime.
For all n >= 1: a(A251728(n)) = A243055(A251728(n)) + 2. That is, if n is a semiprime of the form prime(i)*prime(j), prime(i) <= prime(j) < prime(i)^2, then a(n) = (j-i)+2.
(End)
a(A000040(n)^2) = 2; a(A000040(n)*A000040(n+1)) = 3. - Reinhard Zumkeller, Apr 06 2015
Sum_{k=1..n} a(k) ~ c * n^2 / 2, where c = Sum_{k>=1} (A038110(k)/A038111(k))^2 = 0.2847976823663... . - Amiram Eldar, Oct 26 2024

Extensions

a(0) = 0 prepended for recurrence's sake by Antti Karttunen, Dec 06 2014

A046644 From square root of Riemann zeta function: form Dirichlet series Sum b_n/n^s whose square is zeta function; sequence gives denominator of b_n.

Original entry on oeis.org

1, 2, 2, 8, 2, 4, 2, 16, 8, 4, 2, 16, 2, 4, 4, 128, 2, 16, 2, 16, 4, 4, 2, 32, 8, 4, 16, 16, 2, 8, 2, 256, 4, 4, 4, 64, 2, 4, 4, 32, 2, 8, 2, 16, 16, 4, 2, 256, 8, 16, 4, 16, 2, 32, 4, 32, 4, 4, 2, 32, 2, 4, 16, 1024, 4, 8, 2, 16, 4, 8, 2, 128, 2, 4, 16, 16, 4, 8
Offset: 1

Views

Author

Keywords

Comments

From Antti Karttunen, Aug 21 2018: (Start)
a(n) is the denominator of any rational-valued sequence f(n) which has been defined as f(n) = (1/2) * (b(n) - Sum_{d|n, d>1, d
Proof:
Proof is by induction. We assume as our induction hypothesis that the given multiplicative formula for A046644 (resp. additive formula for A046645) holds for all proper divisors d|n, dA046645(p) = 1. [Remark: for squares of primes, f(p^2) = (4*b(p^2) - 1)/8, thus a(p^2) = 8.]
First we note that A005187(x+y) <= A005187(x) + A005187(y), with equivalence attained only when A004198(x,y) = 0, that is, when x and y do not have any 1-bits in the shared positions. Let m = Sum_{e} A005187(e), with e ranging over the exponents in prime factorization of n.
For [case A] any n in A268388 it happens that only when d (and thus also n/d) are infinitary divisors of n will Sum_{e} A005187(e) [where e now ranges over the union of multisets of exponents in the prime factorizations of d and n/d] attain value m, which is the maximum possible for such sums computed for all divisor pairs d and n/d. For any n in A268388, A037445(n) = 2^k, k >= 2, thus A037445(n) - 2 = 2 mod 4 (excluding 1 and n from the count, thus -2). Thus, in the recursive formula above, the maximal denominator that occurs in the sum is 2^m which occurs k times, with k being an even number, but not a multiple of 4, thus the factor (1/2) in the front of the whole sum will ensure that the denominator of the whole expression is 2^m [which thus is equal to 2^A046645(n) = a(n)].
On the other hand [case B], for squares in A050376 (A082522, numbers of the form p^(2^k) with p prime and k>0), all the sums A005187(x)+A005187(y), where x+y = 2^k, 0 < x <= y < 2^k are less than A005187(2^k), thus it is the lonely "middle pair" f(p^(2^(k-1))) * f(p^(2^(k-1))) among all the pairs f(d)*f(n/d), 1 < d < n = p^(2^k) which yields the maximal denominator. Furthermore, as it occurs an odd number of times (only once), the common factor (1/2) for the whole sum will increase the exponent of 2 in denominator by one, which will be (2*A005187(2^(k-1))) + 1 = A005187(2^k) = A046645(p^(2^k)).
(End)
From Antti Karttunen, Aug 21 2018: (Start)
The following list gives a few such pairs num(n), b(n) for which b(n) is Dirichlet convolution of num(n)/a(n). Here ε stands for sequence A063524 (1, 0, 0, ...).
Numerators Dirichlet convolution of numerator(n)/a(n) yields
------- -----------
(End)
This sequence gives an upper bound for the denominators of any rational-valued sequence obtained as the "Dirichlet Square Root" of any integer-valued sequence. - Andrew Howroyd, Aug 23 2018

Crossrefs

See A046643 for more details. See also A046645, A317940.
Cf. A299150, A299152, A317832, A317926, A317932, A317934 (for denominator sequences of other similar constructions).

Programs

Formula

From Antti Karttunen, Jul 08 2017: (Start)
Multiplicative with a(p^n) = 2^A005187(n).
a(1) = 1; for n > 1, a(n) = A000079(A005187(A067029(n))) * a(A028234(n)).
a(n) = A000079(A046645(n)).
(End)
Sum_{j=1..n} A046643(j)/A046644(j) ~ n / sqrt(Pi*log(n)) * (1 + (1 - gamma/2)/(2*log(n))), where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, May 04 2025

A302789 Number of times the largest Fermi-Dirac factor of n is the largest Fermi-Dirac factor for numbers <= n; a(1) = 1.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 3, 1, 2, 3, 1, 1, 2, 1, 4, 3, 2, 1, 4, 1, 2, 3, 4, 1, 5, 1, 2, 3, 2, 5, 4, 1, 2, 3, 6, 1, 6, 1, 4, 5, 2, 1, 3, 1, 2, 3, 4, 1, 6, 5, 7, 3, 2, 1, 7, 1, 2, 7, 4, 5, 6, 1, 4, 3, 8, 1, 8, 1, 2, 3, 4, 7, 6, 1, 5, 1, 2, 1, 9, 5, 2, 3, 8, 1, 9, 7, 4, 3, 2, 5, 6, 1, 2, 9, 4, 1, 6, 1, 8, 10
Offset: 1

Author

Antti Karttunen, Apr 13 2018

Keywords

Comments

Ordinal transform of A223491, or equally, of A302785.

Crossrefs

Cf. A084400 (gives the positions of 1's).
Cf. also A078899.

Programs

  • Mathematica
    f[n_] := Max@Table[{p, e} = pe; p^(2^(Length[IntegerDigits[e, 2]]-1)), {pe, FactorInteger[n]}];
    b[_] = 1;
    a[n_] := a[n] = With[{t = f[n]}, b[t]++];
    Array[a, 105] (* Jean-François Alcover, Dec 18 2021 *)
  • PARI
    up_to = 65537;
    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; };
    ispow2(n) = (n && !bitand(n, n-1));
    A223491(n) = if(1==n,n,fordiv(n, d, if(ispow2(isprimepower(n/d)), return(n/d))));
    v302789 = ordinal_transform(vector(up_to,n,A223491(n)));
    A302789(n) = v302789[n];

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

Original entry on oeis.org

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
Offset: 1

Author

Reinhard Zumkeller, Dec 12 2002

Keywords

Comments

For n>1: a(n) = 1 iff n is prime.
a(n) = A078896(n) iff n is a prime power (A000961).

Crossrefs

Programs

  • 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 *)
  • 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

A385652 Maximum frequency of gpf(k) for 2 <= k <= n, where gpf(k) = A006530(k) is the greatest prime factor of k.

Original entry on oeis.org

1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 12
Offset: 2

Author

Pontus von Brömssen, Jul 06 2025

Keywords

Comments

The prime p is popular on the interval [2,n] if it is the greatest prime factor of a(n) numbers in that interval; see A385503.

Examples

			     |     | cumulative frequencies for gpf's |
   n | gpf |    2  3  5  7 11 13 17 19 23     | a(n)
  ---+-----+----------------------------------+-----
   2 |   2 |    1  0  0  0  0  0  0  0  0     |  1
   3 |   3 |    1  1  0  0  0  0  0  0  0     |  1
   4 |   2 |    2  1  0  0  0  0  0  0  0     |  2
   5 |   5 |    2  1  1  0  0  0  0  0  0     |  2
   6 |   3 |    2  2  1  0  0  0  0  0  0     |  2
   7 |   7 |    2  2  1  1  0  0  0  0  0     |  2
   8 |   2 |    3  2  1  1  0  0  0  0  0     |  3
   9 |   3 |    3  3  1  1  0  0  0  0  0     |  3
  10 |   5 |    3  3  2  1  0  0  0  0  0     |  3
  11 |  11 |    3  3  2  1  1  0  0  0  0     |  3
  12 |   3 |    3  4  2  1  1  0  0  0  0     |  4
  13 |  13 |    3  4  2  1  1  1  0  0  0     |  4
  14 |   7 |    3  4  2  2  1  1  0  0  0     |  4
  15 |   5 |    3  4  3  2  1  1  0  0  0     |  4
  16 |   2 |    4  4  3  2  1  1  0  0  0     |  4
  17 |  17 |    4  4  3  2  1  1  1  0  0     |  4
  18 |   3 |    4  5  3  2  1  1  1  0  0     |  5
  19 |  19 |    4  5  3  2  1  1  1  1  0     |  5
  20 |   5 |    4  5  4  2  1  1  1  1  0     |  5
  21 |   7 |    4  5  4  3  1  1  1  1  0     |  5
  22 |  11 |    4  5  4  3  2  1  1  1  0     |  5
  23 |  23 |    4  5  4  3  2  1  1  1  1     |  5
  24 |   3 |    4  6  4  3  2  1  1  1  1     |  6
		

Crossrefs

Programs

  • PARI
    gpf(n) = if (n==1,1, vecmax(factor(n)[,1])); \\ A006530
    a(n) = my(v=vector(n, k, gpf(k)), s=Set(v)); vecmax(apply(x->#x, vector(#s, i, select(x->(x==s[i]), v)))); \\ Michel Marcus, Jul 06 2025
  • Python
    from collections import Counter
    from itertools import count
    from sympy import factorint
    def A385652_generator():
        c = Counter()
        M = 0
        for n in count(2):
            gpf = max(factorint(n))
            c[gpf] += 1
            if c[gpf] > M: M += 1
            yield M
    

Formula

a(n) = max_{k=2..n} A078899(k).
Showing 1-10 of 18 results. Next