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

A025528 Number of prime powers <= n with exponents > 0 (A246655).

Original entry on oeis.org

0, 1, 2, 3, 4, 4, 5, 6, 7, 7, 8, 8, 9, 9, 9, 10, 11, 11, 12, 12, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 18, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 21, 21, 21, 21, 22, 22, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 25, 25, 26, 26, 26, 27, 27, 27, 28, 28, 28, 28, 29, 29, 30, 30
Offset: 1

Views

Author

Keywords

Comments

a(n) is the sum of the exponents in the prime factorization of lcm{1,2,...,n}.
Larger than but analogous to Pi(n).
Counts A000961 without 1=prime^0: a(n)=A065515(n)-1. - Reinhard Zumkeller, Jul 03 2003
Equally, number of finite fields of order <= n. - Neven Juric, Feb 05 2010

Examples

			Below 100 there are 25 primes and 25 + 10 = 35 prime powers.
		

References

  • G. Tenenbaum, Introduction à la théorie analytique et probabiliste des nombres, p. 203, Publications de l'Institut Cartan, 1990.

Crossrefs

Cf. A000961, A000040, A000720, A001221, A003418, A141228, A246655, A276781 (ordinal transform).
One less than A065515.

Programs

  • Mathematica
    primePowerPi[n_] := Sum[PrimePi[n^(1/k)], {k, Log[2, n]}]; Table[primePowerPi[n], {n, 75}] (* Geoffrey Critzer, Jan 07 2012 *) (* and modified by Robert G. Wilson v, Jan 07 2012 *)
    Table[Sum[Boole[1 < Cyclotomic[n, 1]], {n, 1, m}], {m, 1, 75}] (* Fred Daniel Kline, Oct 03 2016 *)
  • PARI
    for(n=1,100,print1(sum(k=1,n,logint(n,prime(k))),",")) \\ corrected by Luc Rousseau, Jan 04 2018
    
  • PARI
    a(n)=sum(i=1,n,if(omega(i)-1,0,1))
    
  • PARI
    a(n)=n+=.5;sum(e=1,log(n)\log(2),primepi(n^(1/e))) \\ Charles R Greathouse IV, Apr 30 2012
    
  • Python
    from sympy import primepi, integer_nthroot
    def A025528(n): return sum(primepi(integer_nthroot(n,k)[0]) for k in range(1,n.bit_length())) # Chai Wah Wu, Aug 15 2024
  • SageMath
    def A025528(n) : return sum([1 for k in (0..n) if is_prime_power(k)])
    print([A025528(n)  for n in (1..74)]) # Peter Luschny, Nov 18 2019
    

Formula

a(n) = Cardinality[{1..n}|A001221(i)=1].
a(n) = Sum_{p prime <= n} floor(log(n)/log(p)). - Benoit Cloitre, Apr 30 2002
a(n) ~ n/log(n). - Benoit Cloitre, May 30 2003
a(n) = A069637(n) + A000720(n). - Mohammed Bouayoun (bouyao(AT)wanadoo.fr), Feb 24 2004 [Corrected by Franklin T. Adams-Watters, Jun 08 2008]
a(n) = A000720(n) + A000720(floor(n^(1/2))) + A000720(floor(n^(1/3))) + ... - Max Alekseyev, May 11 2009
Partial sums of A069513. - Enrique Pérez Herrero, May 30 2011
a(n) = A001222(A003418(n)). - Luc Rousseau, Jan 05 2018
From Steven Foster Clark, Sep 26 2018: (Start)
a(n) = Sum_{m=1..n} A001222(m) * A002321(floor(n/m)) where A001222() is the Omega function and A002321() is the Mertens function.
a(n) = Sum_{m=1..floor(log_2(n))} A000010(m)/m * J(floor(n^(1/m))) where A000010() is Euler's totient function and J(n) = Sum_{m=1..floor(log_2(n))} 1/m * A000720(floor(n^(1/m))) is Riemann's prime-power counting function.
(End)

Extensions

New description from Labos Elemer, Nov 09 2000

A244508 Number of odd prime powers (A246655) between 2^n and 2^(n+1).

Original entry on oeis.org

0, 1, 2, 3, 7, 8, 16, 25, 46, 80, 141, 263, 473, 882, 1628, 3044, 5734, 10779, 20428, 38687, 73653, 140425, 268340, 513866, 986033, 1894409, 3646134, 7027825, 13562625, 26208248, 50698865, 98184467, 190338061, 369326690, 717271793, 1394198586, 2712112561
Offset: 0

Views

Author

Michel Marcus, Nov 17 2014

Keywords

Examples

			Between 2 and 4, there is just 1 prime power: 3, so a(1) = 1.
Between 4 and 8, there are 2 prime powers: 5 and 7, so a(2) = 2.
		

Crossrefs

Cf. A246655 (prime powers), A182908 (positions of 2^n among prime powers).

Programs

  • Mathematica
    Table[Count[Range[2^n + 1, 2^(n + 1) - 1], ?PrimePowerQ], {n, 0, 27}] (* _Ivan N. Ianakiev, Nov 18 2014 *)
  • PARI
    a(n) = sum(i=2^n+1, 2^(n+1)-1, isprimepower(i)>0);
    
  • Python
    from sympy import primepi, integer_nthroot
    def A244508(n):
        def f(x): return int(1+sum(primepi(integer_nthroot(x, k)[0]) for k in range(1, x.bit_length())))
        return f((1<Chai Wah Wu, Nov 05 2024

Formula

a(n) = A182908(n+1) - A182908(n). - Ray Chandler, Aug 20 2021

Extensions

a(28)-a(36) from Hiroaki Yamanouchi, Nov 20 2014
Minor edits by Ray Chandler, Aug 20 2021

A225938 Number of conjugacy classes in Chevalley group E_8(q) as q runs through the prime powers (A246655).

Original entry on oeis.org

1156, 12825, 97154, 519071, 6906102, 19543486, 49150839, 238045722, 889575240, 4600759094, 7439557452, 17980383618, 82034207430, 159213167411, 293713437009, 518754968088, 882274298862, 1136129443366, 3612770425152, 8189556710532, 11973138177210, 24340206797502
Offset: 1

Views

Author

Eric M. Schmidt, May 21 2013

Keywords

Crossrefs

Programs

  • Maple
    A225938 := proc(n)
        local q ;
        q := A246655(n) ;
        if modp(q,2) = 0 then
            q^8 + q^7 + 2*q^6 + 3*q^5 +  9*q^4 + 14*q^3 + 32*q^2 + 47*q +  70;
        elif modp(q,3) = 0 then
            q^8 + q^7 + 2*q^6 + 3*q^5 + 10*q^4 + 16*q^3 + 39*q^2 + 65*q + 102 ;
        elif modp(q,5) = 0 then
            q^8 + q^7 + 2*q^6 + 3*q^5 + 10*q^4 + 16*q^3 + 40*q^2 + 67*q + 111 ;
        else
            q^8 + q^7 + 2*q^6 + 3*q^5 + 10*q^4 + 16*q^3 + 40*q^2 + 67*q + 112 ;
        end if;
    end proc: # R. J. Mathar, Jan 09 2017
  • Mathematica
    qmax = 100;
    Reap[For[q = 2, q < qmax, q++, If[PrimePowerQ[q], cc = q^8 + q^7 + 2 q^6 + 3 q^5 + Which[Mod[q, 2] == 0, 9 q^4 + 14 q^3 + 32 q^2 + 47 q + 70, Mod[q, 3] == 0, 10 q^4 + 16 q^3 + 39 q^2 + 65 q + 102, Mod[q, 5] == 0, 10 q^4 + 16 q^3 + 40 q^2 + 67 q + 111, True, 10 q^4 + 16 q^3 + 40 q^2 + 67 q + 112]; Sow[cc]]]][[2, 1]] (* Jean-François Alcover, Mar 24 2020 *)
  • Sage
    def A225938(q) : return q^8 + q^7 + 2*q^6 + 3*q^5 + (9*q^4 + 14*q^3 + 32*q^2 + 47*q + 70 if q%2==0 else 10*q^4 + 16*q^3 + 39*q^2 + 65*q + 102 if q%3==0 else 10*q^4 + 16*q^3 + 40*q^2 + 67*q + 111 if q%5==0 else 10*q^4 + 16*q^3 + 40*q^2 + 67*q + 112)

Formula

Let q be the n-th prime power. Then a(n) is
q^8 + q^7 + 2q^6 + 3q^5 + 9q^4 + 14q^3 + 32q^2 + 47q + 70, q==0(mod 2);
q^8 + q^7 + 2q^6 + 3q^5 + 10q^4 + 16q^3 + 39q^2 + 65q + 102, q==0(mod 3);
q^8 + q^7 + 2q^6 + 3q^5 + 10q^4 + 16q^3 + 40q^2 + 67q + 111, q==0(mod 5);
q^8 + q^7 + 2q^6 + 3q^5 + 10q^4 + 16q^3 + 40q^2 + 67q + 112, otherwise.

A377055 Position of first appearance of zero in the n-th differences of the prime-powers (A246655), or 0 if it does not appear.

Original entry on oeis.org

0, 0, 1, 1, 4, 48, 61, 83, 29, 57, 290, 121, 7115, 14207, 68320, 14652, 149979, 122704, 481540, 980376, 632441, 29973, 25343678, 50577935, 7512418, 210836403, 67253056, 224083553, 910629561, 931524323, 452509699, 2880227533, 396690327, 57954538325, 77572935454, 35395016473
Offset: 0

Views

Author

Gus Wiseman, Oct 22 2024

Keywords

Examples

			The fourth differences of A246655 begin: 1, -3, 3, 0, -2, 2, ... so a(4) = 4.
		

Crossrefs

The version for primes is A376678, noncomposites A376855, composites A377037.
For squarefree numbers we have A377042, nonsquarefree A377050.
These are the positions of first zeros in each row of A377051.
For antidiagonal-sums we have A377052, absolute A377053.
For leaders we have A377054, for primes A007442 or A030016.
A000040 lists the primes, differences A001223, seconds A036263.
A000961 lists the powers of primes, differences A057820.
A008578 lists the noncomposites, differences A075526.
A023893 and A023894 count integer partitions into prime-powers, factorizations A000688.
A246655 lists the prime-powers, differences A057820 (except first term).

Programs

  • Mathematica
    nn=10000;
    u=Table[Differences[Select[Range[nn],PrimePowerQ],k],{k,2,16}];
    mnrm[s_]:=If[Min@@s==1,mnrm[DeleteCases[s-1,0]]+1,0];
    m=Table[Position[u[[k]],0][[1,1]], {k,mnrm[Union[First/@Position[u,0]]]}]

Extensions

a(12)-a(27) from Pontus von Brömssen, Oct 22 2024
a(28)-a(30) from Chai Wah Wu, Oct 23 2024
a(31)-a(35) from Lucas A. Brown, Nov 03 2024

A027883 Positions of primes in sequence (A246655) of primes and prime powers {p^i, i >= 1}.

Original entry on oeis.org

1, 2, 4, 5, 8, 9, 11, 12, 13, 16, 17, 19, 20, 21, 22, 24, 25, 26, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 40, 43, 45, 46, 47, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 69, 71, 72, 73, 74, 75, 76, 77, 79, 80, 81, 82, 83, 84, 85, 87, 88, 89
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Python
    from sympy import prime, primepi, integer_nthroot
    def A027883(n):
        p = prime(n)
        return n+sum(primepi(integer_nthroot(p,k)[0]) for k in range(2,p.bit_length())) # Chai Wah Wu, Dec 08 2024

Formula

a(n) = A024620(n) - 1.

Extensions

More terms from Erich Friedman.
Name clarified by Ilya Gutkovskiy, Mar 12 2020

A376654 Sorted positions of first appearances in the second differences of consecutive prime-powers exclusive (A246655).

Original entry on oeis.org

3, 4, 9, 11, 17, 24, 44, 46, 47, 59, 67, 68, 70, 79, 117, 120, 177, 178, 198, 205, 206, 215, 243, 244, 303, 324, 326, 401, 465, 483, 604, 800, 879, 938, 1032, 1054, 1076, 1233, 1280, 1720, 1889, 1890, 1905, 1939, 1959, 1961, 2256, 2289, 2409, 2879, 3149
Offset: 1

Views

Author

Gus Wiseman, Oct 06 2024

Keywords

Examples

			The prime-powers exclusive (A246655) are:
  2, 3, 4, 5, 7, 8, 9, 11, 13, 16, 17, 19, 23, 25, 27, 29, 31, 32, 37, 41, 43, 47, ...
with first differences (A057820 except first term) :
  1, 1, 1, 2, 1, 1, 2, 2, 3, 1, 2, 4, 2, 2, 2, 2, 1, 5, 4, 2, 4, 2, 4, 6, 2, 3, 3, ...
with first differences (A376596 except first term):
  0, 0, 1, -1, 0, 1, 0, 1, -2, 1, 2, -2, 0, 0, 0, -1, 4, -1, -2, 2, -2, 2, 2, -4, ...
with first appearances (A376654):
  1, 3, 4, 9, 11, 17, 24, 44, 46, 47, 59, 67, 68, 70, 79, 117, 120, 177, 178, 198, ...
		

Crossrefs

For first differences we have A376340.
These are the sorted positions of first appearances in A376596 except first term.
The inclusive version is a(n) + 1 = A376653(n), except first term.
For squarefree instead of prime-power we have A376655.
A000961 lists prime-powers inclusive, exclusive A246655.
A001597 lists perfect-powers, complement A007916.
A023893 and A023894 count integer partitions into prime-powers, factorizations A000688.
For prime-powers inclusive: A057820 (first differences), A376597 (inflections and undulations), A376598 (nonzero curvature).
For second differences: A036263 (prime), A073445 (composite), A376559 (perfect-power), A376562 (non-perfect-power), A376590 (squarefree), A376593 (nonsquarefree), A376599 (non-prime-power).

Programs

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

A005523 a(n) = maximal number of rational points on an elliptic curve over GF(q), where q = A246655(n) is the n-th prime power > 1.

Original entry on oeis.org

5, 7, 9, 10, 13, 14, 16, 18, 21, 25, 26, 28, 33, 36, 38, 40, 43, 44, 50, 54, 57, 61, 64, 68, 75, 77, 81, 84, 88, 91, 97, 100, 102, 108, 117, 122, 124, 128, 130, 135, 144, 148, 150, 150, 154, 161, 163, 174, 176, 183, 189, 193, 196, 200, 206, 208, 219, 221, 226, 228, 241, 253, 258, 260
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(1) = 5 because 5 is the maximal number of rational points on an elliptic curve over GF(2),
a(2) = 7 because 7 is the maximal number of rational points on an elliptic curve over GF(3),
a(3) = 9 because 9 is the maximal number of rational points on an elliptic curve over GF(4).
		

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(1) 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

Programs

  • Sage
    for q in range(1, 1000):
        if Integer(q).is_prime_power():
            p = Integer(q).prime_factors()[0]
            if (floor(2*sqrt(q))%p != 0) or (Integer(q).is_square()) or (q==p):
                print(q + 1 + floor(2*sqrt(q)))
            else:
                print(q + floor(2*sqrt(q)))  # Robin Visser, Aug 02 2023

Formula

a(n) <= q + 1 + 2*sqrt(q) where q = A246655(n) [Hasse theorem]. - Sean A. Irvine, Jun 26 2020
a(n) = q + 1 + floor(2*sqrt(q)) if p does not divide floor(2*sqrt(q)), q is a square, or q = p. Otherwise a(n) = q + floor(2*sqrt(q)) where q = A246655(n) [Waterhouse 1969]. - Robin Visser, Aug 02 2023

Extensions

Reworded definition and changed offset so as to clarify the indexing. - N. J. A. Sloane, Jan 08 2017
More terms from Robin Visser, Aug 02 2023

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

Original entry on oeis.org

6, 48, 180, 480, 2016, 3528, 5760, 13200, 26208, 61200, 78336, 123120, 267168, 374400, 511056, 682080, 892800, 1014816, 1822176, 2755200, 3337488, 4773696, 5644800, 7738848, 11908560, 13615200, 16511040, 19845936, 25048800, 28003968
Offset: 1

Views

Author

Avi Peretz (njk(AT)netvision.net.il), Jan 21 2001

Keywords

Comments

From Jianing Song, Nov 06 2019: (Start)
GL_2(K) means the group of invertible 2 X 2 matrices A over K.
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. (End)

Examples

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

Crossrefs

Subsequence of A047927.
Cf. A246655, A000252 (order of GL_2(Z_n)).
For the order of SL_2(K) see A329119.

Programs

  • Maple
    with(numtheory): for n from 2 to 400 do if nops(ifactors(n)[2]) = 1 then printf(`%d,`, (n+1)*(n)*(n-1)^2) fi: od:
  • Mathematica
    nn=30;a=Take[Union[Sort[Flatten[Table[Table[Prime[m]^k,{m,1,nn}],{k,1,nn}]]]],nn];Table[(q^2-1)(q^2-q),{q,a}]  (* Geoffrey Critzer, Apr 20 2013 *)
  • PARI
    [(p+1)*p*(p-1)^2 | p <- [1..200], isprimepower(p)] \\ Jianing Song, Nov 05 2019

Formula

If the finite field K has p^m elements, then the order of the group GL_2(K) is (p^(2m)-1)*(p^(2m)-p^m) = (p^m+1)*(p^m)*(p^m-1)^2.
a(n) = A047927(A246655(n)+1). - Jianing Song, Nov 05 2019
a(n) = (A246655(n)-1)*A329119(n). - Jianing Song, Nov 06 2019

Extensions

More terms from James Sellers, Jan 22 2001
Offset corrected by Jianing Song, Nov 05 2019

A366835 In the pair (A246655(n), A246655(n+1)), how many primes are there?

Original entry on oeis.org

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

Views

Author

Paolo Xausa, Oct 25 2023

Keywords

Comments

First 0 terms appear at n = 6, 14, 41, 359, 3589, corresponding to consecutive prime powers (8,9), (25,27), (121,125), (2187,2197) and (32761,32768), respectively (cf. A068315 and A068435).
There cannot be primes strictly between consecutive prime powers, so we get the same result considering the whole interval (not just the pair). - Gus Wiseman, Dec 25 2024

Examples

			a(1) = 2 because in the first prime power pair (2 and 3) there are two primes.
a(14) = 0 because in the 14th prime power pair (25 and 27) there are no primes.
		

Crossrefs

For perfect powers instead of prime powers we have A080769.
Positions of 1 are A379155, indices of A379157.
Positions of 0 are A379156, indices of A068315.
Positions of 2 are A379158, indices of A379541.
A000015 gives the least prime power >= n.
A000040 lists the primes, differences A001223.
A031218 gives the greatest prime power <= n.
A065514 gives the greatest prime power < prime(n), difference A377289.
A080101 and A366833 count prime powers between primes, see A053607, A304521.
A246655 lists the prime powers, differences A057820.

Programs

  • Mathematica
    With[{upto=500},Map[Count[#,_?PrimeQ]&,Partition[Select[Range[upto],PrimePowerQ],2,1]]] (* Considers prime powers up to 500 *)
  • PARI
    lista(nn) = my(v=[p| p <- [1..nn], isprimepower(p)]); vector(#v-1, k, isprime(v[k]) + isprime(v[k+1])); \\ Michel Marcus, Oct 26 2023

A182908 Rank of 2^n when all prime powers (A246655) p^n, for n>=1, are jointly ranked.

Original entry on oeis.org

1, 3, 6, 10, 18, 27, 44, 70, 117, 198, 340, 604, 1078, 1961, 3590, 6635, 12370, 23150, 43579, 82267, 155921, 296347, 564688, 1078555, 2064589, 3958999, 7605134, 14632960, 28195586, 54403835, 105102701, 203287169, 393625231, 762951922, 1480223716, 2874422303
Offset: 1

Views

Author

Clark Kimberling, Dec 13 2010

Keywords

Examples

			a(3)=6 because 2^3 has rank 6 in the sequence (2,3,4,5,7,8,9,...).
		

Crossrefs

Row 1 of A182869. Complement of A182909.

Programs

  • Mathematica
    T[i_,j_]:=Sum[Floor[j*Log[Prime[i]]/Log[Prime[h]]],{h,1,PrimePi[Prime[i]^j]}]; Flatten[Table[T[i,j],{i,1,1},{j,1,22}]]
    f[n_] := Sum[ PrimePi[ Floor[2^(n/k)]], {k, n + 1}]; Array[f, 34] (* Robert G. Wilson v, Jul 08 2011 *)
  • Python
    from sympy import primepi, integer_nthroot
    def A182908(n):
        x = 1<Chai Wah Wu, Nov 05 2024

Formula

a(n) = A182908(n) = A024622(n) - 1 for n>=1.
a(n) = Sum_{i=1..n} pi(floor(2^(n/i))), where pi(n) = A000720(n). - Ridouane Oudra, Oct 26 2020
a(n) = A025528(2^n). - Pontus von Brömssen, Sep 27 2024

Extensions

Minor edits by Ray Chandler, Aug 20 2021
Showing 1-10 of 366 results. Next