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

A112798 Table where n-th row is factorization of n, with each prime p_i replaced by i.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

This is an enumeration of all partitions.
Technically this is an enumeration of all multisets (finite weakly increasing sequences of positive integers) rather than integer partitions. - Gus Wiseman, Dec 12 2016
A000040(a(n)) is a prime factor of A082288(n). - Reinhard Zumkeller, Feb 03 2008
Row n is the partition with Heinz number n. We define the Heinz number of a partition p = [p_1, p_2, ..., p_r] as Product(p_j-th prime, j=1..r) (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. For a given n, the 2nd Maple program yields row n; for example, we obtain at once B(2436) = [1,1,2,4,10]. - Emeric Deutsch, Jun 04 2015
From Emeric Deutsch, May 05 2015: (Start)
Number of entries in row n is bigomega(n) (i.e., the number of prime factors of n, multiplicities included).
Product of entries in row n = A003963(n).
Row n contains the Matula numbers of the rooted trees obtained from the rooted tree with Matula number n by deleting the edges emanating from the root. Example: row 8 is 1,1,1; indeed the rooted tree with Matula number 8 is \|/ and deleting the edges emanating from the root we obtain three one-vertex trees, having Matula numbers 1, 1, 1. Example: row 7 is 4; indeed, the rooted tree with Matula number 7 is Y and deleting the edges emanating from the root we obtain the rooted tree V, having Matula number 4.
The Matula (or Matula-Goebel) number of a rooted tree can be defined in the following recursive manner: to the one-vertex tree there corresponds the number 1; to a tree T with root degree 1 there corresponds the t-th prime number, where t is the Matula-Goebel number of the tree obtained from T by deleting the edge emanating from the root; to a tree T with root degree m >= 2 there corresponds the product of the Matula-Goebel numbers of the m branches of T. (End)

Examples

			Row 20 is 1,1,3 because the prime factors of 20, namely 2,2,5 are the 1st, 1st, 3rd primes.
Table begins:
  1;
  2;
  1, 1;
  3;
  1, 2;
  4;
  1, 1, 1;
  ...
The sequence of all finite multisets of positive integers begins: (), (1), (2), (11), (3), (12), (4), (111), (22), (13), (5), (112), (6), (14), (23), (1111), (7), (122), (8), (113), (24), (15), (9), (1112), (33), (16), (222), (114). - _Gus Wiseman_, Dec 12 2016
		

Crossrefs

Row lengths are A001222. Cf. A000040, A027746, A000720, A036036.
Cf. A056239 (row sums).
Cf. A003963 (row products).

Programs

  • Haskell
    a112798 n k = a112798_tabf !! (n-2) !! (n-1)
    a112798_row n = a112798_tabf !! (n-2)
    a112798_tabf = map (map a049084) $ tail a027746_tabf
    -- Reinhard Zumkeller, Aug 04 2014
    
  • Maple
    T:= n-> sort([seq(numtheory[pi](i[1])$i[2], i=ifactors(n)[2])])[]:
    seq(T(n), n=2..50);  # Alois P. Heinz, Aug 09 2012
    with(numtheory): 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: # Emeric Deutsch, Jun 04 2015. (This is equivalent to the first Maple program.)
  • Mathematica
    PrimePi /@ Flatten[Table[#1, {#2}] & @@@ FactorInteger@ #] & /@ Range@ 60 // Flatten // Rest (* Michael De Vlieger, May 09 2015 *)
  • PARI
    row(n)=my(v=List(),f=factor(n)); for(i=1,#f~,for(j=1,f[i,2], listput(v,primepi(f[i,1])))); Vec(v) \\ Charles R Greathouse IV, Nov 09 2021

Formula

T(n,k) = A000720(A027746(n,k)); A027746(n,k) = A000040(T(n,k)).
Also T(n,k) = A049084(A027746(n,k)). - Reinhard Zumkeller, Aug 04 2014

A022559 Sum of exponents in prime-power factorization of n!.

Original entry on oeis.org

0, 0, 1, 2, 4, 5, 7, 8, 11, 13, 15, 16, 19, 20, 22, 24, 28, 29, 32, 33, 36, 38, 40, 41, 45, 47, 49, 52, 55, 56, 59, 60, 65, 67, 69, 71, 75, 76, 78, 80, 84, 85, 88, 89, 92, 95, 97, 98, 103, 105, 108, 110, 113, 114, 118, 120, 124, 126, 128, 129, 133, 134, 136, 139
Offset: 0

Views

Author

Karen E. Wandel (kw29(AT)evansville.edu)

Keywords

Comments

Partial sums of Omega(n) (A001222). - N. J. A. Sloane, Feb 06 2022

Examples

			For n=5, 5! = 120 = 2^3*3^1*5^1 so a(5) = 3+1+1 = 5. - _N. J. A. Sloane_, May 26 2018
		

Crossrefs

Programs

  • Haskell
    a022559 n = a022559_list !! n
    a022559_list = scanl (+) 0 $ map a001222 [1..]
    -- Reinhard Zumkeller, Feb 16 2012
    
  • Maple
    with(numtheory):with(combinat):a:=proc(n) if n=0 then 0 else bigomega(numbperm(n)) fi end: seq(a(n), n=0..63); # Zerinvary Lajos, Apr 11 2008
    # Alternative:
    ListTools:-PartialSums(map(numtheory:-bigomega, [$0..200])); # Robert Israel, Dec 21 2018
  • Mathematica
    Array[Plus@@Last/@FactorInteger[ #! ] &, 5!, 0] (* Vladimir Joseph Stephan Orlovsky, Nov 10 2009 *)
    f[n_] := If[n <= 1, 0, Total[FactorInteger[n]][[2]]]; Accumulate[Array[f, 100, 0]] (* T. D. Noe, Apr 11 2011 *)
    Table[PrimeOmega[n!], {n, 0, 70}] (* Jean-François Alcover, Jun 08 2013 *)
    Join[{0}, Accumulate[PrimeOmega[Range[70]]]] (* Harvey P. Dale, Jul 23 2013 *)
  • PARI
    a(n)=bigomega(n!)
    
  • PARI
    first(n)={my(k=0); vector(n, i, k+=bigomega(i))}
    
  • PARI
    a(n) = sum(k=1, primepi(n), (n - sumdigits(n, prime(k))) / (prime(k)-1)); \\ Daniel Suteu, Apr 18 2018
    
  • PARI
    a(n) = my(res = 0); forprime(p = 2, n, cn = n; while(cn > 0, res += (cn \= p))); res \\ David A. Corneth, Apr 27 2018
    
  • Python
    from sympy import factorint as pf
    def aupton(nn):
        alst = [0]
        for n in range(1, nn+1): alst.append(alst[-1] + sum(pf(n).values()))
        return alst
    print(aupton(63)) # Michael S. Branicky, Aug 01 2021

Formula

a(n) = a(n-1) + A001222(n).
A027746(a(A000040(n))+1) = A000040(n). A082288(a(n)+1) = n.
A001221(n!) = omega(n!) = pi(n) = A000720(n).
a(n) = Sum_{i = 1..n} A001222(i). - Jonathan Vos Post, Feb 10 2010
a(n) = n log log n + B_2 * n + o(n), with B_2 = A083342. - Charles R Greathouse IV, Jan 11 2012
a(n) = A210241(n) - n for n > 0. - Reinhard Zumkeller, Mar 23 2012
G.f.: (1/(1 - x))*Sum_{p prime, k>=1} x^(p^k)/(1 - x^(p^k)). - Ilya Gutkovskiy, Mar 15 2017
a(n) = Sum_{k=1..floor(sqrt(n))} k * (A025528(floor(n/k)) - A025528(floor(n/(k+1)))) + Sum_{k=1..floor(n/(floor(sqrt(n))+1))} floor(n/k) * A069513(k). - Daniel Suteu, Dec 21 2018
a(n) = Sum_{prime p<=n} Sum_{k=1..floor(log_p(n))} floor(n/p^k). - Ridouane Oudra, Nov 04 2022
a(n) = Sum_{k=1..n} A069513(k)*floor(n/k). - Ridouane Oudra, Oct 04 2024

Extensions

Typo corrected by Daniel Forgues, Nov 16 2009

A082287 a(1) = 1; for n > 1, n appears omega(n) times, where omega(n)=A001221(n) is the number of distinct prime factors of n, a(1)=1.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Apr 07 2003

Keywords

Comments

A027748(n) divides a(n) and a(n)=A027748(n) iff a(n) is prime; a(A013939(n)+1)=n.

Crossrefs

Cf. A082288.

Programs

  • Mathematica
    Join[{1},Flatten[Table[PadRight[{},PrimeNu[n],n],{n,2,50}]]] (* Harvey P. Dale, Jan 08 2020 *)
  • PARI
    a(n)=if(n<0,0,t=1;while(sum(k=1,t,floor(t/prime(k)))Benoit Cloitre, Nov 08 2009

Formula

a(n) is the least k such that Sum_{p<=k} floor(k/p) >= n where p runs through the primes. - Benoit Cloitre, Nov 08 2009

A241910 After a(1)=0, numbers 0 .. bigomega(n)-1, followed by numbers 0 .. bigomega(n+1)-1, etc., where bigomega(n)=A001222(n) is the number of prime factors of n (with repetition).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 01 2014

Keywords

Examples

			Viewed as an irregular table, the sequence is constructed as:
"Row"
  [1] 0; (by convention, a(1)=0)
  [2] 0; (because bigomega(2)=1, we have here terms from 0 to 0)
  [3] 0; (same with 3, bigomega(3)=1)
  [4] 0, 1; (as bigomega(4)=2, we have terms from 0 to 2-1)
  [5] 0;
  [6] 0, 1;
  [7] 0;
  [8] 0, 1, 2; (as bigomega(8)=3, we have terms from 0 to 3-1).
etc.
		

Crossrefs

One less than A241911.

Formula

a(1)=0, a(n) = n - A022559(A082288(n)-1) - 2.

A241911 After a(1)=1, numbers 1 .. bigomega(n), followed by numbers 1 .. bigomega(n+1), etc., where bigomega(n)=A001222(n) is the number of prime factors of n (with repetition).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 01 2014

Keywords

Examples

			Viewed as an irregular table, the sequence is constructed as:
"Row"
  [1] 1; (by convention, a(1)=1)
  [2] 1; (because bigomega(2)=1, we have here terms from 1 to 1)
  [3] 1; (same with 3, bigomega(3)=1)
  [4] 1, 2; (as bigomega(4)=2, we have terms from 1 to 2)
  [5] 1;
  [6] 1, 2;
  [7] 1;
  [8] 1, 2, 3; (as bigomega(8)=3, we have terms from 1 to 3).
etc.
		

Crossrefs

One more than A241910.

Formula

a(1)=1, a(n) = n - A022559(A082288(n)-1) - 1.

A241920 After a(1)=1, each n appears A061395(n) times, where A061395 gives the index of the largest prime factor of n.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 01 2014

Keywords

Comments

Only numbers that occur just once are the powers of two (A000079).

Crossrefs

Showing 1-6 of 6 results.