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 41-44 of 44 results.

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).

A378252 Least prime power > 2^n.

Original entry on oeis.org

2, 3, 5, 9, 17, 37, 67, 131, 257, 521, 1031, 2053, 4099, 8209, 16411, 32771, 65537, 131101, 262147, 524309, 1048583, 2097169, 4194319, 8388617, 16777259, 33554467, 67108879, 134217757, 268435459, 536870923, 1073741827, 2147483659, 4294967311, 8589934609
Offset: 0

Views

Author

Gus Wiseman, Nov 30 2024

Keywords

Comments

Prime powers are listed by A246655.
Conjecture: All terms except 9 are prime. Hence this is the same as A014210 after 9. Confirmed up to n = 1000.

Crossrefs

Subtracting 2^n appears to give A013597 except at term 3.
For prime we have A014210.
For previous we have A014234.
For perfect power we have A357751.
For squarefree we have A372683.
A000015 gives the least prime power >= n.
A000040 lists the primes, differences A001223.
A000961 and A246655 list the prime powers, differences A057820.
A024619 and A361102 list the non prime powers, diffs A375708 and A375735.
A031218 gives the greatest prime power <= n.
A244508 counts prime powers between powers of 2.
Prime powers between primes are counted by A080101 and A366833.

Programs

  • Mathematica
    Table[NestWhile[#+1&,2^n+1,!PrimePowerQ[#]&],{n,0,20}]
  • PARI
    a(n) = my(x=2^n+1); while (!isprimepower(x), x++); x; \\ Michel Marcus, Dec 03 2024
  • Python
    from itertools import count
    from sympy import primefactors
    def A378252(n): return next(i for i in count(1+(1<Chai Wah Wu, Dec 02 2024
    

A378616 Greatest non prime power <= prime(n).

Original entry on oeis.org

1, 1, 1, 6, 10, 12, 15, 18, 22, 28, 30, 36, 40, 42, 46, 52, 58, 60, 66, 70, 72, 78, 82, 88, 96, 100, 102, 106, 108, 112, 126, 130, 136, 138, 148, 150, 156, 162, 166, 172, 178, 180, 190, 192, 196, 198, 210, 222, 226, 228, 232, 238, 240, 250, 255, 262, 268, 270
Offset: 1

Views

Author

Gus Wiseman, Dec 06 2024

Keywords

Comments

Conjecture: Equal to A006093(n) = prime(n) - 1 except at terms of A159611.

Examples

			The first number line below shows the non prime powers. The second shows the primes:
--1-------------6----------10----12----14-15-------18----20-21-22----24--
=====2==3====5=====7==========11====13==========17====19==========23=====
		

Crossrefs

For nonprime instead of non prime power we have A156037.
Restriction of A378367.
Lengths are A378615.
For nonsquarefree: A378032 (diffs A378034), restriction of A378033 (diffs A378036).
A000040 lists the primes, differences A001223
A000961 and A246655 list the prime powers, differences A057820.
A024619 lists the non prime powers, differences A375735, seconds A376599.
A080101 counts prime powers between primes (exclusive), inclusive A366833.
A361102 lists the non powers of primes, differences A375708.
Prime powers between primes:
- A377057 positive
- A377286 zero
- A377287 one
- A377288 two

Programs

  • Mathematica
    Table[Max[Select[Range[Prime[n]],Not@*PrimePowerQ]],{n,100}]

A376163 Positions of adjacent non-prime-powers (inclusive, so 1 is a prime-power) differing by 1.

Original entry on oeis.org

4, 7, 8, 14, 15, 16, 18, 19, 22, 23, 26, 27, 29, 30, 31, 32, 35, 37, 39, 40, 43, 44, 45, 46, 50, 51, 52, 53, 55, 56, 57, 58, 59, 60, 62, 63, 66, 67, 70, 71, 73, 74, 75, 76, 77, 78, 80, 81, 84, 86, 87, 88, 89, 92, 93, 94, 95, 96, 97, 98, 99, 102, 103, 104, 105
Offset: 1

Views

Author

Gus Wiseman, Sep 13 2024

Keywords

Examples

			The non-prime-powers (inclusive) are 6, 10, 12, 14, 15, 18, 20, 21, 22, 24, ... which increase by 1 after positions 4, 7, 8, ...
		

Crossrefs

For prime-powers inclusive (A000961) we have A375734, differences A373671.
For nonprime numbers (A002808) we have A375926, differences A373403.
For prime-powers exclusive (A246655) we have A375734(n+1) + 1.
First differences are A373672.
The exclusive version is a(n) - 1 = A375713.
Positions of 1's in A375735.
For non-perfect-powers we have A375740.
Prime-powers inclusive:
- terms: A000961
- differences: A057820
Non-prime-powers inclusive:
- terms: A361102
- differences: A375708
A000040 lists all of the primes, differences A001223.
A007916 lists non-perfect-powers, differences A375706.

Programs

  • Mathematica
    ce=Select[Range[2,100],!PrimePowerQ[#]&];
    Select[Range[Length[ce]-1],ce[[#+1]]==ce[[#]]+1&]
Previous Showing 41-44 of 44 results.