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-5 of 5 results.

A366833 Number of times n appears in A362965 (number of primes <= the n-th prime power).

Original entry on oeis.org

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

Views

Author

Paolo Xausa, Oct 25 2023

Keywords

Comments

Conjecture: a(n) can be only 1, 2, or 3 (with the first occurrences of 3 appearing at n = 4, 9, 30, 327 and 3512).
One less than the number of prime powers between prime(n) and prime(n+1), inclusive. - Gus Wiseman, Jan 09 2025

Crossrefs

Run lengths of A362965.
Subtracting one gives A080101.
For non prime powers we have A368748.
Positions of terms > 1 are A377057.
Positions of 1 are A377286.
Positions of 2 are A377287.
For perfect powers we have A377432.
For squarefree we have A373198.
A000015 gives the least prime power >= n, difference A377282.
A000040 lists the primes, differences A001223.
A000961 lists the powers of primes, differences A057820.
A024619 and A361102 list the non prime powers, differences A375708 and A375735.
A031218 gives the greatest prime power <= n, difference A276781.
A046933(n) counts the interval from A008864(n) to A006093(n+1).
A246655 lists the prime powers not including 1.
A366835 counts primes between prime powers.

Programs

  • Mathematica
    With[{upto=1000},Map[Length,Most[Split[PrimePi[Select[Range[upto],PrimePowerQ]]]]]] (* Considers prime powers up to 1000 *)

Formula

a(n) = A080101(n) + 1. - Gus Wiseman, Jan 09 2025

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

A024621 Positions of nonprimes among the powers of primes (A000961).

Original entry on oeis.org

1, 4, 7, 8, 11, 15, 16, 19, 24, 28, 33, 42, 43, 45, 54, 69, 71, 79, 87, 92, 118, 121, 137, 153, 171, 188, 199, 245, 248, 293, 314, 341, 360, 361, 364, 393, 446, 483, 526, 559, 605, 651, 699, 719, 750, 857, 894, 930, 935, 1050, 1079, 1215, 1305, 1348, 1436, 1479, 1514
Offset: 1

Views

Author

Keywords

Crossrefs

Complement of A024620.

Programs

  • PARI
    lista(nn) = {vec = vector(nn, i, i); powpr = select((i->((omega(i)==1) || (i==1))), vec); for (i = 1, #powpr, if (! isprime(powpr[i]), print1(i, ", ")););} \\ Michel Marcus, Oct 02 2013
    
  • Python
    from sympy import primepi, integer_nthroot
    def A024621(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+x-1-sum(primepi(integer_nthroot(x,k)[0]) for k in range(2,x.bit_length())))
        return n+primepi(bisection(f,n,n)) # Chai Wah Wu, Nov 05 2024

A182909 Ranks of composite numbers when all prime powers p^n for n>=1 are jointly ranked.

Original entry on oeis.org

3, 6, 7, 10, 14, 15, 18, 23, 27, 32, 41, 42, 44, 53, 68, 70, 78, 86, 91, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142
Offset: 1

Views

Author

Clark Kimberling, Dec 13 2010

Keywords

Comments

The complement of A027883.

Examples

			In the sequence A000961 (2,3,4,5,7,8,9,11,13,16,17,19,23,25,27,...) of prime powers p^n for n>=1, the composites 4,8,9,16,25,27,... occur with ranks 3,6,7,10,14,15...
		

Crossrefs

Programs

  • Mathematica
    T[i_,j_]:=Sum[Floor[j*Log[Prime[i]]/Log[Prime[h]]],{h,1,PrimePi[Prime[i]^j]}]; Complement[Range[200],Flatten[Table[T[i,j],{i,1,80},{j,1,1}]]]

A344948 Primes whose position among the powers of primes (A000961) is also prime.

Original entry on oeis.org

2, 3, 5, 19, 29, 47, 67, 73, 101, 113, 137, 167, 193, 199, 239, 263, 313, 349, 389, 419, 431, 449, 461, 487, 571, 599, 641, 701, 719, 751, 797, 823, 857, 887, 911, 977, 991, 1019, 1097, 1193, 1223, 1231, 1277, 1301, 1307, 1399, 1439, 1481, 1511, 1531, 1571, 1601
Offset: 1

Views

Author

Michel Marcus, Jun 03 2021

Keywords

Examples

			The position of 2 in A000961 is 2; so 2 is a term.
The position of 19 in A000961 is 13; so 19 is a term.
		

Crossrefs

Programs

  • Mathematica
    pow = Select[Range[1600], # == 1 || PrimePowerQ[#] &]; Select[pow[[Select[Range @ Length[pow], PrimeQ]]], PrimeQ] (* Amiram Eldar, Jun 03 2021 *)
  • PARI
    allmps(nn) = {my(map = Map()); mapput(map, 1, 1); my(nb=1); for (n=2, nn, if (isprimepower(n), nb++; mapput(map, n, nb));); map;}
    lista(nn) = {my(nb = prime(nn), map = allmps(nb)); forprime (p=1, nn, if( isprime(mapget(map, p)), print1(p, ", ")););}
Showing 1-5 of 5 results.