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

A124010 Triangle in which first row is 0, n-th row (n>1) lists the exponents of distinct prime factors ("ordered prime signature") in the prime factorization of n.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

A001222(n) = Sum(T(n,k), 1 <= k <= A001221(n)); A005361(n) = Product(T(n,k), 1 <= k <= A001221(n)), n>1; A051903(n) = Max(T(n,k): 1 <= k <= A001221(n)); A051904(n) = Min(T(n,k), 1 <= k <= A001221(n)); A067029(n) = T(n,1); A071178(n) = T(n,A001221(n)); A064372(n)=Sum(A064372(T(n,k)), 1 <= k <= A001221(n)). - Reinhard Zumkeller, Aug 27 2011
Any finite sequence of natural numbers appears as consecutive terms. - Paul Tek, Apr 27 2013
For n > 1: n-th row = n-th row of A067255 without zeros. - Reinhard Zumkeller, Jun 11 2013
Most often the prime signature is given as a sorted representative of the multiset of the nonzero exponents, either in increasing order, which yields A118914, or, most commonly, in decreasing order, which yields A212171. - M. F. Hasler, Oct 12 2018

Examples

			Initial values of exponents are:
1, [0]
2, [1]
3, [1]
4, [2]
5, [1]
6, [1, 1]
7, [1]
8, [3]
9, [2]
10, [1, 1]
11, [1]
12, [2, 1]
13, [1]
14, [1, 1]
15, [1, 1]
16, [4]
17, [1]
18, [1, 2]
19, [1]
20, [2, 1]
...
		

Crossrefs

Cf. A027748, A001221 (row lengths, n>1), A001222 (row sums), A027746, A020639, A064372, A067029 (first column).
Sorted rows: A118914, A212171.

Programs

  • Haskell
    a124010 n k = a124010_tabf !! (n-1) !! (k-1)
    a124010_row 1 = [0]
    a124010_row n = f n a000040_list where
       f 1 _      = []
       f u (p:ps) = h u 0 where
         h v e | m == 0 = h v' (e + 1)
               | m /= 0 = if e > 0 then e : f v ps else f v ps
               where (v',m) = divMod v p
    a124010_tabf = map a124010_row [1..]
    -- Reinhard Zumkeller, Jun 12 2013, Aug 27 2011
    
  • Maple
    expts:=proc(n) local t1,t2,t3,t4,i; if n=1 then RETURN([0]); fi; if isprime(n) then RETURN([1]); fi; t1:=ifactor(n); if nops(factorset(n))=1 then RETURN([op(2,t1)]); fi; t2:=nops(t1); t3:=[]; for i from 1 to t2 do t4:=op(i,t1); if nops(t4) = 1 then t3:=[op(t3),1]; else t3:=[op(t3),op(2,t4)]; fi; od; RETURN(t3); end; # N. J. A. Sloane, Dec 20 2007
    PrimeSignature := proc(n) local F, e, k; F := ifactors(n)[2]; [seq(e, e = seq(F[k][2], k = 1..nops(F)))] end:
    ListTools:-Flatten([[0], seq(PrimeSignature(n), n = 1..73)]); # Peter Luschny, Jun 15 2025
  • Mathematica
    row[1] = {0}; row[n_] := FactorInteger[n][[All, 2]] // Flatten; Table[row[n], {n, 1, 80}] // Flatten (* Jean-François Alcover, Aug 19 2013 *)
  • PARI
    print1(0); for(n=2,50, f=factor(n)[,2]; for(i=1,#f,print1(", "f[i]))) \\ Charles R Greathouse IV, Nov 07 2014
    
  • PARI
    A124010_row(n)=if(n,factor(n)[,2]~,[0]) \\ M. F. Hasler, Oct 12 2018
    
  • Python
    from sympy import factorint
    def a(n):
        f=factorint(n)
        return [0] if n==1 else [f[i] for i in f]
    for n in range(1, 21): print(a(n)) # Indranil Ghosh, May 16 2017

Formula

n = Product_k A027748(n,k)^a(n,k).

Extensions

Name edited by M. F. Hasler, Apr 08 2022

A164336 a(1)=1. Thereafter, all terms are primes raised to the values of earlier terms of the sequence.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 9, 11, 13, 16, 17, 19, 23, 25, 27, 29, 31, 32, 37, 41, 43, 47, 49, 53, 59, 61, 67, 71, 73, 79, 81, 83, 89, 97, 101, 103, 107, 109, 113, 121, 125, 127, 128, 131, 137, 139, 149, 151, 157, 163, 167, 169, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227
Offset: 1

Views

Author

Leroy Quet, Aug 13 2009

Keywords

Comments

These are the values of exponent towers consisting completely of primes coefficients. (For example, p^(q^(r^(s^..))), all variables being primes.) This sequence first differs from the terms of A096165, after the initial 1 in this sequence, when 18446744073709551616 = 2^64 occurs in A096165 but not in this sequence.
A064372(a(n)) = 1. [Reinhard Zumkeller, Aug 27 2011]

Crossrefs

Programs

  • Maple
    q:= n-> is(n=1 or (l-> nops(l)=1 and q(l[1, 2]))(ifactors(n)[2])):
    select(q, [$1..350])[];  # Alois P. Heinz, Dec 30 2020
  • Mathematica
    Block[{a = {1}}, Do[If[Length@ # == 1 && MemberQ[a, First@ #], AppendTo[a, i]] &[FactorInteger[i][[All, -1]]], {i, 2, 227}]; a] (* Michael De Vlieger, Aug 31 2017 *)
  • PARI
    L=1000;S=[1];SS=[];while(#S!=#SS, SS=S;S=[];for(i=1,#SS,forprime(p=2,floor(L^(1/SS[i])),S=concat(S,p^SS[i])));S=eval(setunion(S,SS)));vecsort(S) \\ Hagen von Eitzen, Oct 03 2009

Extensions

More terms from Hagen von Eitzen, Oct 03 2009

A333175 If n = Product (p_j^k_j) then a(n) = Sum (a(n/p_j^k_j)), with a(1) = 1.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 6, 1, 1, 2, 2, 2, 2, 1, 2, 2, 2, 1, 6, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 6, 1, 2, 2, 1, 2, 6, 1, 2, 2, 6, 1, 2, 1, 2, 2, 2, 2, 6, 1, 2, 1, 2, 1, 6, 2, 2, 2, 2, 1, 6, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2
Offset: 1

Views

Author

Ilya Gutkovskiy, Mar 11 2020

Keywords

Comments

Number of ordered prime factorizations of radical of n.
Number of permutations of the prime indices of n (counting multiplicity) avoiding the patterns (1,2,1) and (2,1,2). These are permutations with all equal parts contiguous. Depends only on sorted prime signature (A118914). - Gus Wiseman, Jun 27 2020

Examples

			From _Gus Wiseman_, Jun 27 2020 (Start)
The a(n) permutations of prime indices for n = 2, 12, 60:
  (1)  (112)  (1123)
       (211)  (1132)
              (2113)
              (2311)
              (3112)
              (3211)
(End)
		

Crossrefs

Dominates A335451.
Permutations of prime indices are A008480.
Unsorted prime signature is A124010. Sorted prime signature is A118914.
(1,2,1)-avoiding permutations of prime indices are A335449.
(2,1,2)-avoiding permutations of prime indices are A335450.
(1,2,1) or (2,1,2)-matching permutations of prime indices are A335460.
(1,2,1) and (2,1,2)-matching permutations of prime indices are A335462.

Programs

  • Maple
    f:= n -> nops(numtheory:-factorset(n))!:
    map(f, [$1..100]); # Robert Israel, Mar 12 2020
  • Mathematica
    a[1] = 1; a[n_] := a[n] = Plus @@ (a[n/#[[1]]^#[[2]]] & /@ FactorInteger[n]); Table[a[n], {n, 1, 100}]
    a[1] = 1; a[n_] := a[n] = Sum[If[GCD[n/d, d] == 1 && d < n, Boole[PrimePowerQ[n/d]] a[d], 0], {d, Divisors[n]}]; Table[a[n], {n, 1, 100}]
    Table[PrimeNu[n]!, {n, 1, 100}]

Formula

a(1) = 1; a(n) = Sum_{d|n, d < n, gcd(d, n/d) = 1} A069513(n/d) * a(d).
a(n) = A000142(A001221(n)).

A106490 Total number of bases and exponents in Quetian Superfactorization of n, excluding the unity-exponents at the tips of branches.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 09 2005 based on Leroy Quet's message ('Super-Factoring' An Integer) posted to SeqFan-mailing list on Dec 06 2003

Keywords

Comments

Quetian Superfactorization proceeds by factoring a natural number to its unique prime-exponent factorization (p1^e1 * p2^e2 * ... pj^ej) and then factoring recursively each of the (nonzero) exponents in similar manner, until unity-exponents are finally encountered.

Examples

			a(64) = 3, as 64 = 2^6 = 2^(2^1*3^1) and there are three non-1 nodes in that superfactorization. Similarly, for 360 = 2^(3^1) * 3^(2^1) * 5^1 we get a(360) = 5. a(65536) = a(2^(2^(2^(2^1)))) = 4.
		

Crossrefs

Cf. A276230 (gives first k such that a(k) = n, i.e., this sequence is a left inverse of A276230).
After n=1 differs from A038548 for the first time at n=24, where A038548(24)=4, while a(24)=3.

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=1, 0,
          add(1+a(i[2]), i=ifactors(n)[2]))
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Nov 07 2014
  • Mathematica
    a[n_] := a[n] = If[n == 1, 0, Sum[1 + a[i[[2]]], {i,FactorInteger[n]}]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Nov 11 2015, after Alois P. Heinz *)
  • PARI
    A067029(n) = if(n<2, 0, factor(n)[1,2]);
    A028234(n) = my(f = factor(n)); if (#f~, f[1, 1] = 1); factorback(f); /* after Michel Marcus */
    a(n) = if(n<2, 0, 1 + a(A067029(n)) + a(A028234(n)));
    for(n=1, 150, print1(a(n),", ")) \\ Indranil Ghosh, Mar 23 2017, after formula by Antti Karttunen

Formula

Additive with a(p^e) = 1 + a(e).
a(1) = 0; for n > 1, a(n) = 1 + a(A067029(n)) + a(A028234(n)). - Antti Karttunen, Mar 23 2017
Other identities. For all n >= 1:
a(A276230(n)) = n.
a(n) = A106493(A106444(n)).
a(n) = A106491(n) - A064372(n).

A106444 Exponent-recursed cross-domain bijection from N to GF(2)[X]. Variant of A091202 and A106442.

Original entry on oeis.org

0, 1, 2, 3, 4, 7, 6, 11, 8, 5, 14, 13, 12, 19, 22, 9, 16, 25, 10, 31, 28, 29, 26, 37, 24, 21, 38, 15, 44, 41, 18, 47, 128, 23, 50, 49, 20, 55, 62, 53, 56, 59, 58, 61, 52, 27, 74, 67, 48, 69, 42, 43, 76, 73, 30, 35, 88, 33, 82, 87, 36, 91, 94, 39, 64, 121, 46, 97, 100, 111
Offset: 0

Views

Author

Antti Karttunen, May 09 2005

Keywords

Comments

This map from the multiplicative domain of N to that of GF(2)[X] preserves 'superfactorized' structures, e.g. A106490(n) = A106493(a(n)), A106491(n) = A106494(a(n)), A064372(n) = A106495(a(n)). Shares with A091202 and A106442 the property that maps A000040(n) to A014580(n). Differs from A091202 for the first time at n=32, where A091202(32)=32, while a(32)=128. Differs from A106442 for the first time at n=48, where A106442(48)=192, while a(48)=48. Differs from A106446 for the first time at n=11, where A106446(11)=25, while a(11)=13.

Examples

			a(5) = 7, as 5 is the 3rd prime and the third irreducible GF(2)[X] polynomial x^2+x+1 is encoded as A014580(3) = 7. a(32) = a(2^5) = A048723(A014580(1),a(5)) = A048723(2,7) = 128. a(48) = a(3 * 2^4) = 3 X A048723(2,a(4)) = 3 X A048723(2,4) = 3 X 16 = 48.
		

Crossrefs

Inverse: A106445.

Formula

a(0)=0, a(1)=1, a(p_i) = A014580(i) for primes p_i with index i and for composites n = p_i^e_i * p_j^e_j * p_k^e_k * ..., a(n) = A048723(a(p_i), a(e_i)) X A048723(a(p_j), a(e_j)) X A048723(a(p_k), a(e_k)) X ..., where X stands for carryless multiplication of GF(2)[X] polynomials (A048720) and A048723(n, y) raises the n-th GF(2)[X] polynomial to the y:th power.

A106445 Exponent-recursed cross-domain bijection from GF(2)[X] to N. Variant of A091203 and A106443.

Original entry on oeis.org

0, 1, 2, 3, 4, 9, 6, 5, 8, 15, 18, 7, 12, 11, 10, 27, 16, 81, 30, 13, 36, 25, 14, 33, 24, 17, 22, 45, 20, 21, 54, 19, 512, 57, 162, 55, 60, 23, 26, 63, 72, 29, 50, 51, 28, 135, 66, 31, 48, 35, 34, 19683, 44, 39, 90, 37, 40, 99, 42, 41, 108, 43, 38, 75, 64, 225, 114, 47
Offset: 0

Views

Author

Antti Karttunen, May 09 2005

Keywords

Comments

This map from the multiplicative domain of GF(2)[X] to that of N preserves 'superfactorized' structures, e.g. A106493(n) = A106490(a(n)), A106494(n) = A106491(a(n)), A106495(n) = A064372(a(n)). Shares with A091203 and A106443 the property that maps A014580(n) to A000040(n). Differs from the plain variant A091203 for the first time at n=32, where A091203(32)=32, while a(32)=512. Differs from the variant A106443 for the first time at n=48, where A106443(48)=768, while a(48)=48. Differs from a yet deeper variant A106447 for the first time at n=13, where A106447(13)=23, while a(13)=11.

Examples

			a(5) = 9, as 5 encodes the GF(2)[X] polynomial x^2+1, which is the square of the second irreducible GF(2)[X] polynomial x+1 (encoded as 3) and the square of the second prime is 3^2=9. a(32) = a(A048723(2,5)) = 2^a(5) = 2^9 = 512. a(48) = a(3 X A048723(2,4)) = 3 * 2^a(4) = 3 * 2^4 = 3 * 16 = 48.
		

Crossrefs

Inverse: A106444.

Formula

a(0)=0, a(1)=1. For irreducible GF(2)[X] polynomials ir_i with index i (i.e. A014580(i)), a(ir_i) = A000040(i) and for composite polynomials n = A048723(ir_i, e_i) X A048723(ir_j, e_j) X A048723(ir_k, e_k) X ..., a(n) = a(ir_i)^a(e_i) * a(ir_j)^a(e_j) * a(ir_k)^a(e_k) * ... = A000040(i)^a(e_i) * A000040(j)^a(e_j) * A000040(k)^a(e_k), where X stands for carryless multiplication of GF(2)[X] polynomials (A048720) and A048723(n, y) raises the n-th GF(2)[X] polynomial to the y:th power, while * is the ordinary multiplication and ^ is the ordinary exponentiation.

A106491 Total number of bases and exponents in Quetian Superfactorization of n, including the unity-exponents at the tips of branches.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 09 2005 based on Leroy Quet's message ('Super-Factoring' An Integer) posted to SeqFan-mailing list on Dec 06 2003

Keywords

Examples

			a(64) = 5, as 64 = 2^6 = 2^(2^1*3^1) and there are 5 nodes in that superfactorization. Similarly, for 360 = 2^(3^1) * 3^(2^1) * 5^1 we get a(360) = 8. See comments at A106490.
		

Crossrefs

Programs

Formula

From Antti Karttunen, Mar 23 2017: (Start)
a(1) = 1, and for n > 1, if A028234(n) = 1, a(n) = 1 + a(A067029(n)), otherwise a(n) = 1 + a(A067029(n)) + a(A028234(n)).
If n is a prime power p^k (a term of A000961), a(n) = 1 + a(k).
(End)
Other identities. For all n >= 1:
a(n) = A106490(n) + A064372(n).
a(n) = A106494(A106444(n)).

A106495 Number of leaves in GF(2)[X] superfactorization of n.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 09 2005

Keywords

Crossrefs

a(n) = A064372(A106445(n)). After n=1 differs from A091221 for the first time at n=64, where A091221(64)=1, while a(64)=2.

Formula

a(n) = A106494(n)-A106493(n).

A079553 a(n) = floor( d(n^2) / d(n) ), where d() = A000005.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Jan 24 2003

Keywords

Comments

This sequence and A087802 first differ at term 144: a(144)=3 and A087802(144)=2. This sequence and A064372 first differ at term 64: a(64)=1 and A064372(64)=2. The next difference doesn't appear until a(144)=3 and A064372(144)=2. - Rick L. Shepherd, Mar 07 2004
Differs from A001221 at n=1, 144, 180, 210, 216 etc. - R. J. Mathar, Sep 19 2008

References

  • D. S. Mitrinovic et al., Handbook of Number Theory, Kluwer, p. 41.

Programs

  • Mathematica
    Table[Floor[DivisorSigma[0, n^2]/DivisorSigma[0, n]], {n, 1, 50}] (* G. C. Greubel, May 14 2017 *)
  • PARI
    A079553(n)=floor(numdiv(n^2)/numdiv(n))

A087802 a(n) = Sum_{d|n, d nonprime} mu(d), where mu = A008683.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Oct 11 2003

Keywords

Comments

A064372 and this sequence first differ at term 64: A064372(64)=2 and a(64)=1. - Rick L. Shepherd, Mar 07 2004

Examples

			Divisors of n=42: {1,2,3,6,7,14,21,42}, a(42) = mu(1) + mu(6) + mu(14) + mu(21) + mu(42) = 1+1+1+1-1 = 3.
		

Crossrefs

Cf. A001221, A008683 (mu), A023890, A033273. Different from A079553.

Programs

  • Mathematica
    Table[Total[MoebiusMu[#]&/@Select[Divisors[n],!PrimeQ[#]&]],{n,120}] (* Harvey P. Dale, Oct 14 2014 *)
  • PARI
    A087802(n) = sumdiv(n,d,if(!isprime(d),moebius(d)))

Formula

a(n) = if n=1 then 1, else A001221(n). - Vladeta Jovovic, Oct 17 2003
Showing 1-10 of 12 results. Next