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 10 results.

A345531 Smallest prime power greater than the n-th prime.

Original entry on oeis.org

3, 4, 7, 8, 13, 16, 19, 23, 25, 31, 32, 41, 43, 47, 49, 59, 61, 64, 71, 73, 79, 81, 89, 97, 101, 103, 107, 109, 113, 121, 128, 137, 139, 149, 151, 157, 163, 167, 169, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 243, 256, 263, 269, 271, 277
Offset: 1

Views

Author

Dario T. de Castro, Jun 20 2021

Keywords

Comments

Take the family of correlated prime-indexed conjectures appearing in A343249 - A343253, in which an alternative formula for the p-adic order of positive integers is proposed. There, the general p-indexed conjecture says that v_p(n), the p-adic order of n, is given by the formula: v_p(n) = log_p(n / L_p(k0, n)), where L_p(k0, n) is the lowest common denominator of the elements of the set S_p(k0, n) = {(1/n)*binomial(n, k), with 0 < k <= k0 such that k is not divisible by p}. Evidence suggests that the primality of p is a necessary condition in this general conjecture. So, if a composite number q is used instead of a prime p in the proposed formula for the p-adic (now, q-adic) order of n, the first counterexample (failure) is expected to occur for n = q * a(i), where i is the index of the smallest prime that divides q.
The prime-power a(n) is at most the next prime, so this sequence is strictly increasing. See also A366833. - Gus Wiseman, Nov 06 2024

Examples

			a(4) = 8 because the fourth prime number is 7, and the least power of a prime which is greater than 7 is 2^3 = 8.
		

Crossrefs

Starting with n instead of prime(n): A000015, A031218, A377468, A377780, A377782.
Opposite (greatest prime-power less than): A065514, A377289, A377781.
For squarefree instead of prime-power: A112926, opposite A112925.
The difference from prime(n) is A377281.
The prime terms have indices A377286(n) - 1.
First differences are A377703.
A version for perfect-powers is A378249.
A000961 and A246655 list the prime-powers, differences A057820.
A024619 and A361102 list the non-prime-powers, differences A375735.

Programs

  • Maple
    f:= proc(n) local p,x;
      p:= ithprime(n);
      for x from p+1 do
        if nops(numtheory:-factorset(x)) = 1 then return x fi
      od
    end proc:
    map(f, [$1..100]); # Robert Israel, Aug 25 2024
  • Mathematica
    a[i_]:= Module[{j, k, N = 0, tab={}}, tab = Sort[Drop[DeleteDuplicates[Flatten[Table[ If[Prime[j]^k > Prime[i], Prime[j]^k], {j, 1, i+1}, {k, 1, Floor[Log[Prime[j], Prime[i+1]]]}]]], 1]]; N = Take[tab, 1][[1]]; N];
    tabseq = Table[a[i],{i, 1, 100}];
    (* second program *)
    Table[NestWhile[#+1&,Prime[n]+1, Not@*PrimePowerQ],{n,100}] (* Gus Wiseman, Nov 06 2024 *)
  • PARI
    A000015(n) = for(k=n,oo,if((1==k)||isprimepower(k),return(k)));
    A345531(n) = A000015(1+prime(n)); \\ Antti Karttunen, Jul 19 2021
    
  • Python
    from itertools import count
    from sympy import prime, factorint
    def A345531(n): return next(filter(lambda m:len(factorint(m))<=1, count(prime(n)+1))) # Chai Wah Wu, Oct 25 2024

Formula

a(n) = A000015(1+A000040(n)). - Antti Karttunen, Jul 19 2021
a(n) = A000015(A008864(n)). - Omar E. Pol, Oct 27 2021

A065514 Largest power of a prime < prime(n).

Original entry on oeis.org

1, 2, 4, 5, 9, 11, 16, 17, 19, 27, 29, 32, 37, 41, 43, 49, 53, 59, 64, 67, 71, 73, 81, 83, 89, 97, 101, 103, 107, 109, 125, 128, 131, 137, 139, 149, 151, 157, 163, 169, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 243, 256, 257, 263, 269, 271
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 27 2001

Keywords

Crossrefs

Starting with n instead of prime(n) gives A031218 (A377282, A377782).
The squarefree version is A112925 (A070321, A378038).
The opposite squarefree version is A112926 (A378037, restriction of A067535).
Difference from prime(n) is A377289 (restriction of A276781, opposite A377281).
First differences are A377781.
The nonsquarefree version is A378032 (A377783 (restriction of A378033), A378034, A378040).
The perfect power version is A378035.
A000015 gives the least prime power >= n, differences A377780.
A000040 lists the primes, differences A001223.
A000961 and A246655 list the prime powers, differences A057820.
A024619 and A361102 list the non prime powers, differences A375708 and A375735.
A345531 gives the least prime power > prime(n), differences A377703.
Prime powers between primes: A053607, A080101, A304521, A366833, A377057, A377286.

Programs

  • Mathematica
    lpp[n_]:=Module[{k=n-1},While[!PrimePowerQ[k],k--];k]; Join[{1},Table[ lpp[ n],{n,Prime[Range[2,60]]}]] (* Harvey P. Dale, Nov 24 2018 *)
  • Python
    from sympy import factorint, prime
    def A065514(n): return next(filter(lambda m:len(factorint(m))<=1, range(prime(n)-1,0,-1))) # Chai Wah Wu, Oct 25 2024

Extensions

Name edited (1 is technically not a prime power even though it is a power of a prime) by Gus Wiseman, Dec 03 2024.

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

A378038 First differences of A112925 = greatest squarefree number < prime(n).

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Dec 04 2024

Keywords

Crossrefs

First differences of A112925, restriction of A070321, differences A378085.
For prime powers we have A377781, opposite A377703.
The nonsquarefree opposite is A377784 (differences of A377783), restriction of A378039.
The nonsquarefree version is A378034, first differences of A378032.
The opposite is A378037, differences of A112926.
The unrestricted opposite is A378087, differences of A067535.
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.

Programs

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

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

A378370 Distance between n and the least prime power >= n, allowing 1.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Nov 27 2024

Keywords

Comments

Prime powers allowing 1 are listed by A000961.

Crossrefs

Sequences obtained by adding n to each term are placed in parentheses below.
For prime instead of prime power we have A007920 (A007918), strict A013632.
For perfect power we have A074984 (A377468), opposite A069584 (A081676).
For squarefree we have A081221 (A067535).
The restriction to the prime numbers is A377281 (A345531).
The strict version is A377282 = a(n) + 1.
For non prime power instead of prime power we have A378371 (A378372).
The opposite version is A378457, strict A276781.
A000015 gives the least prime power >= n, opposite A031218.
A000040 lists the primes, differences A001223.
A000961 and A246655 list the prime powers, differences A057820.
A024619 and A361102 list the non prime powers, differences A375708 and A375735.
A151800 gives the least prime > n.
Prime-powers between primes: A053607, A080101, A304521, A366833, A377057.

Programs

  • Mathematica
    Table[NestWhile[#+1&,n,#>1&&!PrimePowerQ[#]&]-n,{n,100}]

Formula

a(n) = A000015(n) - n.
a(n) = A377282(n - 1) - 1 for n > 1.

A377782 First-differences of A031218(n) = greatest number <= n that is 1 or a prime-power.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Nov 16 2024

Keywords

Comments

Note 1 is a power of a prime (A000961) but not a prime-power (A246655).

Crossrefs

Positions of 1 are A006549.
Positions of 0 are A080765 = A024619 - 1, complement A181062 = A000961 - 1.
Positions of 2 are A120432 (except initial terms).
Sorted positions of first appearances appear to include A167236 - 1.
Positions of terms > 1 are A373677.
The restriction to primes minus 1 is A377289.
Below, A (B) indicates that A is the first-differences of B:
- This sequence is A377782 (A031218), which has restriction to primes A065514 (A377781).
- The opposite is A377780 (A000015), restriction A377703 (A345531).
- For nonsquarefree we have A378036 (A378033), opposite A378039 (A120327).
- For squarefree we have A378085 (A112925), restriction A378038 (A070321).
A000040 lists the primes, differences A001223.
A000961 and A246655 list prime-powers, differences A057820.
A024619 lists the non-prime-powers, differences A375735, seconds A376599.
A361102 lists the non-powers of primes, differences A375708.
A378034 gives differences of A378032 (restriction of A378033).
Prime-powers between primes: A053607, A080101, A366833, A377057, A377286, A377287.

Programs

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

A377780 First differences of A000015 (smallest prime-power >= n).

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Nov 13 2024

Keywords

Crossrefs

First differences of A000015, restriction to primes A345531.
The opposite is A377782, restriction to primes A377781, differences of A065514.
For squarefree instead of prime-power see A067535, A112925, A112926, A120327.
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).
A361102 lists the non-powers of primes, differences A375708.
A366833 counts prime-powers between primes.

Programs

  • Mathematica
    Differences[Table[NestWhile[#+1&,n,!PrimePowerQ[#]&],{n,100}]]

A378615 Number of non prime powers <= prime(n).

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 6, 7, 10, 13, 14, 18, 21, 22, 25, 29, 34, 35, 39, 42, 43, 48, 50, 55, 62, 65, 66, 69, 70, 73, 84, 86, 91, 92, 101, 102, 107, 112, 115, 119, 124, 125, 134, 135, 138, 139, 150, 161, 164, 165, 168, 173, 174, 182, 186, 191, 196, 197, 202, 205
Offset: 1

Views

Author

Gus Wiseman, Dec 06 2024

Keywords

Examples

			The non prime powers counted under each term:
  n=1  n=2  n=3  n=4  n=5  n=6  n=7  n=8  n=9  n=10
  -------------------------------------------------
   1    1    1    6   10   12   15   18   22   28
                  1    6   10   14   15   21   26
                       1    6   12   14   20   24
                            1   10   12   18   22
                                 6   10   15   21
                                 1    6   14   20
                                      1   12   18
                                          10   15
                                           6   14
                                           1   12
                                               10
                                                6
                                                1
		

Crossrefs

Restriction of A356068 (first-differences A143731).
First-differences are A368748.
Maxima are A378616.
Other classes of numbers (instead of non prime powers):
- prime: A000027 (diffs A000012), restriction of A000720 (diffs A010051)
- squarefree: A071403 (diffs A373198), restriction of A013928 (diffs A008966)
- nonsquarefree: A378086 (diffs A061399), restriction of A057627 (diffs A107078)
- prime power: A027883 (diffs A366833), restriction of A025528 (diffs A010055)
- composite: A065890 (diffs A046933), restriction of A065855 (diffs A005171)
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.

Programs

  • Mathematica
    Table[Length[Select[Range[Prime[n]],Not@*PrimePowerQ]],{n,100}]
  • Python
    from sympy import prime, primepi, integer_nthroot
    def A378615(n): return int((p:=prime(n))-n-sum(primepi(integer_nthroot(p,k)[0]) for k in range(2,p.bit_length()))) # Chai Wah Wu, Dec 07 2024

Formula

a(n) = prime(n) - A027883(n). - Chai Wah Wu, Dec 08 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}]
Showing 1-10 of 10 results.