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-4 of 4 results.

A056239 If n = Product_{k >= 1} (p_k)^(c_k) where p_k is k-th prime and c_k >= 0 then a(n) = Sum_{k >= 1} k*c_k.

Original entry on oeis.org

0, 1, 2, 2, 3, 3, 4, 3, 4, 4, 5, 4, 6, 5, 5, 4, 7, 5, 8, 5, 6, 6, 9, 5, 6, 7, 6, 6, 10, 6, 11, 5, 7, 8, 7, 6, 12, 9, 8, 6, 13, 7, 14, 7, 7, 10, 15, 6, 8, 7, 9, 8, 16, 7, 8, 7, 10, 11, 17, 7, 18, 12, 8, 6, 9, 8, 19, 9, 11, 8, 20, 7, 21, 13, 8, 10, 9, 9, 22, 7, 8, 14, 23, 8, 10, 15, 12, 8, 24, 8, 10
Offset: 1

Views

Author

Leroy Quet, Aug 19 2000

Keywords

Comments

A pseudo-logarithmic function in the sense that a(b*c) = a(b)+a(c) and so a(b^c) = c*a(b) and f(n) = k^a(n) is a multiplicative function. [Cf. A248692 for example.] Essentially a function from the positive integers onto the partitions of the nonnegative integers (1->0, 2->1, 3->2, 4->1+1, 5->3, 6->1+2, etc.) so each value a(n) appears A000041(a(n)) times, first with the a(n)-th prime and last with the a(n)-th power of 2. Produces triangular numbers from primorials. - Henry Bottomley, Nov 22 2001
Michael Nyvang writes (May 08 2006) that the Danish composer Karl Aage Rasmussen discovered this sequence in the 1990's: it has excellent musical properties.
All A000041(a(n)) different n's with the same value a(n) are listed in row a(n) of triangle A215366. - Alois P. Heinz, Aug 09 2012
a(n) is the sum of the parts of the partition having Heinz number n. We define the Heinz number of a partition p = [p_1, p_2, ..., p_r] as Product_{j=1..r} (p_j-th prime) (concept used by Alois P. Heinz in A215366 as an "encoding" of a partition). For example, for the partition [1, 1, 2, 4, 10] we get 2*2*3*7*29 = 2436. Example: a(33) = 7 because the partition with Heinz number 33 = 3 * 11 is [2,5]. - Emeric Deutsch, May 19 2015

Examples

			a(12) = 1*2 + 2*1 = 4, since 12 = 2^2 *3^1 = (p_1)^2 *(p_2)^1.
		

Crossrefs

Programs

  • Haskell
    a056239 n = sum $ zipWith (*) (map a049084 $ a027748_row n) (a124010_row n)
    -- Reinhard Zumkeller, Apr 27 2013
    
  • Maple
    # To get 10000 terms. First make prime table: M:=10000; pl:=array(1..M); for i from 1 to M do pl[i]:=0; od: for i from 1 to M do if ithprime(i) > M then break; fi; pl[ithprime(i)]:=i; od:
    # Decode Maple's amazing syntax for factoring integers: g:=proc(n) local e,p,t1,t2,t3,i,j,k; global pl; t1:=ifactor(n); t2:=nops(t1); if t2 = 2 and whattype(t1) <> `*` then p:=op(1,op(1,t1)); e:=op(2,t1); t3:=pl[p]*e; else
    t3:=0; for i from 1 to t2 do j:=op(i,t1); if nops(j) = 1 then e:=1; p:=op(1,j); else e:=op(2,j); p:=op(1,op(1,j)); fi; t3:=t3+pl[p]*e; od: fi; t3; end; # N. J. A. Sloane, May 10 2006
    A056239 := proc(n) add( numtheory[pi](op(1,p))*op(2,p), p = ifactors(n)[2]) ; end proc: # R. J. Mathar, Apr 20 2010
    # alternative:
    with(numtheory): a := proc (n) local B: B := proc (n) local nn, j, m: nn := op(2, ifactors(n)): for j to nops(nn) do m[j] := op(j, nn) end do: [seq(seq(pi(op(1, m[i])), q = 1 .. op(2, m[i])), i = 1 .. nops(nn))] end proc: add(B(n)[i], i = 1 .. nops(B(n))) end proc: seq(a(n), n = 1 .. 130); # Emeric Deutsch, May 19 2015
  • Mathematica
    a[1] = 0; a[2] = 1; a[p_?PrimeQ] := a[p] = PrimePi[p];
    a[n_] := a[n] = Total[#[[2]]*a[#[[1]]] & /@ FactorInteger[n]]; a /@ Range[91] (* Jean-François Alcover, May 19 2011 *)
    Table[Total[FactorInteger[n] /. {p_, c_} /; p > 0 :> PrimePi[p] c], {n, 91}] (* Michael De Vlieger, Jul 12 2017 *)
  • PARI
    A056239(n) = if(1==n,0,my(f=factor(n)); sum(i=1, #f~, f[i,2] * primepi(f[i,1]))); \\ Antti Karttunen, Oct 26 2014, edited Jan 13 2020
    
  • Python
    from sympy import primepi, factorint
    def A056239(n): return sum(primepi(p)*e for p, e in factorint(n).items()) # Chai Wah Wu, Jan 01 2023
  • Scheme
    (require 'factor) ;; Uses the function factor available in Aubrey Jaffer's SLIB Scheme library.
    (define (A056239 n) (apply + (map A049084 (factor n))))
    ;; Antti Karttunen, Oct 26 2014
    

Formula

Totally additive with a(p) = PrimePi(p), where PrimePi(n) = A000720(n).
a(n) = Sum_{k=1..A001221(n)} A049084(A027748(k))*A124010(k). - Reinhard Zumkeller, Apr 27 2013
From Antti Karttunen, Oct 11 2014: (Start)
a(n) = n - A178503(n).
a(n) = A161511(A156552(n)).
a(n) = A227183(A243354(n)).
For all n >= 0:
a(A002110(n)) = A000217(n). [Cf. Henry Bottomley's comment above.]
a(A005940(n+1)) = A161511(n).
a(A243353(n)) = A227183(n).
Also, for all n >= 1:
a(A241909(n)) = A243503(n).
a(A122111(n)) = a(n).
a(A242424(n)) = a(n).
A248692(n) = 2^a(n). (End)
a(n) < A329605(n), a(n) = A001222(A108951(n)), a(A329902(n)) = A112778(n). - Antti Karttunen, Jan 14 2020

A367582 Triangle read by rows where T(n,k) is the number of integer partitions of n whose multiset multiplicity kernel (in which each multiplicity becomes the least element of that multiplicity), sums to k.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Nov 28 2023

Keywords

Comments

We define the multiset multiplicity kernel MMK(m) of a multiset m by the following property, holding for all distinct multiplicities k >= 1. If S is the set of elements of multiplicity k in m, then min(S) has multiplicity |S| in MMK(m). For example, MMK({1,1,2,2,3,4,5}) = {1,1,3,3,3}, and MMK({1,2,3,4,5,5,5,5}) = {1,1,1,1,5}. As an operation on multisets, MMK is represented by A367579, and as an operation on their Heinz numbers, it is represented by A367580.

Examples

			Triangle begins:
  1
  0  1
  0  1  1
  0  1  1  1
  0  1  2  1  1
  0  1  1  2  2  1
  0  1  3  3  2  1  1
  0  1  1  4  3  3  2  1
  0  1  3  5  4  4  3  1  1
  0  1  2  6  4  8  3  3  2  1
  0  1  3  7  9  6  7  4  3  1  1
  0  1  1  8  7 11  9  9  4  3  2  1
  0  1  5 10 11 13 10 11  6  5  3  1  1
  0  1  1 10 11 17 14 18 10  9  4  3  2  1
  0  1  3 12 17 19 18 22 14 12  8  4  3  1  1
  0  1  3 12 15 27 19 31 19 19 10  9  5  3  2  1
  0  1  4 15 23 27 31 33 24 26 18 12  8  4  3  1  1
  0  1  1 14 20 35 33 48 32 37 25 20 11 10  4  3  2  1
Row n = 7 counts the following partitions:
  (1111111)  (61)  (421)     (52)     (4111)  (511)  (7)
                   (2221)    (331)    (322)   (43)
                   (22111)   (31111)  (3211)
                   (211111)
		

Crossrefs

Column k = 2 is A000005(n) - 1 = A032741(n).
Row sums are A000041.
The case of constant partitions is A051731, row sums A000005.
The corresponding rank statistic is A367581, row sums of A367579.
A072233 counts partitions by number of parts.
A091602 counts partitions by greatest multiplicity, least A243978.
A116608 counts partitions by number of distinct parts.
A116861 counts partitions by sum of distinct parts.

Programs

  • Mathematica
    mmk[q_]:=With[{mts=Length/@Split[q]}, Sort[Table[Min@@Select[q, Count[q,#]==i&], {i,mts}]]];
    Table[Length[Select[IntegerPartitions[n], Total[mmk[#]]==k&]], {n,0,10}, {k,0,n}]

A367682 Number of integer partitions of n whose multiset of multiplicities is the same as their multiset multiplicity kernel.

Original entry on oeis.org

1, 1, 0, 1, 3, 2, 3, 2, 5, 5, 10, 9, 14, 14, 21, 20, 30, 36, 44, 50, 66, 75, 93, 106, 132, 151, 185, 212, 256, 286, 348, 394, 479, 543, 642, 740, 888, 994, 1176, 1350, 1589, 1789, 2109, 2371, 2786, 3144, 3653, 4126, 4811, 5385, 6213
Offset: 0

Views

Author

Gus Wiseman, Nov 30 2023

Keywords

Comments

We define the multiset multiplicity kernel MMK(m) of a multiset m by the following property, holding for all distinct multiplicities k >= 1. If S is the set of elements of multiplicity k in m, then min(S) has multiplicity |S| in MMK(m). For example, MMK({1,1,2,2,3,4,5}) = {1,1,3,3,3}, and MMK({1,2,3,4,5,5,5,5}) = {1,1,1,1,5}. As an operation on multisets MMK is represented by A367579, and as an operation on their ranks it is represented by A367580.

Examples

			The a(1) = 1 through a(10) = 10 partitions:
  (1)  .  (21)  (22)   (41)   (51)    (61)   (71)     (81)    (91)
                (31)   (221)  (321)   (421)  (431)    (333)   (541)
                (211)         (3111)         (521)    (531)   (631)
                                             (3221)   (621)   (721)
                                             (41111)  (4221)  (3322)
                                                              (3331)
                                                              (4321)
                                                              (5221)
                                                              (322111)
                                                              (511111)
		

Crossrefs

The case of strict partitions is A025147, ranks A039956.
The case of distinct multiplicities is A114640, ranks A109297.
These partitions have ranks A367683.
A000041 counts integer partitions, strict A000009.
A072233 counts partitions by number of parts.
A091602 counts partitions by greatest multiplicity, least A243978.
A116608 counts partitions by number of distinct parts.

Programs

  • Mathematica
    mmk[q_]:=With[{mts=Length/@Split[q]}, Sort[Table[Min@@Select[q,Count[q,#]==i&], {i,mts}]]];
    Table[Length[Select[IntegerPartitions[n], Sort[Length/@Split[#]]==mmk[#]&]], {n,0,15}]

A082091 a(n) = one more than the number of iterations of A005361 needed to reach 1 from the starting value n.

Original entry on oeis.org

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

Views

Author

Labos Elemer, Apr 09 2003

Keywords

Examples

			For n = 2 = 2^1, A005361(2) = 1, so we reach 1 in one step, and thus a(2) = 1+1 = 2.
For n = 4 = 2^2, A005361(4) = 2; A005361(2) = 1, so we reach 1 in two steps, and thus a(4) = 2+1 = 3.
For n = 6 = 2^1 * 3^1, A005361(6) = 1*1 = 1, so we reach 1 in one step, and thus a(6) = 1+1 = 2.
For n = 64 = 2^6, A005361(64) = 6, thus a(64) = 1 + a(6) = 3.
For n = 10! = 3628800 = 2^8 * 3^4 * 5^2 * 7*1, A005361(3628800) = 64, thus a(3628800) = 1 + a(64) = 4.
		

Crossrefs

Programs

  • Mathematica
    ffi[x_] := Flatten[FactorInteger[x]] lf[x_] := Length[FactorInteger[x]] ep[x_] := Table[Part[ffi[x], 2*w], {w, 1, lf[x]}] expr[x_] := Apply[Times, ep[x]] Table[Length[FixedPointList[expr, w]]-1, {w, 2, 128}]
    (* Second program: *)
    Table[Length@ NestWhileList[Apply[Times, FactorInteger[#][[All, -1]]] &, n, # != 1 &], {n, 105}] (* Michael De Vlieger, Jul 29 2017 *)
  • PARI
    A005361(n) = factorback(factor(n)[, 2]); \\ This function from Charles R Greathouse IV, Nov 07 2014
    A082091(n) = if(1==n,1,1+A082091(A005361(n))); \\ Antti Karttunen, Jul 28 2017
    
  • PARI
    first(n) = my(v = vector(n)); v[1] = 1; for(i=2, n, v[i] = v[factorback(factor(i)[, 2])] + 1); v \\ David A. Corneth, Jul 28 2017
    
  • Scheme
    (define (A082091 n) (if (= 1 n) n (+ 1 (A082091 (A005361 n))))) ;; Antti Karttunen, Jul 28 2017

Formula

a(1) = 1, and for n > 1, a(n) = 1 + a(A005361(n)).

Extensions

Term a(1)=1 prepended, Name and Example sections edited by Antti Karttunen, Jul 28 2017
Showing 1-4 of 4 results.