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

A303707 Number of factorizations of n using elements of A007916 (numbers that are not perfect powers).

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Apr 29 2018

Keywords

Comments

First differs from A081707 at a(60) = 9, A081707(60) = 8.

Examples

			The a(60) = 9 factorizations are (2*2*3*5), (2*2*15), (2*3*10), (2*5*6), (2*30), (3*20), (5*12), (6*10), (60).
		

Crossrefs

Programs

  • Mathematica
    radQ[n_]:=Or[n===1,GCD@@FactorInteger[n][[All,2]]===1];
    facsr[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facsr[n/d],Min@@#>=d&]],{d,Select[Rest[Divisors[n]],radQ]}]];
    Table[Length[facsr[n]],{n,100}]

Formula

Dirichlet g.f.: Product_{n in A007916} 1/(1 - n^s).

A376562 Second differences of consecutive non-perfect-powers (A007916). First differences of A375706.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Oct 01 2024

Keywords

Comments

Non-perfect-powers (A007916) are numbers without a proper integer root.

Examples

			The non-perfect powers (A007916) are:
  2, 3, 5, 6, 7, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24, 26, 28, ...
with first differences (A375706):
  1, 2, 1, 1, 3, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, ...
with first differences (A376562):
  1, -1, 0, 2, -2, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 1, -1, 0, ...
		

Crossrefs

The version for A000002 is A376604, first differences of A054354.
For first differences we had A375706, ones A375740, complement A375714.
Positions of zeros are A376588, complement A376589.
Runs of non-perfect-powers:
- length: A375702 = A053289(n+1) - 1
- first: A375703 (same as A216765 with 2 exceptions)
- last: A375704 (same as A045542 with 8 removed)
- sum: A375705
A000961 lists prime-powers inclusive, exclusive A246655.
A007916 lists non-perfect-powers, complement A001597.
A112344 counts integer partitions into perfect-powers, factorizations A294068.
A333254 gives run-lengths of differences between consecutive primes.
For non-perfect-powers: A375706 (first differences), A376588 (inflections and undulations), A376589 (nonzero curvature).
For second differences: A036263 (prime), A073445 (composite), A376559 (perfect-power), A376590 (squarefree), A376593 (nonsquarefree), A376596 (prime-power inclusive), A376599 (non-prime-power inclusive).

Programs

  • Mathematica
    radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1;
    Differences[Select[Range[100],radQ],2]
  • Python
    from itertools import count
    from sympy import mobius, integer_nthroot, perfect_power
    def A376562(n):
        def f(x): return int(n+1-sum(mobius(k)*(integer_nthroot(x, k)[0]-1) for k in range(2, x.bit_length())))
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        r = m+((k:=next(i for i in count(1) if not perfect_power(m+i)))<<1)
        return next(i for i in count(1-k) if not perfect_power(r+i)) # Chai Wah Wu, Oct 02 2024

A277562 Numbers of the form c(x_1)^c(x_2)^...^c(x_k) where each c(i) = A007916(i) is a non-perfect-power, k >= 2, and the exponents are nested from the right.

Original entry on oeis.org

16, 81, 256, 512, 625, 1296, 2401, 6561, 10000, 14641, 19683, 20736, 28561, 38416, 50625, 65536, 83521, 104976, 130321, 160000, 194481, 234256, 279841, 331776, 390625, 456976, 614656, 707281, 810000, 923521, 1185921, 1336336, 1500625, 1679616, 1874161, 1953125, 2085136, 2313441, 2560000, 2825761, 3111696, 3418801
Offset: 1

Views

Author

Gus Wiseman, Oct 19 2016

Keywords

Comments

Non-perfect-powers, or NPPs (A007916), are numbers whose prime multiplicities are relatively prime. As discussed in A007916, the expansion of a positive integer into a tower of NPPs is unique and always possible. 65536=2^2^2^2 is the smallest number that requires a tower of height more than 3.

Examples

			       16 = 2^2^2        81 = 3^2^2       256 = 2^2^3       512 = 2^3^2
      625 = 5^2^2      1296 = 6^2^2      2401 = 7^2^2      6561 = 3^2^3
    10000 = 10^2^2    14641 = 11^2^2    19683 = 3^3^2     20736 = 12^2^2
    28561 = 13^2^2    38416 = 14^2^2    50625 = 15^2^2
    65536 = 2^2^2^2   83521 = 17^2^2   104976 = 18^2^2   130321 = 19^2^2
   160000 = 20^2^2   194481 = 21^2^2   234256 = 22^2^2   279841 = 23^2^2
   331776 = 24^2^2   390625 = 5^2^3    456976 = 26^2^2   614656 = 28^2^2
   707281 = 29^2^2   810000 = 30^2^2   923521 = 31^2^2  1185921 = 33^2^2
  1336336 = 34^2^2  1500625 = 35^2^2  1679616 = 6^2^3   1874161 = 37^2^2
  1953125 = 5^3^2   2085136 = 38^2^2  2313441 = 39^2^2  2560000 = 40^2^2
  2825761 = 41^2^2  3111696 = 42^2^2  3418801 = 43^2^2  3748096 = 44^2^2
  4100625 = 45^2^2  4477456 = 46^2^2  4879681 = 47^2^2  5308416 = 48^2^2
  5764801 = 7^2^3   6250000 = 50^2^2  6765201 = 51^2^2  7311616 = 52^2^2
  7890481 = 53^2^2  8503056 = 54^2^2  9150625 = 55^2^2  9834496 = 56^2^2
		

Crossrefs

Cf. A007916, A001597, A164336, A164337, A106490 (Quetian Superfactorization).

Programs

  • Mathematica
    radicalQ[1]:=False;
    radicalQ[n_]:=SameQ[GCD@@FactorInteger[n][[All,2]],1];
    hyperfactor[1]:={};
    hyperfactor[n_?radicalQ]:={n};
    hyperfactor[n_]:=With[{g=GCD@@FactorInteger[n][[All,2]]},Prepend[hyperfactor[g],Product[Apply[Power[#1,#2/g]&,r],{r,FactorInteger[n]}]]];
    Select[Range[10^6],Length[hyperfactor[#]]>2&]

Extensions

Edited by N. J. A. Sloane, Nov 09 2016
Offset changed to 1 by David A. Corneth, Apr 30 2024

A278028 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. The sequence is an irregular triangle read by rows, where the n-th row lists x_1, ..., x_k.

Original entry on oeis.org

1, 2, 1, 1, 3, 4, 5, 1, 2, 2, 1, 6, 7, 8, 9, 10, 11, 1, 1, 1, 12, 13, 14, 15, 16, 17, 18, 19, 3, 1, 20, 2, 2, 21, 22, 23, 24, 1, 3, 25, 26, 27, 4, 1, 28, 29, 30, 31
Offset: 1

Views

Author

N. J. A. Sloane, Nov 09 2016

Keywords

Comments

Row lengths are A288636(n). - Gus Wiseman, Jun 12 2017

Examples

			Rows 2 through 32 are:
1,
2,
1, 1,
3,
4,
5,
1, 2,
2, 1,
6,
7,
8,
9,
10,
11,
1, 1, 1,
12,
13,
14,
15,
16,
17,
18,
19,
3, 1,
20,
2, 2,
21,
22,
23,
24,
1, 3,
...
		

Crossrefs

See A277564 for another version.

A375740 Numbers k such that A007916(k+1) - A007916(k) = 1. In other words, the k-th non-perfect-power is 1 less than the next.

Original entry on oeis.org

1, 3, 4, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 21, 22, 23, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 70, 71, 72, 73, 74, 75, 76, 77
Offset: 1

Views

Author

Gus Wiseman, Sep 10 2024

Keywords

Comments

Positions in A007916 of numbers k such that k+1 is also a member.
Positions of 1's in A375706 (first differences of A007916).
Non-perfect-powers (A007916) are numbers with no proper integer roots.

Examples

			The non-perfect-powers are 2, 3, 5, 6, 7, 10, 11, 12, 13, ... which increase by one after positions 1, 3, 4, 6, ...
		

Crossrefs

The version for non-prime-powers is A375713, differences A373672.
The complement is A375714, differences A375702.
The version for prime-powers is A375734, differences A373671.
The complement for non-prime-powers is A375928, differences A110969.
A000040 lists the prime numbers, differences A001223.
A000961 lists prime-powers (inclusive), differences A057820.
A001597 lists perfect-powers, differences A053289.
A002808 lists the composite numbers, differences A073783.
A018252 lists the nonprime numbers, differences A065310.
Non-perfect-powers:
- terms: A007916
- differences: A375706
- anti-runs: A375737, A375738, A375739, A375736.
Non-prime-powers (exclusive):
- terms: A361102
- differences: A375708
- anti-runs: A373679, A373575, A255346, A373672

Programs

  • Mathematica
    radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1;
    Join@@Position[Differences[Select[Range[100],radQ]],1]
  • Python
    from itertools import count, islice
    from sympy import perfect_power
    def A375740_gen(): # generator of terms
        a, b = -1, 0
        for n in count(2):
            c = not perfect_power(n)
            if c:
                a += 1
            if b&c:
                yield a
        b = c
    A375740_list = list(islice(A375740_gen(), 52)) # Chai Wah Wu, Sep 11 2024

A153158 a(n) = A007916(n)^2.

Original entry on oeis.org

4, 9, 25, 36, 49, 100, 121, 144, 169, 196, 225, 289, 324, 361, 400, 441, 484, 529, 576, 676, 784, 841, 900, 961, 1089, 1156, 1225, 1369, 1444, 1521, 1600, 1681, 1764, 1849, 1936, 2025, 2116, 2209, 2304, 2500, 2601, 2704, 2809, 2916, 3025, 3136, 3249, 3364, 3481
Offset: 1

Views

Author

Keywords

Comments

A378168(n) is the number of terms <= 10^n. - Chai Wah Wu, Nov 21 2024

Examples

			2^2 = 4, 3^2 = 9, 4^2 = 16 = 2^4 is not in the sequence, 5^2 = 25, 6^2 = 36, ...
		

Crossrefs

Programs

  • Haskell
    a153158 n = a153158_list !! (n-1)
    a153158_list = filter ((== 2) . foldl1 gcd . a124010_row) [2..]
    -- Reinhard Zumkeller, Apr 13 2012
    
  • Maple
    q:= n-> is(igcd(seq(i[2], i=ifactors(n)[2]))=2):
    select(q, [i^2$i=2..60])[];  # Alois P. Heinz, Nov 26 2024
  • Mathematica
    Select[Range[2,100],GCD@@Last/@FactorInteger@#==1&]^2
  • Python
    from sympy import mobius, integer_nthroot
    def A153158(n):
        def f(x): return int(n+1-sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(2,x.bit_length())))
        m, k = n, f(n)
        while m != k:
            m, k = k, f(k)
        return m**2 # Chai Wah Wu, Aug 13 2024

Formula

GCD(exponents in prime factorization of a(n)) = 2, cf. A124010. - Reinhard Zumkeller, Apr 13 2012
Sum_{n>=1} 1/a(n) = zeta(2) - 1 - Sum_{k>=2} mu(k)*(1 - zeta(2*k)) = 0.5444587396... - Amiram Eldar, Jul 02 2022
Intersection of A000290 and A378287. Squares that are not of the form m^k for some k>=3. - Chai Wah Wu, Nov 21 2024

Extensions

Edited by Ray Chandler, Dec 22 2008

A277564 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. The sequence is an irregular triangle read by rows, where the n-th row lists n followed by x_1, ..., x_k.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Oct 20 2016

Keywords

Comments

The row lengths are A288636(n) + 1. - Gus Wiseman, Jun 12 2017
See A278028 for a version in which row n simply lists x_1, x_2, ..., x_k (omitting the initial n).

Examples

			1 is represented by the empty sequence (), by convention.
Successive rows of the triangle are as follows (c(k) denotes the k-th non-prime-power, A007916(k)):
2, 1,
3, 2,
4, 1, 1,
5, 3,
6, 4, because 6 = c(4)
7, 5,
8, 1, 2, because 8 = 2^3 = c(1)^c(2)
9, 2, 1,
10, 6,
11, 7,
...
16, 1, 1, 1, because 16 = 2^4 = c(1)^4 = c(1)^(c(1)^2) = c[1]^(c[1]^c[1])
17, 12,
...
This sequence represents a bijection N -> Q where Q is the set of all finite sequences of positive integers: 1->(), 2->(1), 3->(2), 4->(1 1), 5->(3), 6->(4), 7->(5), 8->(1 2), 9->(2 1), ...
		

Crossrefs

Programs

  • Maple
    See link.
  • Mathematica
    nn=10000;radicalQ[1]:=False;radicalQ[n_]:=SameQ[GCD@@FactorInteger[n][[All,2]],1];
    hyperfactor[1]:={};hyperfactor[n_?radicalQ]:={n};hyperfactor[n_]:=With[{g=GCD@@FactorInteger[n][[All,2]]},Prepend[hyperfactor[g],Product[Apply[Power[#1,#2/g]&,r],{r,FactorInteger[n]}]]];
    rad[0]:=1;rad[n_?Positive]:=rad[n]=NestWhile[#+1&,rad[n-1]+1,Not[radicalQ[#]]&];Set@@@Array[radPi[rad[#]]==#&,nn];
    Flatten[Join[{#},radPi/@hyperfactor[#]]&/@Range[nn]]

Extensions

Edited by N. J. A. Sloane, Nov 09 2016

A277576 a(1)=1; thereafter a(n) = A007916(a(n-1)).

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 15, 20, 26, 34, 43, 53, 63, 74, 86, 98, 111, 126, 142, 159, 177, 195, 214, 235, 258, 281, 305, 330, 356, 383, 411, 439, 468, 498, 530, 562, 595, 629, 663, 698, 734, 770, 807, 845, 883, 922, 962, 1003, 1045, 1087, 1130, 1174, 1218, 1263, 1309, 1356, 1404, 1453, 1502, 1552, 1603, 1654, 1706, 1759
Offset: 1

Views

Author

Gus Wiseman, Oct 20 2016

Keywords

Comments

Non-perfect-powers (A007916) are numbers such that the exponents in their prime factorizations have GCD equal to 1. For each n we can construct a plane tree by replacing all positive integers at any level with their corresponding planar factorization sequences (A277564), and repeating this replacement until no numbers are left. The result will be a unique "pure" sequence or plane tree. Under this correspondence a(n) is the path tree ((((((...)))))) = string of n consecutive open brackets followed by the same number of closed brackets.

Examples

			The first forty plane trees:
()         11(((((())))))      ((()()()))         (((((((()())))))))
2(())         ((()(())))        ((((()(())))))     (()((())))
3((()))       (((())()))        (((((())()))))     ((((()))()))
(()())       ((((()()))))      ((((((()())))))) 34(((((((((())))))))))
5(((())))   15((((((()))))))    (((()))())         (((())(())))
((()()))     (()()())        26((((((((())))))))) ((()())())
7((((()))))   (((()(()))))      ((())(()))         ((((()()()))))
(()(()))     ((((())())))      (((()()())))       ((((((()(())))))))
((())())     (((((()())))))    (((((()(()))))))   (((((((())()))))))
(((()()))) 20(((((((())))))))  ((((((())())))))   ((((((((()()))))))))
		

Crossrefs

Cf. A007916, A277564, A276625, A004111 (rooted trees), A007097 (rooted paths).

Programs

  • Mathematica
    radicalQ[1]:=False;radicalQ[n_]:=SameQ[GCD@@FactorInteger[n][[All,2]],1];
    rad[0]:=1;rad[n_?Positive]:=rad[n]=NestWhile[#+1&,rad[n-1]+1,Not[radicalQ[#]]&];
    nn=2000;Scan[rad,Range[nn]];NestWhileList[rad,1,#
    				
  • Python
    from itertools import islice
    from sympy import mobius, integer_nthroot
    def A277576_gen(): # generator of terms
        def iterfun(f,n=0):
            m, k = n, f(n)
            while m != k: m, k = k, f(k)
            return m
        def f(x): return int(1-sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(2,x.bit_length())))
        a = 1
        while True:
            yield a
            a = iterfun(lambda x:f(x)+a,a)
    A277576_list = list(islice(A277576_gen(),40)) # Chai Wah Wu, Nov 21 2024

Extensions

Edited by N. J. A. Sloane, Nov 09 2016

A289023 Position in the sequence of numbers that are not perfect powers (A007916) of the smallest positive integer x such that for some positive integer y we have n = x^y (A052410).

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jun 22 2017

Keywords

Comments

Every pair p of positive integers is of the form p = (a(n), A052409(n)) for exactly one n.

Examples

			a(27)=2 because the smallest root of 27 is 3, and 3 is the 2nd entry of A007916.
a(25)=3 because the smallest root of 25 is 5, and 5 is the 3rd entry of A007916.
		

Crossrefs

Programs

  • Mathematica
    nn=100;
    q=Table[Power[n,1/GCD@@FactorInteger[n][[All,2]]],{n,2,nn}];
    q/.Table[Union[q][[i]]->i,{i,Length[Union[q]]}]
  • PARI
    a(n) = if (ispower(n,,&r), x = r, x = n); sum(k=2, x, ispower(k)==0); \\ Michel Marcus, Jul 19 2017

Formula

For n>1 we have a(n) = A278028(n,1).

A303708 Number of aperiodic factorizations of n using elements of A007916 (numbers that are not perfect powers).

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Apr 29 2018

Keywords

Comments

An aperiodic factorization of n is a finite multiset of positive integers greater than 1 whose product is n and whose multiplicities are relatively prime.
The positions of zeros in this sequence are the prime powers A000961.

Examples

			The a(144) = 8 aperiodic factorizations are (2*2*2*3*6), (2*2*2*18), (2*2*3*12), (2*3*24), (2*6*12), (2*72), (3*48) and (6*24). Missing from this list are (12*12), (2*2*6*6) and (2*2*2*2*3*3).
		

Crossrefs

Programs

  • Mathematica
    radQ[n_]:=Or[n===1,GCD@@FactorInteger[n][[All,2]]===1];
    facsr[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facsr[n/d],Min@@#>=d&]],{d,Select[Rest[Divisors[n]],radQ]}]];
    Table[Length[Select[facsr[n],GCD@@Length/@Split[#]===1&]],{n,100}]

Formula

a(n) = Sum_{d in A007916, d|A052409(n)} mu(d) * A303707(n^(1/d)).
Showing 1-10 of 282 results. Next