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 31-40 of 46 results. Next

A304491 Last or deepest exponent in the power-tower for n.

Original entry on oeis.org

1, 2, 3, 2, 5, 6, 7, 3, 2, 10, 11, 12, 13, 14, 15, 2, 17, 18, 19, 20, 21, 22, 23, 24, 2, 26, 3, 28, 29, 30, 31, 5, 33, 34, 35, 2, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 2, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 6, 65, 66, 67, 68, 69
Offset: 1

Views

Author

Gus Wiseman, May 13 2018

Keywords

Comments

Let {c(i)} = A007916 denote the sequence of numbers > 1 which are not perfect powers. Every positive integer n has a unique representation as a tower n = c(x_1)^c(x_2)^c(x_3)^...^c(x_k), where the exponents are nested from the right. Then a(n) = c(x_k).

Examples

			We have 16 = 2^2^2, so a(16) = 2.
We have 64 = 2^6, so a(64) = 6.
We have 81 = 3^2^2, so a(81) = 2.
We have 256 = 2^2^3, so a(256) = 3.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=If[n==1,1,With[{g=GCD@@FactorInteger[n][[All,2]]},If[g==1,n,a[g]]]];
    Array[a,100]
  • PARI
    a(n)={my(t=n); while(t, n=t; t=ispower(t)); n} \\ Andrew Howroyd, Aug 26 2018

Formula

a(n) = A007916(A278028(n, A288636(n))).

A304495 Decapitate the power-tower for n, i.e., remove the last (deepest) exponent.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, May 13 2018

Keywords

Comments

a(1) = 0 by convention.
Let {c(i)} = A007916 denote the sequence of numbers > 1 which are not perfect powers. Every positive integer n has a unique representation as a tower n = c(x_1)^c(x_2)^c(x_3)^...^c(x_k), where the exponents are nested from the right. Then a(n) = c(x_1)^c(x_2)^c(x_3)^...^c(x_{k-1}).

Examples

			We have 64 = 2^6, so a(64) = 2.
We have 216 = 6^3, so a(216) = 6.
We have 256 = 2^2^3, so a(256) = 2^2 = 4.
		

Crossrefs

Programs

  • Mathematica
    tow[n_]:=If[n==1,{},With[{g=GCD@@FactorInteger[n][[All,2]]},If[g===1,{n},Prepend[tow[g],n^(1/g)]]]];
    Table[If[n==1,0,Power@@Most[tow[n]]],{n,100}]
  • PARI
    A304495(n) = if(1==n,0,my(e, r, tow = List([])); while((e = ispower(n,,&r)) > 1, listput(tow, r); n = e;); n = 1; while(length(tow)>0, e = tow[#tow]; listpop(tow); n = e^n;); (n)); \\ Antti Karttunen, Jul 23 2018

Formula

a(m) <> 1 if m is a perfect power (A001597). - Michel Marcus, Jul 23 2018

Extensions

Name edited and more terms from Antti Karttunen, Jul 23 2018

A327399 Number of factorizations of n that are constant or whose distinct factors are pairwise coprime.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Sep 22 2019

Keywords

Comments

First differs from A327400 at A327400(24) = 4, a(24) = 3.
From Jianing Song, Jun 09 2025: (Start)
Let n = (p_1)^(e_1) * ... * (p_r)^(e_r), then a(n) is the number of partitions of the multiset formed by e_1 1's, e_2 2's, ..., e_r r's such that each pair of parts is either equal or nonintersecting. Let's call such a partition a (e_1,...,e_r)-partition of {1,2,...,r}.
Note that every (e_1,...,e_r)-partition has a base partition by removing duplicates of parts and elements in each part (e.g., {{1,2,2},{1,2,2},{3,3},{4}} -> {{1,2},{3},{4}}), and the base partition is itself a partition on {1,2,...,r}. Since the number of partitions into identical parts of the multiset formed by e_{i_1} (i_1)'s, ..., e_{i_k} (i_k)'s is d(gcd(e_{i_1},...,e_{i_k})), where d = A000005, the number of (e_1,...,e_r)-partitions having base partition P of {1,2,...,r} is Product_{S in P} d(gcd_{i in S} (e_i)). As a result, the number (e_1,...,e_r)-partitions is Sum_{P is a partition of {1,2,...,r}} Product_{S in P} d(gcd_{i in S} (e_i)).
Examples:
# of e_1-partitions = d(e_1);
# of (e_1,e_2)-partitions = d(gcd(e_1,e_2)) + d(e_1)*d(e_2);
# of (e_1,e_2,e_3)-partitions = d(gcd(e_1,e_2,e_3)) + d(gcd(e_1,e_2))*d(e_3) + d(gcd(e_1,e_3))*d(e_2) + d(gcd(e_2,e_3))*d(e_1) + d(e_1)*d(e_2)*d(e_3);
# of (e_1,e_2,e_3,e_4)-partitions = d(gcd(e_1,e_2,e_3,e_4)) + (d(gcd(e_1,e_2,e_3))*d(e_4) + ...) + (d(gcd(e_1,e_2))*d(gcd(e_3,e_4)) + ...) + (d(gcd(e_1,e_2))*d(e_3)*d(e_4) + ...) + d(e_1)*d(e_2)*d(e_3)*d(e_4).
(End)

Examples

			The a(90) = 7 factorizations together with the corresponding multiset partitions of {1,2,2,3}:
  (2*3*3*5)  {{1},{2},{2},{3}}
  (2*5*9)    {{1},{3},{2,2}}
  (2*45)     {{1},{2,2,3}}
  (3*3*10)   {{2},{2},{1,3}}
  (5*18)     {{3},{1,2,2}}
  (9*10)     {{2,2},{1,3}}
  (90)       {{1,2,2,3}}
		

Crossrefs

Constant factorizations are A089723.
Partitions whose distinct parts are pairwise coprime are A304709.
Factorizations that are constant or relatively prime are A327400.
See link for additional cross-references.

Programs

  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    Table[Length[Select[facs[n],Length[Union[#]]==1||CoprimeQ@@Union[#]&]],{n,100}]

Formula

a(n) = A327695(n) + A089723(n).

A382691 Alternating sum of the characteristic functions of k-th powers, with k >= 2: characteristic function of squares - c.f. of cubes + c.f. of 4th powers - ... .

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, -1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0
Offset: 1

Views

Author

Friedjof Tellkamp, Apr 05 2025

Keywords

Examples

			n:           1, 2, 3, 4, 5, 6, 7, 8, 9, ...
Squares (+): 1, 0, 0, 1, 0, 0, 0, 0, 1, ... (A010052)
Cubes   (-): 1, 0, 0, 0, 0, 0, 0, 1, 0, ... (A010057)
...
Sum:         0, 0, 0, 1, 0, 0, 0,-1, 1, ... (= this sequence).
		

Crossrefs

Cf. A089723 (nonalternating, k>=1), A259362 (nonalternating, k>=2).

Programs

  • Mathematica
    Table[Sum[(-1)^k Boole[IntegerQ[n^(1/k)]], {k, 2, Floor[Log[2, n]]}], {n, 1, 100}]
  • PARI
    a(n) = sum(i=2, logint(n,2), (-1)^i*ispower(n, i)); \\ Michel Marcus, Apr 11 2025

Formula

a(n) = A010052(n) - A010057(n) + A374016(n) - (...).
Sum_{i=1..n} a(i) = A381042(n).
G.f.: Sum_{j>=1, k>=2} (-1)^k * x^(j^k).
Sum_{n>=1} a(n)/n = 1/2.
Dirichlet g.f.: Sum_{k>=2} (-1)^k * zeta(k*s) = Sum_{k>=1} (zeta(2*k*s) - zeta((2*k+1)*s)).

A178638 a(n) is the number of divisors d of n such that d^k is not equal to n for any k >= 1.

Original entry on oeis.org

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

Views

Author

Jaroslav Krizek, Dec 25 2010

Keywords

Examples

			For n = 16, set of such divisors is {1, 8}; a(16) = 2.
		

Crossrefs

Programs

  • Mathematica
    Table[DivisorSum[n, 1 &, If[# > 1, #^IntegerExponent[n, #], 1] != n &], {n, 100}] (* Michael De Vlieger, May 27 2017 *)
  • PARI
    A286561(n,k) = if(1==k, 1, valuation(n, k));
    A178638(n) = sumdiv(n,d,if((d^A286561(n,d))<>n,1,0)); \\ Antti Karttunen, May 26 - 27 2017
    
  • PARI
    a(n) = if(n==1, return(0)); my(f=factor(n), g = f[1, 2]); for(i=2, matsize(f)[1], g=gcd(g, f[i, 2])); numdiv(n) - numdiv(g) \\ David A. Corneth, May 27 2017

Formula

a(n) = A000005(n) - A089723(n).
a(1) = 0, a(p) = 1, a(pq) = 3, a(pq...z) = 2^k-1, a(p^k) = k+1-A000005(k), for p, q = primes, k = natural numbers, pq...z = product of k (k > 2) distinct primes p, q, ..., z.

A304492 Position in the sequence of numbers that are not perfect powers (A007916) of the last or deepest exponent in the power-tower for n.

Original entry on oeis.org

1, 2, 3, 2, 4, 5, 6, 3, 2, 7, 8, 9, 10, 11, 12, 2, 13, 14, 15, 16, 17, 18, 19, 20, 2, 21, 3, 22, 23, 24, 25, 4, 26, 27, 28, 2, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 2, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 5, 55, 56, 57, 58, 59, 60
Offset: 1

Views

Author

Gus Wiseman, May 13 2018

Keywords

Comments

Let {c(i)} = A007916 denote the sequence of numbers > 1 which are not perfect powers. Every positive integer n has a unique representation as a tower n = c(x_1)^c(x_2)^c(x_3)^...^c(x_k), where the exponents are nested from the right. Then a(n) = x_k.

Crossrefs

Programs

  • Mathematica
    nn=100;
    a[n_]:=If[n==1,1,With[{g=GCD@@FactorInteger[n][[All,2]]},If[g==1,n,a[g]]]];
    rads=Union[Array[a,nn]];
    Table[a[n],{n,nn}]/.Table[rads[[i]]->i,{i,Length[rads]}]

Formula

a(n) = A278028(n, A288636(n)).

A326037 Heinz numbers of uniform perfect integer partitions.

Original entry on oeis.org

1, 2, 4, 6, 8, 16, 32, 42, 64, 100, 128, 256, 512, 798, 1024, 2048, 2744, 4096, 8192, 16384, 32768, 42294, 52900, 65536
Offset: 1

Views

Author

Gus Wiseman, Jun 04 2019

Keywords

Comments

The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).
An integer partition of n is uniform if all parts appear with the same multiplicity, and perfect if every nonnegative integer up to n is the sum of a unique submultiset.
The enumeration of these partitions by sum is given by A089723.

Examples

			The sequence of all uniform perfect integer partitions together with their Heinz numbers begins:
      1: ()
      2: (1)
      4: (11)
      6: (21)
      8: (111)
     16: (1111)
     32: (11111)
     42: (421)
     64: (111111)
    100: (3311)
    128: (1111111)
    256: (11111111)
    512: (111111111)
    798: (8421)
   1024: (1111111111)
   2048: (11111111111)
   2744: (444111)
   4096: (111111111111)
   8192: (1111111111111)
  16384: (11111111111111)
		

Crossrefs

Programs

  • Mathematica
    hwt[n_]:=Total[Cases[FactorInteger[n],{p_,k_}:>PrimePi[p]*k]];
    Select[Range[1000],SameQ@@Last/@FactorInteger[#]&&Sort[hwt/@Divisors[#]]==Range[0,hwt[#]]&]

Formula

Intersection of A072774 (uniform), A299702 (knapsack), and A325781 (complete).

A327400 Number of factorizations of n that are constant or whose factors are relatively prime.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Sep 22 2019

Keywords

Comments

First differs from A327399 at a(24) = 4, A327399(24) = 3.

Examples

			The factorizations of 2, 4, 12, 24, 30, 36, 48, and 60 that are constant or whose factors are relatively prime:
  2   4     12      24        30      36        48          60
      2*2   3*4     3*8       5*6     4*9       3*16        3*20
            2*2*3   2*3*4     2*15    6*6       2*3*8       4*15
                    2*2*2*3   3*10    2*2*9     3*4*4       5*12
                              2*3*5   2*3*6     2*2*3*4     2*5*6
                                      3*3*4     2*2*2*2*3   3*4*5
                                      2*2*3*3               2*2*15
                                                            2*3*10
                                                            2*2*3*5
		

Crossrefs

Constant factorizations are A089723.

Programs

  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    Table[Length[Select[facs[n],#=={}||Length[Union[#]]==1||GCD@@#==1&]],{n,100}]

Formula

a(n) = A281116(n) + A089723(n).

A352493 Number of non-constant integer partitions of n into prime parts with prime multiplicities.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 3, 0, 1, 4, 5, 3, 1, 3, 5, 7, 3, 5, 6, 8, 8, 11, 7, 6, 8, 15, 14, 14, 10, 15, 17, 21, 18, 23, 20, 28, 25, 31, 27, 35, 32, 33, 37, 46, 41, 50, 45, 58, 56, 63, 59, 78, 69, 76, 81, 85, 80, 103, 107, 111, 114, 127
Offset: 0

Views

Author

Gus Wiseman, Mar 24 2022

Keywords

Examples

			The a(n) partitions for selected n (B = 11):
n = 10    16       19        20         25          28
   ---------------------------------------------------------------
    3322  5533     55333     7733       77722       BB33
          55222    55522     77222      5533333     BB222
          3322222  3333322   553322     5553322     775522
                   33322222  5522222    55333222    55533322
                             332222222  55522222    772222222
                                        333333322   3322222222222
                                        3333322222
		

Crossrefs

Constant partitions are counted by A001221, ranked by A000961.
Non-constant partitions are counted by A144300, ranked A024619.
The constant version is A230595, ranked by A352519.
This is the non-constant case of A351982, ranked by A346068.
These partitions are ranked by A352518.
A000040 lists the primes.
A000607 counts partitions into primes, ranked by A076610.
A001597 lists perfect powers, complement A007916.
A038499 counts partitions of prime length.
A053810 lists primes to primes.
A055923 counts partitions with prime multiplicities, ranked by A056166.
A257994 counts prime indices that are themselves prime.
A339218 counts powerful partitions into prime parts, ranked by A352492.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], !SameQ@@#&&And@@PrimeQ/@#&& And@@PrimeQ/@Length/@Split[#]&]],{n,0,30}]

A175081 Values taken by the sum of perfect divisors of n (A175067) sorted into ascending order.

Original entry on oeis.org

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

Views

Author

Jaroslav Krizek, Jan 24 2010

Keywords

Comments

Perfect divisor of n is divisor d such that d^k = n for some k >= 1. See A089723 (number of perfect divisors of n) and A175067 (sum of perfect divisors of n).
Previous Showing 31-40 of 46 results. Next