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 11-20 of 46 results. Next

A377057 Numbers k such that there is at least one prime-power between prime(k)+1 and prime(k+1)-1.

Original entry on oeis.org

2, 4, 6, 9, 11, 15, 18, 22, 30, 31, 39, 53, 54, 61, 68, 72, 97, 99, 114, 129, 146, 162, 172, 217, 219, 263, 283, 309, 327, 329, 357, 409, 445, 487, 519, 564, 609, 656, 675, 705, 811, 847, 882, 886, 1000, 1028, 1163, 1252, 1294, 1381, 1423, 1457
Offset: 1

Views

Author

Gus Wiseman, Oct 25 2024

Keywords

Examples

			Primes 18 and 19 are 61 and 67, and the interval (62, 63, 64, 65, 66) contains the prime-power 64, so 18 is in the sequence.
		

Crossrefs

The interval from A008864(n) to A006093(n+1) has A046933(n) elements.
For powers of 2 instead of primes see A013597, A014210, A014234, A244508, A304521.
The corresponding primes are A053607.
The nearest prime-power before prime(n)-1 is A065514, difference A377289.
These are the positions of positive terms in A080101, or terms >1 in A366833.
The nearest prime-power after prime(n)+1 is A345531, difference A377281.
For no prime-powers we have A377286.
For exactly one prime-power we have A377287.
For exactly two prime-powers we have A377288, primes A053706.
A000015 gives the least prime-power >= n.
A000040 lists the primes, differences A001223.
A000961 lists the powers of primes, differences A057820.
A031218 gives the greatest prime-power <= n.
A246655 lists the prime-powers not including 1, complement A361102.

Programs

  • Mathematica
    Select[Range[100], Length[Select[Range[Prime[#]+1,Prime[#+1]-1],PrimePowerQ]]>=1&]
  • Python
    from itertools import count, islice
    from sympy import factorint, nextprime
    def A377057_gen(): # generator of terms
        p, q, k = 2, 3, 1
        for k in count(1):
            if any(len(factorint(i))<=1 for i in range(p+1,q)):
                yield k
            p, q = q, nextprime(q)
    A377057_list = list(islice(A377057_gen(),52)) # Chai Wah Wu, Oct 27 2024

Formula

prime(a(n)) = A053607(n).

A378032 a(1) = a(2) = 1; a(n>2) is the greatest nonsquarefree number < prime(n).

Original entry on oeis.org

1, 1, 4, 4, 9, 12, 16, 18, 20, 28, 28, 36, 40, 40, 45, 52, 56, 60, 64, 68, 72, 76, 81, 88, 96, 100, 100, 104, 108, 112, 126, 128, 136, 136, 148, 150, 156, 162, 164, 172, 176, 180, 189, 192, 196, 198, 208, 220, 225, 228, 232, 236, 240, 250, 256, 261, 268, 270
Offset: 1

Views

Author

Gus Wiseman, Nov 16 2024

Keywords

Examples

			The terms together with their prime indices begin:
    1: {}
    1: {}
    4: {1,1}
    4: {1,1}
    9: {2,2}
   12: {1,1,2}
   16: {1,1,1,1}
   18: {1,2,2}
   20: {1,1,3}
   28: {1,1,4}
   28: {1,1,4}
   36: {1,1,2,2}
   40: {1,1,1,3}
   40: {1,1,1,3}
   45: {2,2,3}
   52: {1,1,6}
   56: {1,1,1,4}
   60: {1,1,2,3}
   64: {1,1,1,1,1,1}
   68: {1,1,7}
   72: {1,1,1,2,2}
		

Crossrefs

Terms appearing twice are A061351 + 1.
For prime-powers we have A065514 (diffs A377781), opposite A345531 (diffs A377703).
For squarefree we have A112925 (differences A378038).
The opposite for squarefree is A112926 (differences A378037).
The opposite is A377783 (union A378040), restriction of A120327 (differences A378039).
Restriction of A378033, which has differences A378036.
The first-differences are A378034, opposite A377784.
A000040 lists the primes, differences A001223, seconds A036263.
A005117 lists the squarefree numbers.
A013929 lists the nonsquarefree numbers, differences A078147, seconds A376593.
A061398 counts squarefree numbers between primes (sums A337030), zeros A068360.
A061399 counts nonsquarefree numbers between primes (sums A378086), zeros A068361.
A070321 gives the greatest squarefree number up to n.
A377046 encodes k-differences of nonsquarefree numbers, zeros A377050.

Programs

  • Mathematica
    Table[NestWhile[#-1&,Prime[n],#>1&&SquareFreeQ[#]&],{n,100}]

Formula

a(n) = A378033(prime(n)).

A377434 Numbers k such that there is a unique perfect-power x in the range prime(k) < x < prime(k+1).

Original entry on oeis.org

2, 6, 15, 18, 22, 25, 31, 34, 39, 44, 47, 48, 53, 54, 61, 66, 68, 72, 78, 85, 92, 97, 99, 105, 114, 122, 129, 137, 146, 154, 162, 168, 172, 181, 191, 200, 210, 217, 219, 228, 240, 251, 263, 269, 274, 283, 295, 306, 309, 319, 329, 342, 357, 367, 378, 393, 400
Offset: 1

Views

Author

Gus Wiseman, Nov 02 2024

Keywords

Comments

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

Examples

			Primes 4 and 5 are 7 and 11, and the interval (8,9,10) contains two perfect-powers (8,9), so 4 is not in the sequence.
Primes 5 and 6 are 11 and 13, and the interval (12) contains no perfect-powers, so 5 is not in the sequence.
Primes 6 and 7 are 13 and 17, and the interval (14,15,16) contains just one perfect-power (16), so 6 is in the sequence.
		

Crossrefs

For powers of 2 instead of primes see A013597, A014210, A014234, A244508, A377467.
For prime-powers we have A377287.
For squarefree numbers see A377430, A061398, A377431, A068360.
These are the positions of 1 in A377432.
For no perfect-powers we have A377436.
For more than one perfect-power we have A377466.
A000015 gives the least 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.
A031218 gives the greatest prime-power <= n.
A046933 counts the interval from A008864(n) to A006093(n+1).
A065514 gives the greatest prime-power < prime(n), difference A377289.
A081676 gives the greatest perfect-power <= n.
A131605 lists perfect-powers that are not prime-powers.
A345531 gives the least prime-power > prime(n), difference A377281.
A366833 counts prime-powers between primes, see A053607, A304521.
A377468 gives the least perfect-power > n.

Programs

  • Mathematica
    perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All,2]]>1;
    Select[Range[100],Length[Select[Range[Prime[#]+1,Prime[#+1]-1],perpowQ]]==1&]

A377783 Least nonsquarefree number > prime(n).

Original entry on oeis.org

4, 4, 8, 8, 12, 16, 18, 20, 24, 32, 32, 40, 44, 44, 48, 54, 60, 63, 68, 72, 75, 80, 84, 90, 98, 104, 104, 108, 112, 116, 128, 132, 140, 140, 150, 152, 160, 164, 168, 175, 180, 184, 192, 196, 198, 200, 212, 224, 228, 232, 234, 240, 242, 252, 260, 264, 270, 272
Offset: 1

Views

Author

Gus Wiseman, Nov 16 2024

Keywords

Comments

No term appears more than twice. Proof: This would require at least 4 consecutive squarefree numbers (3 primes and at least 1 squarefree number between them). But we cannot have more than 3 consecutive squarefree numbers, because otherwise one of them must be divisible by 4, hence not squarefree.

Examples

			The third prime is 5, which is followed by 6, 7, 8, 9, ..., of which 8 is the first nonsquarefree term, so a(3) = 8.
The terms together with their prime indices begin:
    4: {1,1}
    4: {1,1}
    8: {1,1,1}
    8: {1,1,1}
   12: {1,1,2}
   16: {1,1,1,1}
   18: {1,2,2}
   20: {1,1,3}
   24: {1,1,1,2}
   32: {1,1,1,1,1}
   32: {1,1,1,1,1}
   40: {1,1,1,3}
   44: {1,1,5}
   44: {1,1,5}
   48: {1,1,1,1,2}
   54: {1,2,2,2}
   60: {1,1,2,3}
   63: {2,2,4}
   68: {1,1,7}
   72: {1,1,1,2,2}
		

Crossrefs

For squarefree we have A112926 (diffs A378037), opposite A112925 (diffs A378038).
Restriction to the primes of A120327, which has first differences A378039.
For prime-power instead of nonsquarefree (and primes + 1) we have A345531.
First differences are A377784.
The opposite is A378032 (diffs A378034), restriction of A378033 (diffs A378036).
The union is A378040.
Terms appearing only once are A378082.
Terms appearing twice are A378083.
Nonsquarefree numbers that are missing are A378084.
A000040 lists the primes, differences A001223, seconds A036263.
A005117 lists the squarefree numbers.
A013929 lists the nonsquarefree numbers, differences A078147, seconds A376593.
A061398 counts squarefree numbers between primes, zeros A068360.
A061399 counts nonsquarefree numbers between primes, zeros A068361.
A070321 gives the greatest squarefree number up to n.

Programs

  • Mathematica
    Table[NestWhile[#+1&,Prime[n],SquareFreeQ],{n,100}]

Formula

a(n) = A120327(prime(n)).

Extensions

Proof suggested by Amiram Eldar.

A377286 Numbers k such that there are no prime-powers between prime(k)+1 and prime(k+1)-1.

Original entry on oeis.org

1, 3, 5, 7, 8, 10, 12, 13, 14, 16, 17, 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 55, 56, 57, 58, 59, 60, 62, 63, 64, 65, 66, 67, 69, 70, 71, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82
Offset: 1

Views

Author

Gus Wiseman, Oct 25 2024

Keywords

Examples

			Primes 18 and 19 are 61 and 67, and the interval (62, 63, 64, 65, 66) contains the prime-power 64, so 18 is not in the sequence.
		

Crossrefs

The interval from A008864(n) to A006093(n+1) has A046933(n) elements.
For powers of 2 instead of primes see A013597, A014210, A014234, A244508, A304521.
The nearest prime-power before prime(n)-1 is A065514, difference A377289.
These are the positions of 0 in A080101, or 1 in A366833.
The nearest prime-power after prime(n)+1 is A345531, difference A377281.
For at least one prime-power we have A377057.
For one instead of no prime-powers we have A377287.
For two instead of no prime-powers we have A377288.
A000015 gives the least prime-power >= n.
A000040 lists the primes, differences A001223.
A000961 lists the powers of primes, differences A057820.
A031218 gives the greatest prime-power <= n.
A246655 lists the prime-powers not including 1, complement A361102.

Programs

  • Mathematica
    Select[Range[100], Length[Select[Range[Prime[#]+1,Prime[#+1]-1],PrimePowerQ]]==0&]
  • Python
    from itertools import count, islice
    from sympy import factorint, nextprime
    def A377286_gen(): # generator of terms
        p, q, k = 2, 3, 1
        for k in count(1):
            if all(len(factorint(i))>1 for i in range(p+1,q)):
                yield k
            p, q = q, nextprime(q)
    A377286_list = list(islice(A377286_gen(),66)) # Chai Wah Wu, Oct 27 2024

A378036 First differences of A378033 (greatest positive integer < n that is 1 or nonsquarefree).

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Nov 18 2024

Keywords

Crossrefs

Positions of 0 are A005117 - 1, complement A013929 - 1.
Sums for squarefree numbers are A070321 (restriction A112925).
The restricted opposite is A377784, differences of A377783 (union A378040).
First-differences of A378033.
The restriction is A378034, differences of A378032.
The restricted opposite for squarefree is A378037, differences of A112926.
The opposite is A378039, differences of A120327 (union A162966).
For squarefree numbers we have A378085, restriction A378038.
The opposite for squarefree is A378087, differences of A067535.
A000040 lists the primes, differences A001223, seconds A036263.
A005117 lists the squarefree numbers, differences A076259, seconds A376590.
A013929 lists the nonsquarefree numbers, differences A078147, seconds A376593.
A061398 counts squarefree numbers between primes (sums A337030), zeros A068360.
A061399 counts nonsquarefree numbers between primes (sums A378086), zeros A068361.
A377046 encodes k-differences of nonsquarefree numbers, zeros A377050.

Programs

  • Mathematica
    Differences[Table[NestWhile[#-1&,n,#>1&&SquareFreeQ[#]&],{n,100}]]
  • PARI
    A378033(n) = if(n<=3, 1, forstep(k=n, 0, -1, if(!issquarefree(k), return(k))));
    A378036(n) = (A378033(1+n)-A378033(n)); \\ Antti Karttunen, Jan 28 2025

Formula

a(prime(n)) = A378034(n).

Extensions

Data section extended to a(107) by Antti Karttunen, Jan 28 2025

A378034 First-differences of A378032 (greatest number < prime(n) that is 1 or nonsquarefree).

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Nov 18 2024

Keywords

Crossrefs

Positions of 0 are A068361.
The opposite for prime-powers is A377703, differences of A345531.
For prime-powers we have A377781, differences of A065514.
The opposite is A377784, differences of A377783 (union A378040).
First-differences of A378032.
Restriction of A378036, differences of A378033.
The opposite for squarefree numbers is A378037, differences of A112926.
For squarefree numbers we have A378038, differences of A112925.
The unrestricted opposite is A378039, differences of A120327 (union A162966).
A000040 lists the primes, differences A001223, seconds A036263.
A005117 lists the squarefree numbers.
A013929 lists the nonsquarefree numbers, differences A078147, seconds A376593.
A061398 counts squarefree numbers between primes (sums A337030), zeros A068360.
A061399 counts nonsquarefree numbers between primes (sums A378086), zeros A068361.
A070321 gives the greatest squarefree number up to n.
A377046 encodes k-differences of nonsquarefree numbers, zeros A377050.

Programs

  • Mathematica
    Differences[Table[NestWhile[#-1&,Prime[n],#>1&&SquareFreeQ[#]&],{n,100}]]

Formula

a(n) = A378036(prime(n)).

A377283 Nonnegative integers k such that either k = 0 or there is a perfect power x in the range prime(k) < x < prime(k+1).

Original entry on oeis.org

0, 2, 4, 6, 9, 11, 15, 18, 22, 25, 30, 31, 34, 39, 44, 47, 48, 53, 54, 61, 66, 68, 72, 78, 85, 92, 97, 99, 105, 114, 122, 129, 137, 146, 154, 162, 168, 172, 181, 191, 200, 210, 217, 219, 228, 240, 251, 263, 269, 274, 283, 295, 306, 309, 319, 327, 329, 342, 357
Offset: 1

Views

Author

Gus Wiseman, Nov 21 2024

Keywords

Comments

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

Examples

			The first number-line below shows the perfect powers. The second shows each positive integer k at position prime(k).
-1-----4-------8-9------------16----------------25--27--------32------36----
===1=2===3===4=======5===6=======7===8=======9==========10==11==========12==
		

Crossrefs

A version for prime powers is A377057, exclusive A377287.
A version for squarefree numbers is A377431.
Positions of positive terms in A377432 (counts perfect powers between primes).
The case of a unique choice is A377434 (a subset).
The complement (no choices) is A377436.
The case of at least two choices is A377466 (a subset).
Positions of last appearances in A378249.
First-differences are A378251.
This is A378365 - 1, union of A378356 - 1.
A000040 lists the primes, differences A001223.
A000961 lists the powers of primes, differences A057820.
A001597 lists the perfect powers, differences A053289.
A007916 lists the non perfect powers, differences A375706.
A069623 counts perfect powers <= n.
A076411 counts perfect powers < n.
A131605 lists perfect powers that are not prime powers.

Programs

  • Mathematica
    perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All,2]]>1;
    Select[Range[0,100],#==0||Length[Select[Range[Prime[#]+1,Prime[#+1]-1],perpowQ]]>0&]

A377288 Numbers k such that there are exactly two prime-powers between prime(k)+1 and prime(k+1)-1.

Original entry on oeis.org

4, 9, 30, 327, 3512
Offset: 1

Views

Author

Gus Wiseman, Oct 25 2024

Keywords

Comments

Is this sequence finite? For this conjecture see A053706, A080101, A366833.
Any further terms are > 10^12. - Lucas A. Brown, Nov 08 2024

Examples

			Primes 9 and 10 are 23 and 29, and the interval (24, 25, 26, 27, 28) contains the prime-powers 25 and 27, so 9 is in the sequence.
		

Crossrefs

The interval from A008864(n) to A006093(n+1) has A046933 elements.
For powers of 2 instead of primes see A013597, A014210, A014234, A244508, A304521.
The corresponding primes are A053706.
The nearest prime-power before prime(n)-1 is A065514, difference A377289.
The nearest prime-power after prime(n)+1 is A345531, difference A377281.
These are the positions of 2 in A080101, or 3 in A366833.
For at least one prime-power we have A377057, primes A053607.
For no prime-powers we have A377286.
For exactly one prime-power we have A377287.
For squarefree instead of prime-power see A377430, A061398, A377431, A068360.
A000015 gives the least prime-power >= n.
A000040 lists the primes, differences A001223.
A000961 lists the powers of primes, differences A057820.
A031218 gives the greatest prime-power <= n.
A246655 lists the prime-powers not including 1, complement A361102.

Programs

  • Mathematica
    Select[Range[100], Length[Select[Range[Prime[#]+1,Prime[#+1]-1],PrimePowerQ]]==2&]

Formula

prime(a(n)) = A053706(n).

A378035 Greatest perfect power < prime(n).

Original entry on oeis.org

1, 1, 4, 4, 9, 9, 16, 16, 16, 27, 27, 36, 36, 36, 36, 49, 49, 49, 64, 64, 64, 64, 81, 81, 81, 100, 100, 100, 100, 100, 125, 128, 128, 128, 144, 144, 144, 144, 144, 169, 169, 169, 169, 169, 196, 196, 196, 216, 225, 225, 225, 225, 225, 243, 256, 256, 256, 256
Offset: 1

Views

Author

Gus Wiseman, Nov 23 2024

Keywords

Comments

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

Examples

			The first number line below shows the perfect powers.
The second shows each positive integer k at position prime(k).
-1-----4-------8-9------------16----------------25--27--------32------36----
===1=2===3===4=======5===6=======7===8=======9==========10==11==========12==
		

Crossrefs

Restriction of A081676 to the primes.
Positions of last appearances are also A377283.
A version for squarefree numbers is A378032.
The opposite is A378249 (run lengths A378251), restriction of A377468 to the primes.
The union is A378253.
Terms appearing exactly once are A378355.
Run lengths are A378356, first differences of A377283, complement A377436.
A000040 lists the primes, differences A001223.
A000961 lists the powers of primes, differences A057820.
A001597 lists the perfect powers, differences A053289.
A007916 lists the nonperfect powers, differences A375706.
A069623 counts perfect powers <= n.
A076411 counts perfect powers < n.
A080769 counts primes between perfect powers, prime powers A067871.
A131605 lists perfect powers that are not prime powers.
A377432 counts perfect powers between primes, zeros A377436, postpositives A377466.

Programs

  • Mathematica
    radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1;
    Table[NestWhile[#-1&,Prime[n],radQ[#]&],{n,100}]
  • PARI
    a(n) = my(k=prime(n)-1); while (!(ispower(k) || (k==1)), k--); k; \\ Michel Marcus, Nov 25 2024
    
  • Python
    from sympy import mobius, integer_nthroot, prime
    def A378035(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(x-1+sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(2,x.bit_length())))
        m = (p:=prime(n)-1)-f(p)
        return bisection(lambda x:f(x)+m,m,m) # Chai Wah Wu, Nov 25 2024
Previous Showing 11-20 of 46 results. Next