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 14 results. Next

A362613 Number of co-modes in the prime factorization of 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
Offset: 1

Views

Author

Gus Wiseman, May 05 2023

Keywords

Comments

First differs from A327500 at n = 180.
First differs from A351946 at n = 180.
First differs from A353507 at n = 180.
We define a co-mode in a multiset to be an element that appears at most as many times as each of the others. For example, the co-modes of {a,a,b,b,b,c,c} are {a,c}.
a(n) depends only on the prime signature of n. - Andrew Howroyd, May 08 2023

Examples

			The factorization of 180 is 2*2*3*3*5, co-modes {5}, so a(180) = 1.
The factorization of 900 is 2*2*3*3*5*5, co-modes {2,3,5}, so a(900) = 3.
The factorization of 8820 is 2*2*3*3*5*7*7, co-modes {5}, so a(8820) = 1.
		

Crossrefs

Positions of first appearances are A002110.
Positions of 1's are A359178, counted by A362610.
Positions of terms > 1 are A362606, counted by A362609.
For mode we have A362611, counted by A362614.
Counting partitions by this statistic (co-mode count) gives A362615.
A027746 lists prime factors (with multiplicity).
A112798 lists prime indices, length A001222, sum A056239.

Programs

  • Mathematica
    Table[x=Last/@If[n==1,0,FactorInteger[n]];Count[x,Min@@x],{n,100}]
  • PARI
    a(n) = if(n==1, 0, my(f=factor(n)[,2], m=vecmin(f)); #select(v->v==m, f)) \\ Andrew Howroyd, May 08 2023
  • Python
    from sympy import factorint
    def A362613(n):
        v = factorint(n).values()
        w = min(v,default=0)
        return sum(1 for e in v if e<=w) # Chai Wah Wu, May 08 2023
    

A353742 Sorted prime metasignature of n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, May 20 2022

Keywords

Comments

The prime metasignature counts the multiplicities of each value in the prime signature of n. For example, 2520 has prime indices {1,1,1,2,2,3,4}, sorted prime signature {1,1,2,3}, and sorted prime metasignature {1,1,2}.

Examples

			The prime indices, sorted prime signatures, and sorted prime metasignatures of selected n:
      n = 1: {}             -> {}         -> {}
      n = 2: {1}            -> {1}        -> {1}
      n = 6: {1,2}          -> {1,1}      -> {2}
     n = 12: {1,1,2}        -> {1,2}      -> {1,1}
     n = 30: {1,2,3}        -> {1,1,1}    -> {3}
     n = 60: {1,1,2,3}      -> {1,1,2}    -> {1,2}
    n = 210: {1,2,3,4}      -> {1,1,1,1}  -> {4}
    n = 360: {1,1,1,2,2,3}  -> {1,2,3}    -> {1,1,1}
		

Crossrefs

Row-sums are A001221.
Row-lengths are A071625.
Positions of first appearances are A182863.
This is the sorted version of A238747.
Row-products are A353507.
A001222 counts prime factors with multiplicity.
A003963 gives product of prime indices.
A005361 gives product of prime signature, firsts A353500 (sorted A085629).
A056239 adds up prime indices, row sums of A112798 and A296150.
A124010 gives prime signature, sorted A118914.
A130091 lists numbers with strict signature, counted by A098859.
A181819 gives prime shadow, with an inverse A181821.

Programs

  • Mathematica
    Join@@Table[Sort[Length/@Split[Sort[Last/@If[n==1,{},FactorInteger[n]]]]],{n,100}]

A353503 Numbers whose product of prime indices equals their product of prime exponents (prime signature).

Original entry on oeis.org

1, 2, 12, 36, 40, 112, 352, 832, 960, 1296, 2176, 2880, 4864, 5376, 11776, 12544, 16128, 29696, 33792, 34560, 38400, 63488, 64000, 101376, 115200, 143360, 151552, 159744, 335872, 479232, 704512, 835584, 1540096, 1658880, 1802240
Offset: 1

Views

Author

Gus Wiseman, May 17 2022

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. A number's prime signature (row n A124010) is the sequence of positive exponents in its prime factorization.

Examples

			The terms together with their prime indices begin:
     1: {}
     2: {1}
    12: {1,1,2}
    36: {1,1,2,2}
    40: {1,1,1,3}
   112: {1,1,1,1,4}
   352: {1,1,1,1,1,5}
   832: {1,1,1,1,1,1,6}
   960: {1,1,1,1,1,1,2,3}
  1296: {1,1,1,1,2,2,2,2}
  2176: {1,1,1,1,1,1,1,7}
  2880: {1,1,1,1,1,1,2,2,3}
  4864: {1,1,1,1,1,1,1,1,8}
  5376: {1,1,1,1,1,1,1,1,2,4}
		

Crossrefs

For shadows instead of exponents we get A003586, counted by A008619.
The LHS (product of prime indices) is A003963, counted by A339095.
The RHS (product of prime exponents) is A005361, counted by A266477.
The version for shadows instead of indices is A353399, counted by A353398.
These partitions are counted by A353506.
A001222 counts prime factors with multiplicity, distinct A001221.
A056239 adds up prime indices, row sums of A112798 and A296150.
A130091 lists numbers with distinct prime exponents, counted by A098859.
A124010 gives prime signature, sorted A118914.
A181819 gives prime shadow, with an inverse A181821.
A353394 gives product of shadows of prime indices, firsts A353397.

Programs

  • Mathematica
    Select[Range[1000],Times@@Cases[If[#==1,{},FactorInteger[#]],{p_,k_}:>PrimePi[p]^k]==Times@@Last/@FactorInteger[#]&]
  • Python
    from itertools import count, islice
    from math import prod
    from sympy import primepi, factorint
    def A353503_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda n: n == 1 or prod((f:=factorint(n)).values()) == prod(primepi(p)**e for p,e in f.items()), count(max(startvalue,1)))
    A353503_list = list(islice(A353503_gen(),20)) # Chai Wah Wu, May 20 2022

Formula

A003963(a(n)) = A005361(a(n)).

A353500 Numbers that are the smallest number with product of prime exponents k for some k. Sorted positions of first appearances in A005361, unsorted version A085629.

Original entry on oeis.org

1, 4, 8, 16, 32, 64, 128, 144, 216, 288, 432, 864, 1152, 1296, 1728, 2048, 2592, 3456, 5184, 7776, 8192, 10368, 13824, 15552, 18432, 20736, 31104, 41472, 55296, 62208, 73728, 86400, 108000, 129600, 131072, 165888, 194400, 216000, 221184, 259200, 279936, 324000
Offset: 1

Views

Author

Gus Wiseman, May 17 2022

Keywords

Comments

All terms are highly powerful (A005934), but that sequence looks only at first appearances that reach a record, and is missing 1152, 2048, 8192, etc.

Examples

			The prime exponents of 86400 are (7,3,2), and this is the first case of product 42, so 86400 is in the sequence.
		

Crossrefs

These are the positions of first appearances in A005361, counted by A266477.
This is the sorted version of A085629.
The version for shadows instead of exponents is A353397, firsts in A353394.
A001222 counts prime factors with multiplicity, distinct A001221.
A003963 gives product of prime indices, counted by A339095.
A056239 adds up prime indices, row sums of A112798 and A296150.
A124010 gives prime exponents, sorted A118914.
A130091 lists numbers with distinct prime exponents, counted by A098859.
A181819 gives prime shadow, with an inverse A181821.
Subsequence of A181800.

Programs

  • Mathematica
    nn=1000;
    d=Table[Times@@Last/@FactorInteger[n],{n,nn}];
    Select[Range[nn],!MemberQ[Take[d,#-1],d[[#]]]&]
    lps[fct_] := Module[{nf = Length[fct]}, Times @@ (Prime[Range[nf]]^Reverse[fct])]; lps[{1}] = 1; q[n_] := Module[{e = FactorInteger[n][[;; , 2]]}, (n == 1 || AllTrue[e, # > 1 &]) && n == Min[lps /@ f[Times @@ e]]]; Select[Cases[Import["https://oeis.org/A025487/b025487.txt", "Table"], {, }][[;; , 2]], q] (* Amiram Eldar, Sep 29 2024, using the function f by T. D. Noe at A162247 *)

A182863 Members m of A025487 such that, if k appears in m's prime signature, k-1 appears at least as often as k (for any integer k > 1).

Original entry on oeis.org

1, 2, 6, 12, 30, 60, 210, 360, 420, 1260, 2310, 2520, 4620, 13860, 27720, 30030, 60060, 75600, 138600, 180180, 360360, 510510, 831600, 900900, 1021020, 1801800, 3063060, 6126120, 9699690, 10810800, 15315300, 19399380, 30630600, 37837800
Offset: 1

Views

Author

Matthew Vandermast, Jan 14 2011

Keywords

Comments

Members m of A025487 such that A181819(m) is also a member of A025487.
If prime signatures are considered as partitions, these are the members of A025487 whose prime signature is conjugate to the prime signature of a member of A181818.
Also the least number with each sorted prime metasignature, where a number's metasignature is the sequence of multiplicities of exponents in its prime factorization. For example, 2520 has prime indices {1,1,1,2,2,3,4}, sorted prime signature {1,1,2,3}, and sorted prime metasignature {1,1,2}. - Gus Wiseman, May 21 2022

Examples

			The prime signature of 360360 = 2^3*3^2*5*7*11*13 is (3,2,1,1,1,1). 2 appears as many times as 3 in 360360's prime signature, and 1 appears more times than 2. Since 360360 is also a member of A025487, it is a member of this sequence.
From _Gus Wiseman_, May 21 2022: (Start)
The terms together with their sorted prime signatures and sorted prime metasignatures begin:
      1: {}                -> {}            -> {}
      2: {1}               -> {1}           -> {1}
      6: {1,2}             -> {1,1}         -> {2}
     12: {1,1,2}           -> {1,2}         -> {1,1}
     30: {1,2,3}           -> {1,1,1}       -> {3}
     60: {1,1,2,3}         -> {1,1,2}       -> {1,2}
    210: {1,2,3,4}         -> {1,1,1,1}     -> {4}
    360: {1,1,1,2,2,3}     -> {1,2,3}       -> {1,1,1}
    420: {1,1,2,3,4}       -> {1,1,1,2}     -> {1,3}
   1260: {1,1,2,2,3,4}     -> {1,1,2,2}     -> {2,2}
   2310: {1,2,3,4,5}       -> {1,1,1,1,1}   -> {5}
   2520: {1,1,1,2,2,3,4}   -> {1,1,2,3}     -> {1,1,2}
   4620: {1,1,2,3,4,5}     -> {1,1,1,1,2}   -> {1,4}
  13860: {1,1,2,2,3,4,5}   -> {1,1,1,2,2}   -> {2,3}
  27720: {1,1,1,2,2,3,4,5} -> {1,1,1,2,3}   -> {1,1,3}
  30030: {1,2,3,4,5,6}     -> {1,1,1,1,1,1} -> {6}
  60060: {1,1,2,3,4,5,6}   -> {1,1,1,1,1,2} -> {1,5}
(End)
		

Crossrefs

Intersection of A025487 and A179983.
Subsequence of A129912 and A181826.
Includes all members of A182862.
Positions of first appearances in A353742, unordered version A238747.
A001222 counts prime factors with multiplicity, distinct A001221.
A003963 gives product of prime indices.
A005361 gives product of prime signature, firsts A353500 (sorted A085629).
A056239 adds up prime indices, row sums of A112798 and A296150.
A124010 gives prime signature, sorted A118914.
A130091 lists numbers with distinct prime exponents, counted by A098859.
A181819 gives prime shadow, with an inverse A181821.
A182850 gives frequency depth of prime indices, counted by A225485.
A323014 gives adjusted frequency depth of prime indices, counted by A325280.

Programs

  • Mathematica
    nn=1000;
    r=Table[Sort[Length/@Split[Sort[Last/@If[n==1,{},FactorInteger[n]]]]],{n,nn}];
    Select[Range[nn],!MemberQ[Take[r,#-1],r[[#]]]&] (* Gus Wiseman, May 21 2022 *)

A353506 Number of integer partitions of n whose parts have the same product as their multiplicities.

Original entry on oeis.org

1, 1, 0, 0, 1, 0, 2, 0, 1, 0, 1, 1, 2, 1, 2, 0, 3, 3, 2, 3, 2, 0, 2, 3, 2, 1, 3, 1, 6, 3, 2, 3, 3, 2, 3, 4, 1, 2, 3, 6, 3, 2, 2, 3, 3, 1, 2, 6, 6, 4, 7, 2, 3, 6, 4, 3, 3, 0, 4, 5, 3, 5, 5, 6, 5, 3, 3, 3, 6, 5, 5, 6, 6, 3, 3, 3, 4, 4, 4, 6, 7, 2, 5, 7, 6, 2, 3, 4, 6, 11, 9, 4, 4, 1, 5, 6, 4, 7, 9, 6, 4
Offset: 0

Views

Author

Gus Wiseman, May 17 2022

Keywords

Examples

			The a(0) = 1 through a(18) = 2 partitions:
  n= 0: ()
  n= 1: (1)
  n= 2:
  n= 3:
  n= 4: (211)
  n= 5:
  n= 6: (3111) (2211)
  n= 7:
  n= 8: (41111)
  n= 9:
  n=10: (511111)
  n=11: (32111111)
  n=12: (6111111) (22221111)
  n=13: (322111111)
  n=14: (71111111) (4211111111)
  n=15:
  n=16: (811111111) (4411111111) (42211111111)
  n=17: (521111111111) (332111111111) (322211111111)
  n=18: (9111111111) (333111111111)
For example, the partition y = (322111111) has multiplicities (1,2,6) with product 12, and the product of parts is also 3*2*2*1*1*1*1*1*1 = 12, so y is counted under a(13).
		

Crossrefs

LHS (product of parts) is ranked by A003963, counted by A339095.
RHS (product of multiplicities) is ranked by A005361, counted by A266477.
For shadows instead of prime exponents we have A008619, ranked by A003586.
Taking sum instead of product of parts gives A266499.
For shadows instead of prime indices we have A353398, ranked by A353399.
These partitions are ranked by A353503.
Taking sum instead of product of multiplicities gives A353698.
A008284 counts partitions by length.
A098859 counts partitions with distinct multiplicities, ranked by A130091.
A353507 gives product of multiplicities (of exponents) in prime signature.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], Times@@#==Times@@Length/@Split[#]&]],{n,0,30}]
  • PARI
    a(n) = {my(nb=0); forpart(p=n, my(s=Set(p), v=Vec(p)); if (vecprod(vector(#s, i, #select(x->(x==s[i]), v))) == vecprod(v), nb++);); nb;} \\ Michel Marcus, May 20 2022

Extensions

a(71)-a(100) from Alois P. Heinz, May 20 2022

A328830 The second prime shadow of n: a(1) = 1; for n > 1, a(n) = a(A003557(n)) * prime(A056169(n)) when A056169(n) > 0, otherwise a(n) = a(A003557(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 29 2019

Keywords

Comments

a(n) depends only on prime signature of n (cf. A025487).

Examples

			For n = 30 = 2 * 3 * 5, there are three unitary prime factors, while A003557(30) = 1, which terminates the recursion, thus a(30) = prime(3) = 5.
For n = 60060 = 2^2 * 3 * 5 * 7 * 11 * 13, there are 5 unitary prime factors, while in A003557(60060) = 2 there is only one, thus a(60060) = prime(5) * prime(1) = 11 * 2 = 22.
The number 1260 = 2^2*3^2*5*7 has prime exponents (2,2,1,1) so its prime shadow is prime(2)*prime(2)*prime(1)*prime(1) = 36.  Next, 36 = 2^2*3^2 has prime exponents (2,2) so its prime shadow is prime(2)*prime(2) = 9. In fact, the term a(1260) = 9 is the first appearance of 9 in the sequence. - _Gus Wiseman_, Apr 28 2022
		

Crossrefs

Column 2 of A353510.
Differs from A182860 for the first time at a(30) = 5, while A182860(30) = 4.
Cf. A182863 for the first appearances.
A005361 gives product of prime exponents.
A112798 gives prime indices, sum A056239.
A124010 gives prime signature, sorted A118914.
A181819 gives prime shadow, with an inverse A181821.
A325131 lists numbers relatively prime to their prime shadow.
A325755 lists numbers divisible by their prime shadow.

Programs

Formula

a(1) = 1; for n > 1, a(n) = A008578(1+A056169(n)) * a(A003557(n)).
A001221(a(n)) = A323022(n).
A001222(a(n)) = A071625(n).
a(n) = A181819(A181819(n)). - Gus Wiseman, Apr 27 2022

Extensions

Added Gus Wiseman's new name to the front of the definition. - Antti Karttunen, Apr 27 2022

A353698 Number of integer partitions of n whose product equals their length.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, May 19 2022

Keywords

Examples

			The a(n) partitions for selected n (A..H = 10..17):
n=9:    n=21:             n=27:                 n=33:
---------------------------------------------------------------------------
51111   B1111111111       E1111111111111        H1111111111111111
321111  72111111111111    921111111111111111    B211111111111111111111
        531111111111111   54111111111111111111  831111111111111111111111
        4221111111111111                        5511111111111111111111111
                                                333111111111111111111111111
		

Crossrefs

The LHS (product of parts) is counted by A339095, rank statistic A003963.
The RHS (length) is counted by A008284, rank statistic A001222.
These partitions are ranked by A353699.
A266477 counts partitions by product of multiplicities, rank stat A005361.
A353504 counts partitions w/ product less than product of multiplicities.
A353505 counts partitions w/ product greater than product of multiplicities.
A353506 counts partitions w/ prod equal to prod of mults, ranked by A353503.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Times@@#==Length[#]&]],{n,0,30}]
  • PARI
    a(r,m=r,p=1,k=0) = {(p==k+r) + sum(m=2, min(m, (k+r)\p),  self()(r-m, min(m,r-m), p*m, k+1))} \\ Andrew Howroyd, Jan 02 2023

Extensions

Terms a(61) and beyond from Andrew Howroyd, Jan 02 2023

A374470 a(n) = gcd(bigomega(n), A064547(n)), where A064547 is the count of 1-bits in the exponents of the prime factorization of n, and bigomega is the number of prime factors of n (with multiplicity).

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, 1, 1, 2, 1, 2, 2, 3, 1, 1, 2, 3, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 1, 2, 1, 1, 2, 2, 2, 1, 1, 1, 2, 1, 2, 2, 2, 3, 1, 1, 1, 2, 1, 3, 1, 1, 3
Offset: 1

Views

Author

Antti Karttunen, Jul 14 2024

Keywords

Crossrefs

Cf. A001222, A064547, A374471, A374472 (indices of even terms), A374473 (of odd terms).
Differs from A327500, A362613, A351946, A353507 first at n=60, where a(60) = 1.
Differs from A362611 first at n=64, where a(64) = 2, while A362611(64) = 1.

Programs

  • PARI
    A064547(n) = { my(f = factor(n)[, 2]); sum(k=1, #f, hammingweight(f[k])); };
    A374470(n) = gcd(bigomega(n),A064547(n));

A353745 Number of runs in the ordered prime signature of n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, May 20 2022

Keywords

Comments

First differs from A071625 at a(90) = 3.
First differs from A331592 at a(90) = 3.
A number's prime signature (row n of A124010) is the sequence of positive exponents in its prime factorization.

Examples

			The prime indices of 630 are {1,2,2,3,4}, with multiplicities {1,2,1,1}, with runs {{1},{2},{1,1}}, so a(630) = 3.
		

Crossrefs

Positions of first appearances are A354233.
A001222 counts prime factors, distinct A001221.
A005361 gives product of prime signature, firsts A353500/A085629.
A056239 adds up prime indices, row sums of A112798 and A296150.
A124010 gives prime signature, sorted A118914.
A181819 gives prime shadow, with an inverse A181821.
A182850/A323014 give frequency depth, counted by A225485/A325280.
Cf. also A329747.

Programs

  • Mathematica
    Table[Length[Split[Last/@If[n==1,{},FactorInteger[n]]]],{n,100}]
  • PARI
    pis_to_runs(n) = { my(runs=List([]), f=factor(n)); for(i=1,#f~,while(f[i,2], listput(runs,primepi(f[i,1])); f[i,2]--)); (runs); };
    runlengths(lista) = if(!#lista, lista, if(1==#lista, List([1]), my(runs=List([]), rl=1); for(i=1, #lista, if((i < #lista) && (lista[i]==lista[i+1]), rl++, listput(runs,rl); rl=1)); (runs)));
    A353745(n) = #runlengths(runlengths(pis_to_runs(n))); \\ Antti Karttunen, Jan 20 2025
Showing 1-10 of 14 results. Next