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

A327818 Square array read by ascending antidiagonals: T(n,m) is the number of irreducible factors in the factorization of the m-th cyclotomic polynomial over GF(k), k = A246655(n) (counted with multiplicity).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 4, 2, 1, 4, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 2, 1, 4, 6, 1, 1, 1, 2, 1, 2, 1, 6, 2, 2, 1, 1, 1, 1, 2, 2, 4, 2, 6, 2, 1, 2, 2, 2, 1, 1, 1, 2, 1, 1, 2, 4, 2, 4, 2, 2, 1
Offset: 1

Views

Author

Jianing Song, Sep 26 2019

Keywords

Comments

T(n,m) = 1 if and only if (let k = A246655(n)):
(a) gcd(m,k) = 1, and k is a primitive root modulo m;
(b) k is a power of 2, m == 2 (mod 4), and k is a primitive root modulo m/2.
As a result, T(n,m) > 1 if at least one of the following holds:
(i) There is no primitive root modulo m, that is, m is in A033949;
(ii) k is a square number and m > 2.
If p = A246655(n) is prime, then T(n,m) is also the number of irreducible factors in the factorization of the ideal (p) in Z[zeta_m], zeta_m = exp(2*Pi*i/m). Actually, if the m-th cyclotomic polynomial factors as Product_{i=1..T(n,m)} F_i(x) over GF(p), then the factorization of (p) in Z[zeta_m] is (p) = Product_{i=1..T(n,m)} (p,F_i(zeta_m)). As a result, p remains inert in Q(zeta_m) <=> T(n,m) = 1. See Page 47-48, Proposition 8.3 and Page 61-62, Proposition 10.3 of the Neukirch link for a proof. - Jianing Song, Sep 13 2022

Examples

			Table starts
  n  A246655(n)  m=1  2  3  4  5  6  7  8  9  10
  1       2       1   1  1  2  1  1  2  4  1   1
  2       3       1   1  2  1  1  2  1  2  6   1
  3       4       1   1  2  2  2  2  2  4  2   2
  4       5       1   1  1  2  4  1  1  2  1   4
  5       7       1   1  2  1  1  2  6  2  2   1
  6       8       1   1  1  2  1  1  6  4  3   1
  7       9       1   1  2  2  2  2  2  4  6   2
  8      11       1   1  1  1  4  1  2  2  1   4
		

Crossrefs

Programs

  • Mathematica
    T[max_] := Module[{pp = Select[Range[max], PrimePowerQ], m, t}, m = Length[pp]; t[i_, j_] := Module[{p = FactorInteger[pp[[j]]][[1, 1]]}, EulerPhi[i] / MultiplicativeOrder[pp[[j]], i/p^IntegerExponent[i, p]]]; Table[t[j, i - j + 1], {i, 1, m}, {j, 1, i}] // Flatten]; T[24] (* Amiram Eldar, Jul 21 2024 *)
  • PARI
    f(k,m) = if(isprimepower(k), my(p=factor(k)[1,1], s=m/p^valuation(m,p)); eulerphi(m)/znorder(Mod(k,s)))
    A246655(n) = my(i=0); for(t=1, oo, if(isprimepower(t), i++); if(i==n, return(t)))
    a(n,m) = f(A246655(n),m)

Formula

Let m = p^e*s, where p is the prime factor of k = A246655(n), gcd(p,s) = 1, then T(n,m) = phi(m)/ord(k,s), where phi = A000010, ord(k,s) is the multiplicative order of k modulo s. Proof:
(a) First consider the case e = 0. Let F be the algebraic closure of GF(k), then Phi_s(x) = 0 has solutions in F, where Phi_s(x) is the s-th cyclotomic polynomial. Let a be any of the solution.
In F, a belongs to GF(k^d) <=> a^(k^d-1) = 1 <=> s|(k^d-1) (note that in F, s is the smallest integer such that a^s = 1). As a result, a belongs to GF(k^ord(k,s)) but not to GF(k^d) for any d < ord(k,s), that is to say, a has algebraic degree ord(k,s) over GF(k). Because a is any of the roots of Phi_s(x) in F, every irreducible factor of Phi_s(x) over GF(k) is of degree ord(k,s), so the number of irreducible factors is phi(s)/ord(k,s);
(b) If e > 0, we can see from the Moebius inversion formula such that Phi_m(x) = (Phi_s(x))^phi(p^e), that the number of irreducible factors is phi(m)/ord(k,s).
The Introduction part in Page 2 and Lemma 1 in Page 3 of Hongfeng Wu's paper (see Links section) also mentions part (a) of this result.

A379155 Numbers k such that there is a unique prime between the k-th and (k+1)-th prime powers (A246655).

Original entry on oeis.org

2, 3, 5, 7, 9, 10, 13, 15, 17, 18, 22, 23, 26, 27, 31, 32, 40, 42, 43, 44, 52, 53, 67, 68, 69, 70, 77, 78, 85, 86, 90, 91, 116, 117, 119, 120, 135, 136, 151, 152, 169, 170, 186, 187, 197, 198, 243, 244, 246, 247, 291, 292, 312, 313, 339, 340, 358, 360, 362
Offset: 1

Views

Author

Gus Wiseman, Dec 22 2024

Keywords

Comments

Numbers k such that exactly one of A246655(k) and A246655(k+1) is prime. - Robert Israel, Jan 22 2025
The prime powers themselves are: 3, 4, 7, 9, 13, 16, 23, 27, 31, 32, 47, 49, 61, 64, ...

Examples

			The 4th and 5th prime powers are 5 and 7, with interval (5,6,7) containing two primes, so 4 is not in the sequence.
The 13th and 14th prime powers are 23 and 25, with interval (23,24,25) containing only one prime, so 13 is in the sequence.
The 18th and 19th prime powers are 32 and 37, with interval (32,33,34,35,36,37) containing just one prime 37, so 18 is in the sequence.
		

Crossrefs

These are the positions of 1 in A366835, for perfect powers A080769.
For perfect powers instead of prime powers we have A378368.
For no primes we have A379156, for perfect powers A274605.
The prime powers themselves are A379157, for previous A175106.
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.
A065514 gives the greatest prime power < prime(n), difference A377289.
A246655 lists the prime powers.
A366833 counts prime powers between primes, see A053607, A304521.

Programs

  • Maple
    N:= 1000: # for terms k where A246655(k+1) <+ N
    P:= select(isprime,[2,seq(i,i=3..N,2)]):
    S:= convert(P,set):
    for p in P while p^2 <= N do
      S:= S union {seq(p^j,j=2..ilog[p](N))}
    od:
    PP:= sort(convert(S,list)):
    state:= 1: Res:= NULL:
    ip:= 2:
    for i from 2 to nops(PP) do
      if PP[i] = P[ip] then
        if state = 0 then Res:= Res,i-1 fi;
        state:= 1;
        ip:= ip+1;
      else
        if state = 1 then Res:= Res,i-1 fi;
        state:= 0;
      fi
    od:
    Res; # Robert Israel, Jan 22 2025
  • Mathematica
    v=Select[Range[100],PrimePowerQ];
    Select[Range[Length[v]-1],Length[Select[Range[v[[#]],v[[#+1]]],PrimeQ]]==1&]

Formula

A246655(a(n)) = A379157(n).

A137827 Prime powers (A246655) congruent to 1 (mod 3).

Original entry on oeis.org

4, 7, 13, 16, 19, 25, 31, 37, 43, 49, 61, 64, 67, 73, 79, 97, 103, 109, 121, 127, 139, 151, 157, 163, 169, 181, 193, 199, 211, 223, 229, 241, 256, 271, 277, 283, 289, 307, 313, 331, 337, 343, 349, 361, 367, 373, 379, 397, 409, 421, 433, 439, 457, 463, 487, 499
Offset: 1

Views

Author

Eric W. Weisstein, Feb 12 2008

Keywords

Comments

Numbers k not being powers of 3 such that x^2 + x + 1 (or x^2 - x + 1) is reducible over GF(k). - Jianing Song, Sep 24 2019

Crossrefs

Row 3 of A354940 (conjectured).
Intersection of A016777 and A246655.
Cf. A354982 (characteristic function), A354984 (terms * 3).
Cf. also A327752, A327753.

Programs

  • Mathematica
    Select[ Range[4, 500], (Mod[#, 3] == 1 && Mod[#, # - EulerPhi[#]] == 0)& ] (* Jean-François Alcover, Oct 26 2012 *)
  • PARI
    isok(n) = isprimepower(n) && ((n % 3) == 1); \\ Michel Marcus, Sep 24 2019

A320698 Numbers whose product of prime indices is a prime power (A246655).

Original entry on oeis.org

3, 5, 6, 7, 9, 10, 11, 12, 14, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27, 28, 31, 34, 36, 38, 40, 41, 42, 44, 46, 48, 49, 50, 53, 54, 56, 57, 59, 62, 63, 67, 68, 72, 76, 80, 81, 82, 83, 84, 88, 92, 96, 97, 98, 100, 103, 106, 108, 109, 112, 114, 115, 118, 121, 124
Offset: 1

Views

Author

Gus Wiseman, Oct 19 2018

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
Also numbers whose prime indices are all powers of a common prime number.

Examples

			The sequence of all integer partitions whose Heinz numbers belong to the sequence begins: (2), (3), (1,2), (4), (2,2), (1,3), (5), (1,1,2), (1,4), (7), (1,2,2), (8), (1,1,3), (2,4), (1,5), (9), (1,1,1,2), (3,3), (2,2,2), (1,1,4), (11), (1,7), (1,1,2,2), (1,8), (1,1,1,3), (13), (1,2,4), (1,1,5), (1,9), (1,1,1,1,2), (4,4), (1,3,3), (16), (1,2,2,2), (1,1,1,4), (2,8).
		

Crossrefs

Programs

  • Mathematica
    Select[Range[100],PrimePowerQ[Times@@Cases[FactorInteger[#],{p_,k_}:>PrimePi[p]^k]]&]
  • PARI
    is(n) = my(f=factor(n)[, 1]~, p=1); for(k=1, #f, p=p*primepi(f[k])); isprimepower(p) \\ Felix Fröhlich, Oct 20 2018

A379156 Positions in A246655 (prime powers) of terms q such that there is no prime between q and the next prime power.

Original entry on oeis.org

6, 14, 41, 359, 3589
Offset: 1

Views

Author

Gus Wiseman, Dec 22 2024

Keywords

Comments

The powers of primes themselves are 8, 25, 121, 2187, 32761, ... (A068315).

Crossrefs

The prime powers themselves are A068315, for just one prime A379157.
For perfect powers instead of prime powers we have A274605.
Positions of 0 in A366835.
For just one prime we have A379155, for perfect powers A378368.
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.
A065514 gives the greatest prime power < prime(n), difference A377289.
A131605 finds perfect powers that are not prime powers.
A246655 lists the prime powers.
A366833 counts prime powers between primes, see A053607, A304521.

Programs

  • Mathematica
    v=Select[Range[100],PrimePowerQ];
    Select[Range[Length[v]-1],FreeQ[Range[v[[#]],v[[#+1]]],_?PrimeQ]&]

Formula

A246655(a(n)) = A068315(n).

A380414 a(n) = phi(2 + phi(3 + phi(4 + ... + phi(A246655(n))))), where phi is Euler's totient function (A000010).

Original entry on oeis.org

1, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 8, 6, 4, 8, 8, 4, 8, 4, 4, 4, 4, 8, 4, 4, 6, 4, 4, 4, 4, 4, 4, 4, 4, 6, 4, 4, 4, 4, 4, 8, 4, 4, 4, 6, 4, 8, 8, 4, 4, 8, 4, 8, 8, 4, 4, 8, 4, 4, 4, 4, 4, 4, 8, 6, 4, 8, 4, 4, 8, 4, 8, 8, 4, 4, 8, 4, 4, 6, 4, 4, 8, 4, 4, 4, 4, 4, 8
Offset: 1

Views

Author

Paolo Xausa, Jan 24 2025

Keywords

Comments

Inspired by A380340, A380341 and A380342.
Conjecture 1: a(n) can be only 1, 2, 4, 6 or 8.
Conjecture 2: for n >= 1110, a(n) = 4.

Crossrefs

Programs

  • Mathematica
    With[{pp = Select[Range[1000], PrimePowerQ]}, Table[Fold[EulerPhi[#2 + #] &, 0, pp[[n ;; 1 ;; -1]]], {n, Length[pp]}]]

A385198 The number of integers k from 1 to n such that the greatest divisor of k that is a unitary divisor of n is a prime power (A246655).

Original entry on oeis.org

0, 1, 1, 1, 1, 3, 1, 1, 1, 5, 1, 5, 1, 7, 6, 1, 1, 9, 1, 7, 8, 11, 1, 9, 1, 13, 1, 9, 1, 14, 1, 1, 12, 17, 10, 11, 1, 19, 14, 11, 1, 20, 1, 13, 12, 23, 1, 17, 1, 25, 18, 15, 1, 27, 14, 13, 20, 29, 1, 26, 1, 31, 14, 1, 16, 32, 1, 19, 24, 34, 1, 15, 1, 37, 26, 21
Offset: 1

Views

Author

Amiram Eldar, Jun 21 2025

Keywords

Examples

			For n = 6, the greatest divisor of k that is a unitary divisor of 6 for k = 1 to 6 is 1, 2, 3, 2, 1 and 6, respectively. 3 of the values are prime powers, and therefore a(6) = 3.
		

Crossrefs

The unitary analog of A116512.
The number of integers k from 1 to n such that the greatest divisor of k that is a unitary divisor of n is: A047994 (1), A384048 (squarefree), A384049 (cubefree), A384050 (powerful), A384051 (cubefull), A384052 (square), A384053 (cube), A384054 (exponentially odd), A384055 (odd), A384056 (power of 2), A384057 (3-smooth), A384058 (5-rough), A385195 (1 or 2), A385196 (prime), A385197 (noncomposite), this sequence (prime power), A385199 (1 or prime power).

Programs

  • Mathematica
    f[p_, e_] := p^e - 1; a[1] = 0; a[n_] := Module[{fct = FactorInteger[n]}, (Times @@ f @@@ fct)*(Total[1/f @@@ fct])]; Array[a, 100]
  • PARI
    a(n) = {my(f = factor(n)); prod(i = 1, #f~, f[i,1]^f[i,2]-1) * sum(i = 1, #f~, 1/(f[i,1]^f[i,2] - 1));}

Formula

The unitary convolution of A047994 (the unitary totient phi) with A069513 (the characteristic function of prime powers): a(n) = Sum_{d | n, gcd(d, n/d) == 1} A047994(d) * A069513(n/d).
a(n) = uphi(n) * Sum_{p^e || n} (1/(p^e-1)), where uphi = A047994, and p^e || n denotes that the prime power p^e unitarily divides n (i.e., p^e divides n but p^(e+1) does not divide n).
a(n) = A385199(n) - A047994(n).
Sum_{k=1..n} a(k) ~ c * n^2 / 2, where c = c1 * c2 = 0.26256423811374124133..., c1 = Product_{p prime}(1 - 1/(p*(p+1))) = A065463, and c2 = Sum_{p prime}(1/(p^2+p-1)) = 0.37272644617447080939... .

A005525 Maximal number of rational points on a curve of genus 2 over GF(q), where q = A246655(n) is the n-th prime power > 1.

Original entry on oeis.org

6, 8, 10, 12, 16, 18, 20, 24, 26, 33, 32, 36, 42, 46, 48, 50, 52, 53, 60, 66, 68, 74, 78, 82, 90, 92, 97, 100, 104, 106, 114, 118, 120, 126, 136, 140, 144, 148, 150, 156, 166, 170, 172, 172, 176, 184, 186, 198, 200, 206, 214, 218, 222, 226, 232, 234, 246, 248, 252, 256, 268, 282
Offset: 1

Views

Author

Keywords

Comments

The successive values of q are 2, 3, 4, 5, 7, 8, 9, 11, 13, 16, 17, 19, 23, ... (see A246655).

Examples

			a(2) = 8 because 8 is the maximal number of rational points on a genus 2 curve over GF(3). One example of such a maximal curve is the genus 2 curve y^2 = x^6 + 2*x^2 + 1 which consists of the rational points (x,y) = (0, 1), (0, 2), (1, 1), (1, 2), (1, 1), (1, 2), and two points at infinity. - _Robin Visser_, Aug 03 2023
		

References

  • J. W. P. Hirschfeld, Linear codes and algebraic curves, pp. 35-53 of F. C. Holroyd and R. J. Wilson, editors, Geometrical Combinatorics. Pitman, Boston, 1984. See N_q(2) on page 51.
  • J.-P. Serre, Oeuvres, vol. 3, pp. 658-663 and 664-669.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A005523.

Programs

  • Sage
    for q in range(1, 1000):
        if Integer(q).is_prime_power():
            p = Integer(q).prime_factors()[0]
            if q==4: print(10)
            elif q==9: print(20)
            elif (Integer(q).is_square()): print(q + 1 + 4*sqrt(q))
            elif ((floor(2*sqrt(q))%p == 0) or (q-1).is_square()
                or (4*q-3).is_square() or (4*q-7).is_square()):
                if (frac(2*sqrt(q)) > ((sqrt(5)-1)/2)):  print(q + 2*floor(2*sqrt(q)))
                else:  print(q + 2*floor(2*sqrt(q)) - 1)
            else:  print(q + 1 + 2*floor(2*sqrt(q)))  # Robin Visser, Aug 03 2023

Formula

a(n) <= q + 1 + 4*sqrt(q) where q = A246655(n) [Hasse-Weil theorem]. - Robin Visser, Aug 03 2023
a(n) >= q - 1 + 2*floor(2*sqrt(q)) for all n except for 3 and 7, where q = A246655(n) [Serre]. - Robin Visser, Aug 03 2023

Extensions

More terms from Robin Visser, Aug 03 2023

A329119 Orders of the finite groups SL_2(K) when K is a finite field with q = A246655(n) elements.

Original entry on oeis.org

6, 24, 60, 120, 336, 504, 720, 1320, 2184, 4080, 4896, 6840, 12144, 15600, 19656, 24360, 29760, 32736, 50616, 68880, 79464, 103776, 117600, 148824, 205320, 226920, 262080, 300696, 357840, 388944, 492960, 531360, 571704, 704880, 912576, 1030200, 1092624, 1224936, 1294920
Offset: 1

Views

Author

Jianing Song, Nov 05 2019

Keywords

Comments

SL_2(K) means the group of 2 X 2 matrices A over K such that det(A) = 1.
In general, let R be any commutative ring with unity, GL_n(R) be the group of n X n matrices A over R such that det(A) != 0 and SL_n(R) be the group of n X n matrices A over R such that det(A) = 1, then GL_n(R)/SL_n(R) = R* is the multiplicative group of R. This is because if we define f(M) = det(M) for M in GL_n(R), then f is a surjective homomorphism from GL_n(K) to R*, and SL_n(R) is its kernel. Thus |GL_n(R)|/|SL_n(R)| = |R*|; if K is a finite field, then |GL_n(R)|/|SL_n(R)| = |K|-1.
Also a(n) is the order of PGL_2(K) when K is a finite field with q = A246655(n) elements. Note that PGL(m,q) and SL(m,q) are not isomorphic unless gcd(m,q-1) = 1. For example, PGL(2,3) = S_4 is not isomorphic to SL(2,3), PGL(2,5) = S_5 is not isomorphic to SL(2,5). - Jianing Song, Apr 04 2022

Examples

			a(4) = 120 because A246655(4) = 5, and 5*(5^2-1) = 120.
		

Crossrefs

Subsequence of A007531.
Cf. A246655, A000056 (order of SL_2(Z_n)).
For the order of GL_2(K) see A059238.

Programs

  • Maple
    N:= 200:
    P:= select(isprime, {2,seq(i,i=3..N,2)}):
    PP:= map(proc(p) local i; seq(p^i,i=1..floor(log[p](N))) end proc, P):
    map(t -> t*(t^2-1), sort(convert(PP,list))); # Robert Israel, Nov 13 2019
  • Mathematica
    p = Select[Range[200], PrimePowerQ];
    (p-1) p (p+1) (* Jean-François Alcover, Aug 22 2020 *)
  • PARI
    [(p+1)*p*(p-1) | p <- [1..200], isprimepower(p)]

Formula

If the finite field K has q elements, then the order of the group SL_2(K) is q*(q^2-1).
a(n) = A059238(n)/(A246655(n)-1) = A007531(A246655(n)+1).

A080732 Smallest distance from n to a prime power (as defined in A246655).

Original entry on oeis.org

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

Views

Author

Benoit Cloitre, Mar 08 2003

Keywords

Comments

a(n)=min (abs(n-k) : where k runs through the prime powers)

Crossrefs

There are four different sequences which may legitimately be called "prime powers": A000961 (p^k, k >= 0), A246655 (p^k, k >= 1), A246547 (p^k, k >= 2), A025475 (p^k, k=0 and k >= 2). When you refer to "prime powers", be sure to specify which of these you mean. - N. J. A. Sloane, Mar 24 2018

Programs

  • Mathematica
    nn = 100; pp = Select[Range[2, Prime[1 + PrimePi[nn]]], Length[FactorInteger[#]] == 1 &]; Table[Min[Abs[n - pp]], {n, nn}] (* T. D. Noe, Mar 14 2012 *)
Previous Showing 11-20 of 366 results. Next