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.

Previous Showing 11-20 of 386 results. Next

A275811 Number of nonzero digits on a maximally occupied slope of factorial base representation of n: a(n) = A051903(A275734(n)). See comments for the definition.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 2, 1, 2, 2, 3, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 2, 1, 2, 2, 3, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 1, 2, 1, 2, 1, 2, 2, 3, 1, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 2, 2, 2, 3, 3, 2, 2, 1, 2, 2, 2, 2, 3, 1, 2, 1, 2, 2, 3, 1, 2, 1, 2, 2, 3, 1, 2, 2, 2, 2, 3, 2, 3, 2, 3, 3, 4, 1
Offset: 0

Views

Author

Antti Karttunen, Aug 10 2016

Keywords

Comments

Digit slopes are called "maximal", "sub-maximal", "sub-sub-maximal", etc. For digit-positions we employ one-based indexing, thus we say that the least significant digit of factorial base expansion of n is in position 1, etc. The maximal digit slope is occupied when there is at least one digit-position k that contains digit k (maximal digit allowed in that position), so that A260736(n) > 0, and n is thus a term of A273670. The sub-maximal digit slope is occupied when there is at least one nonzero digit k in a digit-position k+1. The sub-sub-maximal slope is occupied when there is at least one nonzero digit k in a digit-position k+2, etc. This sequence gives the number of nonzero digits on a slope (of possibly several) for which there exists no other slopes with more nonzero digits. See the examples.
In other words: a(n) gives the number of occurrences of a most common element in the multiset [(i_x - d_x) | where d_x ranges over each nonzero digit present in factorial base representation of n and i_x is that digit's position from the right].
Involution A225901 maps this metric to another metric A264990 which gives the maximal number of equal nonzero digits occurring in factorial base representation (A007623) of n. See also A060502.

Examples

			For n=23 ("321" in factorial base representation, A007623), all three nonzero digits are maximal for their positions (they all occur on "maximal slope"), thus the "maximal slope" is also the "maximally occupied slope" (as there are no other occupied slopes present), and a(23) = 3.
For n=29 ("1021"), there are three nonzero digits, where both 2 and the rightmost 1 are on the "maximal slope", while the most significant 1 is on the "sub-sub-sub-maximal", thus here the "maximal slope" is also the "maximally occupied slope" (with 2 nonzero digits present), and a(29) = 2.
For n=37 ("1201"), there are three nonzero digits, where the rightmost 1 is on the maximal slope, 2 is on the sub-maximal, and the most significant 1 is on the "sub-sub-sub-maximal", thus there are three occupied slopes in total, all with just one nonzero digit present, and a(37) = 1.
For n=55 ("2101"), the least significant 1 is on the maximal slope, and the digits "21" at the beginning are together on the sub-sub-maximal slope (as they are both two less than the maximal digit values 4 and 3 allowed in those positions), thus here the sub-sub-maximal slope is the "maximally occupied slope" with its two occupiers, and a(55) = 2.
		

Crossrefs

Cf. A275804 (gives the indices of 0 and 1's), A275805 (gives the indices of terms > 1).

Programs

  • Python
    from sympy import prime, factorint
    from operator import mul
    from functools import reduce
    from sympy import factorial as f
    def a051903(n): return 0 if n==1 else max(factorint(n).values())
    def a007623(n, p=2): return n if n

    0 else '0' for i in x])[::-1] return 0 if n==1 else sum([int(y[i])*f(i + 1) for i in range(len(y))]) def a275734(n): return 1 if n==0 else a275732(n)*a275734(a257684(n)) def a(n): return 0 if n==0 else a051903(a275734(n)) print([a(n) for n in range(201)]) # Indranil Ghosh, Jun 20 2017

Formula

a(n) = A051903(A275734(n)).
a(n) = A264990(A225901(n)).

Extensions

Signs in comment corrected and clarification added by Antti Karttunen, Aug 16 2016

A328311 a(n) = 1 + A051903(A003415(n)) - A051903(n), a(1) = 0 by convention.

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 3, 0, 2, 3, 2, 0, 0, 0, 2, 1, 1, 0, 0, 0, 1, 1, 4, 0, 1, 0, 0, 1, 1, 2, 1, 0, 1, 4, 0, 0, 1, 0, 3, 0, 2, 0, 1, 0, 1, 2, 2, 0, 2, 4, 0, 1, 1, 0, 1, 0, 1, 0, 1, 2, 1, 0, 2, 1, 1, 0, 0, 0, 1, 0, 3, 2, 1, 0, 1, 0, 1, 0, 1, 1, 2, 5, 0, 0, 0, 2, 4, 1, 2, 3, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1
Offset: 1

Views

Author

Antti Karttunen, Oct 13 2019

Keywords

Comments

All terms are nonnegative because taking the arithmetic derivative (A003415) of n may decrease its "degree" (i.e., its maximal exponent, A051903) by at most one, and in many cases may also increase it, or keep it same.

Crossrefs

One more than A328310.
Cf. A328320 (indices of zeros), A328321 (of nonzero terms).

Programs

Formula

a(1) = 0, for n > 1, a(n) = 1 + A051903(A003415(n)) - A051903(n).
For n > 1, a(n) = 1 + A328310(n).

A336064 Numbers divisible by the maximal exponent in their prime factorization (A051903).

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 46, 47, 48, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 76, 77, 78, 79
Offset: 1

Views

Author

Amiram Eldar, Jul 07 2020

Keywords

Comments

The asymptotic density of this sequence is A336065 = 0.848957... (Schinzel and Šalát, 1994).

Examples

			4 = 2^2 is a term since A051903(4) = 2 is a divisor of 4.
		

References

  • József Sándor and Borislav Crstici, Handbook of Number theory II, Kluwer Academic Publishers, 2004, chapter 3, p. 331.

Crossrefs

A005117 (except for 1) is subsequence.

Programs

  • Mathematica
    H[1] = 0; H[n_] := Max[FactorInteger[n][[;; , 2]]]; Select[Range[2, 100], Divisible[#, H[#]] &]
  • PARI
    isok(m) = if (m>1, (m % vecmax(factor(m)[,2])) == 0); \\ Michel Marcus, Jul 08 2020

A351075 Numbers k such that the maximal exponent in the prime factorization of A327860(k) is less than A051903(k), the maximal exponent in the prime factorization of k.

Original entry on oeis.org

2, 4, 6, 9, 12, 30, 32, 40, 48, 60, 63, 64, 68, 75, 76, 81, 96, 104, 108, 112, 128, 160, 192, 210, 212, 220, 224, 225, 240, 242, 243, 245, 248, 250, 256, 270, 272, 275, 276, 279, 280, 284, 288, 304, 312, 320, 324, 336, 352, 384, 420, 423, 424, 425, 428, 436, 448, 456, 459, 464, 472, 480, 484, 486, 488, 490, 492, 495, 496
Offset: 1

Views

Author

Antti Karttunen, Feb 01 2022

Keywords

Comments

Numbers k for which A328391(k) < A051903(k).

Crossrefs

Cf. A003415, A276086, A051903, A327860, A328391, A351076 (complement), A351077 (and its characteristic function).
Positions of negative terms in A351074.
Subsequence of A351038.
Cf. also A350075.

Programs

  • PARI
    A051903(n) = if((1==n),0,vecmax(factor(n)[, 2]));
    A327860(n) = { my(s=0, m=1, p=2, e); while(n, e = (n%p); m *= (p^e); s += (e/p); n = n\p; p = nextprime(1+p)); (s*m); };
    isA351075(n) = (A051903(A327860(n)) < A051903(n));

A188654 Numbers k such that the maximum exponent in its prime factorization does not equal the number of positive exponents (A051903(k) <> A001221(k)).

Original entry on oeis.org

4, 6, 8, 9, 10, 14, 15, 16, 21, 22, 24, 25, 26, 27, 30, 32, 33, 34, 35, 38, 39, 40, 42, 46, 48, 49, 51, 54, 55, 56, 57, 58, 60, 62, 64, 65, 66, 69, 70, 72, 74, 77, 78, 80, 81, 82, 84, 85, 86, 87, 88, 90, 91, 93, 94, 95, 96, 102, 104, 105, 106, 108, 110, 111
Offset: 1

Views

Author

Reinhard Zumkeller, May 03 2013

Keywords

Crossrefs

Cf. A001221, A212166 (complement), A225230.
Union of A212164 and A212168.

Programs

  • Haskell
    import Data.List (findIndices)
    a188654 n = a188654_list !! (n-1)
    a188654_list = map (+ 1) $ findIndices (/= 0) a225230_list
    
  • Mathematica
    q[n_] := Module[{e = FactorInteger[n][[;;, 2]]}, Max[e] != Length[e]]; q[1] = False; Select[Range[120], q] (* Amiram Eldar, Sep 08 2024 *)
  • PARI
    is(k) = {my(e = factor(k)[, 2]); #e && vecmax(e) != #e;} \\ Amiram Eldar, Sep 08 2024

Formula

A051903(n) <> A001221(n);
A225230(a(n)) <> 0.

A384655 a(n) = Sum_{k=1..n} A051903(gcd(n,k)).

Original entry on oeis.org

0, 1, 1, 3, 1, 4, 1, 7, 4, 6, 1, 11, 1, 8, 7, 15, 1, 14, 1, 17, 9, 12, 1, 25, 6, 14, 13, 23, 1, 22, 1, 31, 13, 18, 11, 36, 1, 20, 15, 39, 1, 30, 1, 35, 26, 24, 1, 53, 8, 32, 19, 41, 1, 44, 15, 53, 21, 30, 1, 59, 1, 32, 34, 63, 17, 46, 1, 53, 25, 46, 1, 81, 1, 38
Offset: 1

Views

Author

Amiram Eldar, Jun 06 2025

Keywords

Comments

The terms of this sequence can be calculated efficiently using the 1st formula. The value the of function f(n, k) is equal to the number of integers i from 1 to n such that gcd(i, n) is 1 if k = 1, or k-free if k >= 2 (k-free numbers are numbers that are not divisible by a k-th power other than 1). E.g., f(n, 1) = A000010(n), f(n, 2) = A063659(n), and f(n, 3) = A254926(n).

Examples

			a(4) = A051903(gcd(4,1)) + A051903(gcd(4,2)) + A051903(gcd(4,3)) + A051903(gcd(4,4)) = A051903(1) + A051903(2) + A051903(1) + A051903(4) = 0 + 1 + 0 + 2 = 3.
		

Crossrefs

Programs

  • Mathematica
    e[n_] := If[n == 1, 0, Max[FactorInteger[n][[;;, 2]]]]; a[n_] := Sum[e[GCD[n, k]], {k, 1, n}]; Array[a, 100]
    (* or *)
    f[p_, e_, k_] := p^e - If[e < k, 0, p^(e - k)]; a[n_] := Module[{fct = FactorInteger[n], emax, s}, emax = Max[fct[[;; , 2]]]; s = emax * n; Do[s -= Times @@ (f[#1, #2, k] & @@@ fct), {k, 1, emax}]; s]; a[1] = 0; Array[a, 100]
  • PARI
    e(n) = if(n == 1, 0, vecmax(factor(n)[,2]));
    a(n) = sum(k = 1, n, e(gcd(n, k)));
    
  • PARI
    a(n) = if(n == 1, 0, my(f = factor(n), p = f[,1], e = f[,2], emax = vecmax(e), s = emax*n); for(k = 1, emax, s -= prod(i = 1, #p, p[i]^e[i] - if(e[i] < k, 0, p[i]^(e[i]-k)))); s);

Formula

a(n) = Sum_{k=1..A051903(n)} (n - f(n, k)) = A051903(n) * n - Sum_{k=1..A051903(n)} f(n, k), where f(n, k) is multiplicative for a given k, with f(p^e, k) = p^e - p^(e-k) if e >= k and f(p^e, k) = p^e if e < k.
a(n) = 1 if and only if n is prime.
a(n) >= 2 if and only if n is composite.
a(n) >= A051953(n) with equality if and only if n is squarefree.
a(n) >= 2*n - A000010(n) - A063659(n) with equality if and only if n is cubefree that is not squarefree (i.e., n in A067259, or equivalently, A051903(n) = 2).
a(p^e) = (p^e-1)/(p-1) for a prime p and e >= 1.
a(n) < c*n and lim sun_{n->oo} a(n)/n = c, where c is Niven's constant (A033150).
Sum_{k=1..n} a(k) ~ c * n^2 / 2, where c = Sum{k>=1} (1-1/zeta(2*k)) = 0.49056393035179738598... .

A351946 a(n) = A051903(A181819(n)).

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 2, 2, 2, 2, 1, 2, 2, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1, 1, 2, 3, 1, 1, 2, 3, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 1, 2, 1, 2, 2, 2, 2, 1, 1, 2, 2, 1, 2, 2, 2, 1, 1, 1, 1, 2, 1, 3, 1, 1, 3
Offset: 1

Views

Author

Antti Karttunen, Apr 03 2022

Keywords

Crossrefs

Differs from A327500 for the first time at n=450, where a(450) = 2, while A327500(450) = 3. See A351947 for all such positions.

Programs

  • Mathematica
    {0}~Join~Array[Max[FactorInteger[#][[All, -1]]] &@ Apply[Times, Prime[FactorInteger[#][[All, -1]]]] &, 104, 2] (* Michael De Vlieger, Apr 03 2022 *)
  • PARI
    A051903(n) = if((1==n),0,vecmax(factor(n)[, 2]));
    A181819(n) = factorback(apply(e->prime(e),(factor(n)[,2])));
    A351946(n) = A051903(A181819(n));

Formula

a(n) = A051903(A181819(n)).

A369647 Nonzero numbers k in A341518 for which A051903(k) attains novel values.

Original entry on oeis.org

1, 2, 9, 16, 108, 9024, 2990880, 995336192, 1805726080
Offset: 1

Views

Author

Antti Karttunen, Feb 02 2024

Keywords

Comments

Indices of record values of A051903 attained for the terms of A341518 is a subsequence: 1, 2, 9, 16, 9024, 995336192.

Examples

			           k   factorization           max.exp         k'    A049345(k')
           1                              0,           0,            0
           2 = 2^1,                       1,           1,            1
           9 = 3^2,                       2,           6,          100
          16 = 2^4,                       4,          32,         1010
         108 = 2^2 * 3^3,                 3,         216,        10100
        9024 = 2^6 * 3 * 47,              6,       30272,      1011010
     2990880 = 2^5 * 3^2 * 5 * 31 * 67,   5,    10210416,    110010100
   995336192 = 2^13 * 121501,            13,  6469693440,  10000010000
  1805726080 = 2^7 * 5 * 157 * 17971,     7,  6692788416,  11000100100.
See also the examples at A351073 and A369649.
		

Crossrefs

Programs

  • PARI
    A003415(n) = if(n<=1, 0, my(f=factor(n)); n*sum(i=1, #f~, f[i, 2]/f[i, 1]));
    A051903(n) = if((1==n),0,vecmax(factor(n)[, 2]));
    ismaxprimobasedigit_at_most(n,k) = { my(s=0, p=2); while(n, if((n%p)>k, return(0)); n = n\p; p = nextprime(1+p)); (1); };
    isA341518(n) = ismaxprimobasedigit_at_most(A003415(n),1);
    m=Map(); for(n=1,2990880,if(isA341518(n),e=A051903(n);if(!mapisdefined(m,e),mapput(m,e,n);print1(n,", "))));

A381543 Numbers > 1 whose greatest prime index (A061395), number of distinct prime factors (A001221), and greatest prime multiplicity (A051903) are all equal.

Original entry on oeis.org

2, 12, 18, 36, 120, 270, 360, 540, 600, 750, 1080, 1350, 1500, 1680, 1800, 2250, 2700, 3000, 4500, 5040, 5400, 5670, 6750, 8400, 9000, 11340, 11760, 13500, 15120, 22680, 25200, 26250, 27000, 28350, 35280, 36960, 39690, 42000, 45360, 52500, 56700, 58800, 72030
Offset: 1

Views

Author

Gus Wiseman, Mar 24 2025

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798, sum A056239.

Examples

			The terms together with their prime indices begin:
      2: {1}
     12: {1,1,2}
     18: {1,2,2}
     36: {1,1,2,2}
    120: {1,1,1,2,3}
    270: {1,2,2,2,3}
    360: {1,1,1,2,2,3}
    540: {1,1,2,2,2,3}
    600: {1,1,1,2,3,3}
    750: {1,2,3,3,3}
   1080: {1,1,1,2,2,2,3}
   1350: {1,2,2,2,3,3}
   1500: {1,1,2,3,3,3}
   1680: {1,1,1,1,2,3,4}
   1800: {1,1,1,2,2,3,3}
		

Crossrefs

Counting partitions by the LHS gives A008284, rank statistic A061395.
Without the RHS we have A055932, counted by A000009.
Counting partitions by the RHS gives A091602, rank statistic A051903.
Counting partitions by the middle statistic gives A116608/A365676, rank stat A001221.
Without the LHS we have A212166, counted by A239964.
Without the middle statistic we have A381542, counted by A240312.
Partitions of this type are counted by A382302.
A000040 lists the primes, differences A001223.
A001222 counts prime factors, distinct A001221.
A047993 counts balanced partitions, ranks A106529.
A051903 gives greatest prime exponent, least A051904.
A055396 gives least prime index, greatest A061395.
A056239 adds up prime indices, row sums of A112798.
A122111 represents partition conjugation in terms of Heinz numbers.

Programs

  • Mathematica
    Select[Range[2,1000],PrimePi[FactorInteger[#][[-1,1]]]==PrimeNu[#]==Max@@FactorInteger[#][[All,2]]&]

Formula

A061395(a(n)) = A001221(a(n)) = A051903(a(n)).

A351258 a(n) = A099307(A351255(n)) - A051903(A351255(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Feb 11 2022

Keywords

Comments

All terms are > 0 because from any k > 0, one certainly cannot reach 1 in less than A051903(k) iterations of the map x -> A003415(x).
One of the records occur at a(20457) = 38. The corresponding term of A351255 is A351255(20457) = A276086(A328116(20457)) = A276086(688352) = 442600020398400142264711707660915237 = 3 * 7^6 * 11^10 * 13^11 * 17^5 * 19. When starting iterating from this value with A003415, it first goes relatively smoothly in 11 steps to the first squarefree number encountered, 6201461846617177861789236821121654153, but after that, it still meanders for the additional 37 iterations (visiting mostly squarefree numbers, but also six numbers with max. exponent = 2, and one number with max. exponent = 3), before finally reaching zero.

Crossrefs

Programs

  • PARI
    A003415checked(n) = if(n<=1, 0, my(f=factor(n), s=0); for(i=1, #f~, if(f[i,2]>=f[i,1],return(0), s += f[i, 2]/f[i, 1])); (n*s));
    A051903(n) = if((1==n),0,vecmax(factor(n)[, 2]));
    A099307(n) = { my(s=1); while(n>1, n = A003415checked(n); s++); if(n,s,0); };
    A276086(n) = { my(m=1, p=2); while(n, m *= (p^(n%p)); n = n\p; p = nextprime(1+p)); (m); };
    for(n=0, 2^9, u=A276086(n); c = A099307(u); if(c>0,print1(c-A051903(u), ", ")));

Formula

a(n) = A351257(n) - A351256(n) = A099307(A351255(n)) - A051903(A351255(n)).
Previous Showing 11-20 of 386 results. Next