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 21-27 of 27 results.

A376561 Points of downward concavity in the sequence of perfect-powers (A001597).

Original entry on oeis.org

2, 5, 7, 13, 14, 18, 19, 21, 24, 25, 29, 30, 39, 40, 45, 51, 52, 56, 59, 66, 70, 71, 74, 87, 94, 101, 102, 108, 110, 112, 113, 119, 127, 135, 143, 144, 156, 157, 160, 161, 169, 178, 187, 196, 205, 206, 215, 224, 225, 234, 244, 263, 273, 283, 284, 293, 294, 304
Offset: 1

Views

Author

Gus Wiseman, Sep 30 2024

Keywords

Comments

These are points at which the second differences are negative.
Perfect-powers (A001597) are numbers with a proper integer root.
Note that, for some sources, downward concavity is positive curvature.
From Robert Israel, Oct 31 2024: (Start)
The first case of two consecutive numbers in the sequence is a(4) = 13 and a(5) = 14.
The first case of three consecutive numbers is a(293) = 2735, a(294) = 2736, a(295) = 2737.
The first case of four consecutive numbers, if it exists, involves a(k) with k > 69755. (End)

Examples

			The perfect powers (A001597) are:
  1, 4, 8, 9, 16, 25, 27, 32, 36, 49, 64, 81, 100, 121, 125, 128, 144, 169, 196, ...
with first differences (A053289):
  3, 4, 1, 7, 9, 2, 5, 4, 13, 15, 17, 19, 21, 4, 3, 16, 25, 27, 20, 9, 18, 13, 33, ...
with first differences (A376559):
  1, -3, 6, 2, -7, 3, -1, 9, 2, 2, 2, 2, -17, -1, 13, 9, 2, -7, -11, 9, -5, 20, 2, ...
with negative positions (A376561):
  2, 5, 7, 13, 14, 18, 19, 21, 24, 25, 29, 30, 39, 40, 45, 51, 52, 56, 59, 66, 70, ...
		

Crossrefs

The version for A000002 is A025505, complement A022297. See also A054354, A376604.
For first differences we have A053289, union A023055, firsts A376268, A376519.
For primes instead of perfect-powers we have A258026.
For upward concavity we have A376560 (probably the complement).
A000961 lists the prime-powers inclusive, exclusive A246655.
A001597 lists the perfect-powers.
A007916 lists the non-perfect-powers.
A112344 counts partitions into perfect-powers, factorizations A294068.
A333254 gives run-lengths of differences between consecutive primes.
Second differences: A036263 (prime), A073445 (composite), A376559 (perfect-power), A376562 (non-perfect-power), A376590 (squarefree), A376593 (nonsquarefree), A376596 (prime-power), A376599 (non-prime-power).

Programs

  • Maple
    N:= 10^6: # to use perfect powers <= N
    P:= {seq(seq(i^m,i=2..floor(N^(1/m))), m=2 .. ilog2(N))}: nP:= nops(P):
    P:= sort(convert(P,list)):
    select(i -> 2*P[i] > P[i-1]+P[i+1], [$2..nP-1]); # Robert Israel, Oct 31 2024
  • Mathematica
    perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All,2]]>1;
    Join@@Position[Sign[Differences[Select[Range[1000],perpowQ],2]],-1]

A377702 Perfect-powers except for powers of 2.

Original entry on oeis.org

9, 25, 27, 36, 49, 81, 100, 121, 125, 144, 169, 196, 216, 225, 243, 289, 324, 343, 361, 400, 441, 484, 529, 576, 625, 676, 729, 784, 841, 900, 961, 1000, 1089, 1156, 1225, 1296, 1331, 1369, 1444, 1521, 1600, 1681, 1728, 1764, 1849, 1936, 2025, 2116, 2187, 2197
Offset: 1

Views

Author

Gus Wiseman, Nov 05 2024

Keywords

Comments

Perfect-powers (A001597) are numbers with a proper integer root, complement A007916.

Examples

			The terms together with their prime indices begin:
     9: {2,2}
    25: {3,3}
    27: {2,2,2}
    36: {1,1,2,2}
    49: {4,4}
    81: {2,2,2,2}
   100: {1,1,3,3}
   121: {5,5}
   125: {3,3,3}
   144: {1,1,1,1,2,2}
   169: {6,6}
   196: {1,1,4,4}
   216: {1,1,1,2,2,2}
   225: {2,2,3,3}
   243: {2,2,2,2,2}
   289: {7,7}
   324: {1,1,2,2,2,2}
		

Crossrefs

Including the powers of 2 gives A001597, counted by A377435.
For prime-powers we have A061345.
These terms are counted by A377467, for non-perfect-powers A377701.
A000961 lists the powers of primes, differences A057820.
A001597 lists the perfect-powers, differences A053289, seconds A376559.
A007916 lists the non-perfect-powers, differences A375706, seconds A376562.
A081676 gives the greatest perfect-power <= n.
A131605 lists perfect-powers that are not prime-powers.
A188951 counts perfect-powers less than 2^n.
A377468 gives the least perfect-power > n.

Programs

  • Mathematica
    Select[Range[1000],GCD@@FactorInteger[#][[All,2]]>1&&!IntegerQ[Log[2,#]]&]
  • Python
    from sympy import mobius, integer_nthroot
    def A377702(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return int(n-2+x+(l:=x.bit_length())+sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(2,l)))
        return bisection(f,n+1,n+1) # Chai Wah Wu, Nov 06 2024

A377433 Number of non-perfect-powers x in the range prime(n) < x < prime(n+1).

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Nov 02 2024

Keywords

Comments

Non-perfect-powers (A007916) are numbers without a proper integer root.
Positions of terms > 1 appear to be A049579.

Examples

			Between prime(4) = 7 and prime(5) = 11 the only non-perfect-power is 10, so a(4) = 1.
		

Crossrefs

Positions of 1 are latter terms of A029707.
Positions of terms > 1 appear to be A049579.
For prime-powers instead of non-perfect-powers we have A080101.
For non-prime-powers instead of non-perfect-powers we have A368748.
Perfect-powers in the same range are counted by A377432.
A000040 lists the primes, differences A001223.
A000961 lists the powers of primes, differences A057820.
A001597 lists the perfect-powers, differences A053289, seconds A376559.
A007916 lists the non-perfect-powers, differences A375706.
A065514 gives the greatest prime-power < prime(n), difference A377289.
A081676 gives the greatest perfect-power <= n.
A246655 lists the prime-powers not including 1, complement A361102.
A366833 counts prime-powers between primes, see A053706, A053607, A304521, A377286.
A377468 gives the least perfect-power > n.

Programs

  • Mathematica
    radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1;
    Table[Length[Select[Range[Prime[n]+1, Prime[n+1]-1],radQ]],{n,100}]

Formula

a(n) + A377432(n) = A046933(n) = prime(n+1) - prime(n) - 1.

A377701 Number of non-perfect-powers x in the range 2^n < x < 2^(n+1).

Original entry on oeis.org

0, 1, 3, 6, 13, 29, 59, 121, 248, 501, 1008, 2024, 4064, 8150, 16323, 32686, 65418, 130906, 261913, 523966, 1048123, 2096517, 4193412, 8387355, 16775449, 33551945, 67105359, 134212792, 268428497, 536861096, 1073727974, 2147464110, 4294939718, 8589895659
Offset: 0

Views

Author

Gus Wiseman, Nov 05 2024

Keywords

Comments

Non-perfect-powers (A007916) are numbers without a proper integer root.
Also the number of non-perfect-powers with n bits.

Examples

			The non-perfect-powers in each range (rows):
   .
   3
   5  6  7
  10 11 12 13 14 15
  17 18 19 20 21 22 23 24 26 28 29 30 31
Their binary expansions (columns):
  .  11  101  1010  10001
         110  1011  10010
         111  1100  10011
              1101  10100
              1110  10101
              1111  10110
                    10111
                    11000
                    11010
                    11100
                    11101
                    11110
                    11111
		

Crossrefs

The union of all numbers counted is A007916.
For squarefree numbers we have A077643.
For prime-powers we have A244508.
For primes instead of powers of 2 we have A377433, ones A029707.
For perfect-powers we have A377467, for primes A377432, zeros A377436.
A000225(n) counts the interval from A000051(n) to A000225(n+1).
A000961 lists the powers of primes, differences A057820.
A001597 lists the perfect-powers, differences A053289, seconds A376559.
A007916 lists the non-perfect-powers, differences A375706, seconds A376562.
A081676 gives the greatest perfect-power <= n.
A131605 lists perfect-powers that are not prime-powers.
A377468 gives the least perfect-power > n.

Programs

  • Mathematica
    radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1;
    Table[Length[Select[Range[2^n+1, 2^(n+1)-1],radQ]],{n,0,15}]
  • Python
    from sympy import mobius, integer_nthroot
    def A377701(n):
        def f(x): return int(x-1+sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(2,x.bit_length())))
        return f((1<Chai Wah Wu, Nov 06 2024

Formula

a(n) = 2^n-1-A377467(n). - Pontus von Brömssen, Nov 06 2024

Extensions

Offset corrected by, and a(16)-a(33) from Pontus von Brömssen, Nov 06 2024

A376656 Sorted positions of first appearances in the second differences (A036263) of consecutive primes (A000040).

Original entry on oeis.org

1, 2, 3, 4, 9, 10, 29, 30, 33, 34, 96, 98, 99, 154, 179, 180, 189, 216, 217, 242, 262, 294, 296, 428, 429, 446, 708, 756, 834, 1005, 1182, 1229, 1663, 1830, 1831, 1846, 1879, 2191, 2224, 2343, 2809, 3077, 3086, 3384, 3385, 3427, 3643, 3644, 3793, 3795, 4230
Offset: 1

Views

Author

Gus Wiseman, Oct 07 2024

Keywords

Comments

The prime numbers are (A000040):
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, ...
with first differences (A001223):
1, 2, 2, 4, 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 6, 6, 2, 6, 4, 2, 6, 4, 6, 8, 4, 2, ...
with second differences (A036263):
1, 0, 2, -2, 2, -2, 2, 2, -4, 4, -2, -2, 2, 2, 0, -4, 4, -2, -2, 4, -2, 2, 2, ...
with sorted first appearances at (A376656):
1, 2, 3, 4, 9, 10, 29, 30, 33, 34, 96, 98, 99, 154, 179, 180, 189, 216, 217, ...

Crossrefs

These are the sorted positions of first appearances in A036263.
For first differences we had A373400(n) + 1, except initial terms.
For prime-powers instead of prime numbers we have A376653/A376654.
For squarefree instead of prime numbers we have A376655, sorted firsts of A376590.
A000040 lists the prime numbers, differences A001223.
A005117 lists squarefree numbers, complement A013929 (differences A078147).
A333254 lists run-lengths of differences between consecutive primes.
For second differences: A073445 (composite), A376559 (perfect-power), A376562 (non-perfect-power), A376593 (nonsquarefree), A376596 (prime-power inclusive), A376599 (non-prime-power inclusive).

Programs

  • Mathematica
    q=Differences[Select[Range[1000],PrimeQ],2];
    Select[Range[Length[q]],!MemberQ[Take[q,#-1],q[[#]]]&]

A377043 The n-th perfect-power A001597(n) minus the n-th power of a prime A000961(n).

Original entry on oeis.org

0, 2, 5, 5, 11, 18, 19, 23, 25, 36, 48, 64, 81, 98, 100, 101, 115, 138, 164, 179, 184, 200, 209, 240, 271, 284, 300, 336, 374, 413, 439, 450, 495, 542, 587, 632, 683, 738, 793, 852, 887, 903, 964, 1029, 1097, 1165, 1194, 1230, 1295, 1370, 1443, 1518, 1561
Offset: 1

Views

Author

Gus Wiseman, Oct 25 2024

Keywords

Comments

Perfect-powers (A001597) are numbers with a proper integer root.

Crossrefs

Excluding 1 from the powers of primes gives A377044.
A000015 gives the least prime-power >= n.
A031218 gives the greatest prime-power <= n.
A000040 lists the primes, differences A001223.
A000961 lists the powers of primes, differences A057820.
A001597 lists the perfect-powers, differences A053289, seconds A376559.
A007916 lists the non-perfect-powers, differences A375706, seconds A376562.
A024619 lists the non-prime-powers, differences A375735, seconds A376599.
A025475 lists numbers that are both a perfect-power and a prime-power.
A080101 counts prime-powers between primes (exclusive).
A106543 lists numbers that are neither a perfect-power nor a prime-power.
A131605 lists perfect-powers that are not prime-powers.
A246655 lists the prime-powers, complement A361102 (differences A375708).
Prime-power runs: A373675, min A373673, max A373674, length A174965.
Prime-power antiruns: A373576, min A120430, max A006549, length A373671.

Programs

  • Mathematica
    perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All,2]]>1;
    per=Select[Range[1000],perpowQ];
    per-NestList[NestWhile[#+1&,#+1,!PrimePowerQ[#]&]&,1,Length[per]-1]
  • Python
    from sympy import mobius, primepi, integer_nthroot
    def A377043(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return int(n-1+x+sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(2,x.bit_length())))
        def g(x): return int(n-1+x-sum(primepi(integer_nthroot(x,k)[0]) for k in range(1,x.bit_length())))
        return bisection(f,n,n)-bisection(g,n,n) # Chai Wah Wu, Oct 27 2024

Formula

a(n) = A001597(n) - A000961(n).

A377044 The n-th perfect-power A001597(n) minus the n-th prime-power A246655(n).

Original entry on oeis.org

-1, 1, 4, 4, 9, 17, 18, 21, 23, 33, 47, 62, 77, 96, 98, 99, 113, 137, 159, 175, 182, 196, 207, 236, 265, 282, 297, 333, 370, 411, 433, 448, 493, 536, 579, 628, 681, 734, 791, 848, 879, 899, 962, 1028, 1094, 1159, 1192, 1220, 1293, 1364, 1437, 1514, 1559, 1591
Offset: 1

Views

Author

Gus Wiseman, Oct 25 2024

Keywords

Comments

Perfect-powers (A001597) are numbers with a proper integer root.

Crossrefs

Including 1 with the prime-powers gives A377043.
A000015 gives the least prime-power >= n.
A000040 lists the primes, differences A001223.
A000961 lists the powers of primes, differences A057820, A093555, A376596.
A001597 lists the perfect-powers, differences A053289, seconds A376559.
A007916 lists the non-perfect-powers, differences A375706, seconds A376562.
A024619 lists the non-prime-powers, differences A375735, seconds A376599.
A025475 lists numbers that are both a perfect-power and a prime-power.
A031218 gives the greatest prime-power <= n.
A080101 counts prime-powers between primes (exclusive).
A106543 lists numbers that are neither a perfect-power nor a prime-power.
A131605 lists perfect-powers that are not prime-powers.
A246655 lists the prime-powers, complement A361102, A375708.
Prime-power runs: A373675, min A373673, max A373674, length A174965.
Prime-power antiruns: A373576, min A120430, max A006549, length A373671.

Programs

  • Mathematica
    perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All,2]]>1;
    per=Select[Range[1000],perpowQ];
    per-NestList[NestWhile[#+1&, #+1,!PrimePowerQ[#]&]&,2,Length[per]-1]
  • Python
    from sympy import mobius, primepi, integer_nthroot
    def A377044(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return int(n-1+x+sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(2,x.bit_length())))
        def g(x): return int(n+x-sum(primepi(integer_nthroot(x,k)[0]) for k in range(1,x.bit_length())))
        return bisection(f,n,n)-bisection(g,n,n) # Chai Wah Wu, Oct 27 2024

Formula

a(n) = A001597(n) - A246655(n).
Previous Showing 21-27 of 27 results.