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-9 of 9 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

A071403 Which squarefree number is prime? a(n)-th squarefree number equals n-th prime.

Original entry on oeis.org

2, 3, 4, 6, 8, 9, 12, 13, 16, 18, 20, 24, 27, 29, 31, 33, 37, 38, 42, 45, 46, 50, 52, 56, 61, 62, 64, 67, 68, 71, 78, 81, 84, 86, 92, 93, 96, 100, 103, 105, 109, 110, 117, 118, 121, 122, 130, 139, 141, 142, 145, 149, 150, 154, 158, 162, 166, 167, 170, 172, 174, 180
Offset: 1

Views

Author

Labos Elemer, May 24 2002

Keywords

Comments

Also the number of squarefree numbers <= prime(n). - Gus Wiseman, Dec 08 2024

Examples

			a(25)=61 because A005117(61) = prime(25) = 97.
From _Gus Wiseman_, Dec 08 2024: (Start)
The squarefree numbers up to prime(n) begin:
n = 1  2  3  4   5   6   7   8   9  10
    ----------------------------------
    2  3  5  7  11  13  17  19  23  29
    1  2  3  6  10  11  15  17  22  26
       1  2  5   7  10  14  15  21  23
          1  3   6   7  13  14  19  22
             2   5   6  11  13  17  21
             1   3   5  10  11  15  19
                 2   3   7  10  14  17
                 1   2   6   7  13  15
                     1   5   6  11  14
                         3   5  10  13
                         2   3   7  11
                         1   2   6  10
                             1   5   7
                                 3   6
                                 2   5
                                 1   3
                                     2
                                     1
The column-lengths are a(n).
(End)
		

Crossrefs

The strict version is A112929.
A000040 lists the primes, differences A001223, seconds A036263.
A005117 lists the squarefree numbers, differences A076259.
A013929 lists the nonsquarefree numbers, differences A078147.
A070321 gives the greatest squarefree number up to n.
Other families: A014689, A027883, A378615, A065890.
Squarefree numbers between primes: A061398, A068360, A373197, A373198, A377430, A112925, A112926.
Nonsquarefree numbers: A057627, A378086, A061399, A068361, A120327, A377783, A378032, A378033.

Programs

  • Mathematica
    Position[Select[Range[300], SquareFreeQ], ?PrimeQ][[All, 1]] (* _Michael De Vlieger, Aug 17 2023 *)
  • PARI
    lista(nn)=sqfs = select(n->issquarefree(n), vector(nn, i, i)); for (i = 1, #sqfs, if (isprime(sqfs[i]), print1(i, ", "));); \\ Michel Marcus, Sep 11 2013
    
  • PARI
    a(n,p=prime(n))=sum(k=1, sqrtint(p), p\k^2*moebius(k)) \\ Charles R Greathouse IV, Sep 13 2013
    
  • PARI
    a(n,p=prime(n))=my(s); forfactored(k=1, sqrtint(p), s+=p\k[1]^2*moebius(k)); s \\ Charles R Greathouse IV, Nov 27 2017
    
  • PARI
    first(n)=my(v=vector(n),pr,k); forsquarefree(m=1,n*logint(n,2)+3, k++; if(m[2][,2]==[1]~, v[pr++]=k; if(pr==n, return(v)))) \\ Charles R Greathouse IV, Jan 08 2018
    
  • Python
    from math import isqrt
    from sympy import prime, mobius
    def A071403(n): return (p:=prime(n))+sum(mobius(k)*(p//k**2) for k in range(2,isqrt(p)+1)) # Chai Wah Wu, Jul 20 2024

Formula

A005117(a(n)) = A000040(n) = prime(n).
a(n) ~ (6/Pi^2) * n log n. - Charles R Greathouse IV, Nov 27 2017
a(n) = A013928(A008864(n)). - Ridouane Oudra, Oct 15 2019
From Gus Wiseman, Dec 08 2024: (Start)
a(n) = A112929(n) + 1.
a(n+1) - a(n) = A373198(n) = A061398(n) - 1.
(End)

A336107 Number of permutations of the prime indices of n with at least one non-singleton run, or non-separations.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Sep 03 2020

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.
A separation (or Carlitz composition) of a multiset is a permutation with no adjacent equal parts.

Examples

			The a(n) non-separations for n = 12, 36, 60, 72, 180, 420:
  (11)  (112)  (1122)  (1123)  (11122)  (11223)  (11234)
        (211)  (1221)  (1132)  (11212)  (11232)  (11243)
               (2112)  (2113)  (11221)  (11322)  (11324)
               (2211)  (2311)  (12112)  (12213)  (11342)
                       (3112)  (12211)  (12231)  (11423)
                       (3211)  (21112)  (13122)  (11432)
                               (21121)  (13221)  (21134)
                               (21211)  (21123)  (21143)
                               (22111)  (21132)  (23114)
                                        (22113)  (23411)
                                        (22131)  (24113)
                                        (22311)  (24311)
                                        (23112)  (31124)
                                        (23211)  (31142)
                                        (31122)  (32114)
                                        (31221)  (32411)
                                        (32112)  (34112)
                                        (32211)  (34211)
                                                 (41123)
                                                 (41132)
                                                 (42113)
                                                 (42311)
                                                 (43112)
                                                 (43211)
		

Crossrefs

A005117 lists positions of zeros, with complement A013929.
A008480 counts permutations of prime indices, ranked by A333221.
A003242 and A335452 count separations, ranked by A333489.
A325535 counts inseparable partitions, ranked by A335448.
A325534 counts separable partitions, ranked by A335433.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Length[Select[Permutations[primeMS[n]],MatchQ[#,{_,x_,x_,_}]&]],{n,100}]

Formula

a(n) = A008480(n) - A335452(n).
a(A000961(n)) = 0 if n is in A027883, otherwise 1.
a(A005117(n)) = 0.
a(n!) = A335459(n).
a(A006939(n)) = A022915(n).

A182869 Joint-rank array of prime powers: p(i)^j, i>=1, j>=1, read by antidiagonals.

Original entry on oeis.org

1, 3, 2, 6, 7, 4, 10, 15, 14, 5, 18, 32, 42, 23, 8, 27, 68, 136, 86, 41, 9, 44, 152, 482, 392, 244, 53, 11, 70, 359, 1880, 2001, 1773, 360, 91, 12, 117, 893, 7771, 11211
Offset: 1

Views

Author

Clark Kimberling, Dec 09 2010

Keywords

Comments

Joint-rank arrays are defined in the first comment at A182801. A182869 is a permutation of the positive integers.

Examples

			First, arrange the prime powers in rows:
2....4....8....16....32...
3....9...27....81...243...
5...25..125...625..3125...
Then replace each prime power by its rank when they are all jointly ranked:
1....3....6....10.....18...
2....7...15....32.....68...
4...14...42...136....482...
5...23...86...392...2001...
8...41..244..1773..14901...
		

Crossrefs

Programs

  • Mathematica
    T[i_,j_]:=Sum[Floor[j*Log[Prime[i]]/Log[Prime[h]]],{h,1,PrimePi[Prime[i]^j]}];
    TableForm[Table[T[i,j],{i,1,6},{j,1,6}]]

Formula

T(i,j) = Sum_{h>=1} floor(j*log(p(i))/log(p(h))), where p(i) denotes the i-th prime.

Extensions

Corrected and extended by Clark Kimberling, Dec 13 2010

A024620 Positions of primes among the powers of primes (A000961).

Original entry on oeis.org

2, 3, 5, 6, 9, 10, 12, 13, 14, 17, 18, 20, 21, 22, 23, 25, 26, 27, 29, 30, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 44, 46, 47, 48, 49, 50, 51, 52, 53, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 70, 72, 73, 74, 75, 76, 77, 78, 80, 81, 82, 83, 84, 85, 86, 88, 89, 90, 91, 93, 94
Offset: 1

Views

Author

Keywords

Crossrefs

Complement of A024621.
Cf. A001222 (bigomega), A025474, A056604, A027883.

Programs

  • Haskell
    a024620 n = a024620_list !! (n-1)
    a024620_list = filter ((== 1) . a025474) [1..]
    -- Reinhard Zumkeller, May 01 2015
    
  • Mathematica
    a[n_] := PrimeOmega[LCM @@ Range@Prime@n] + 1; Array[a, 100] (* Amiram Eldar, Dec 02 2018 *)
  • PARI
    lista(nn) = my(powpr = select((i->((omega(i)==1) || (i==1))), [1..nn])); for (i = 1, #powpr, if (isprime(powpr[i]), print1(i, ", ")); ); \\ Michel Marcus, Jun 03 2021
    
  • Python
    from sympy import prime, primepi, integer_nthroot
    def A024620(n):
        x = prime(n)
        return n+1+sum(primepi(integer_nthroot(x,k)[0]) for k in range(2,x.bit_length())) # Chai Wah Wu, Nov 05 2024

Formula

A025474(a(n)) = 1. - Reinhard Zumkeller, May 01 2015
a(n) = A001222(A056604(n)) + 1. - Eric Desbiaux, Dec 02 2018
From Ridouane Oudra, Oct 18 2020: (Start)
a(n) = A027883(n) + 1;
a(n) = A025528(A000040(n)) + 1;
a(n) = A065515(A000040(n)). (End)

A333235 a(n) is the product of indices of unitary prime power divisors of n.

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Mar 12 2020

Keywords

Comments

Equivalently: replace each prime power p^e in the prime factorization of n by its index in A246655. - M. F. Hasler, Jun 16 2021

Examples

			a(600) = a(2^3 * 3 * 5^2) = a(A246655(6) * A246655(2) * A246655(14)) = 6 * 2 * 14 = 168.
		

Crossrefs

Cf. A322981 (the index of n = p^e in A246655).

Programs

  • Maple
    N:= 1000: # for a(1)..a(N)
    R:= NULL: p:= 2:
    while p < N do
      R:= R,  seq(p^k,k=1..ilog[p](N));
      p:= nextprime(p);
    od:
    L:= sort([R]):
    f:= proc(n) local F, t;
      F:= ifactors(n)[2];
      mul(ListTools:-BinarySearch(L,t[1]^t[2]),t=F)
    end proc:
    map(f, [$1..N]); # Robert Israel, Feb 11 2021
  • Mathematica
    PrimePowerPi[n_] := Sum[Boole[PrimePowerQ[k]], {k, 1, n}]; a[1] = 1; a[n_] := Times @@ (PrimePowerPi[#[[1]]^#[[2]]] & /@ FactorInteger[n]); Table[a[n], {n, 1, 70}]
  • PARI
    apply( {A333235(n)=vecprod([A322981(f[1]^f[2])|f<-factor(n)~])}, [1..99]) \\ M. F. Hasler, Jun 16 2021

Formula

If n = Product (p_j^k_j) then a(n) = Product (A025528(p_j^k_j)).
a(prime(n)) = A027883(n).
a(2^n) = A182908(n).
a(A246655(n)) = n.

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

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}]]]

A130973 Number of primes between successive pairs of twin primes, for a(n) > 0.

Original entry on oeis.org

1, 1, 2, 1, 4, 3, 4, 2, 1, 3, 1, 2, 3, 10, 4, 7, 4, 3, 2, 1, 2, 18, 2, 2, 17, 1, 2, 6, 9, 3, 1, 1, 1, 8, 3, 2, 15, 1, 4, 1, 1, 7, 7, 4, 4, 3, 4, 1, 1, 7, 2, 5, 1, 5, 18, 2, 5, 4, 3, 1, 5, 1, 18, 12, 2, 8, 1, 4, 2, 5, 4, 1, 1, 1, 9, 10
Offset: 1

Views

Author

Omar E. Pol, Aug 23 2007

Keywords

Comments

a(k) corresponds to the k-th term in the isolated prime sequence A007510 or A134797. a(1) corresponds to 23. a(2) corresponds to 37. a(3) corresponds to 47 and 53. - Enrique Navarrete, Jan 28 2017
Lengths of the runs of consecutive integers in A176656. - R. J. Mathar, Feb 19 2017

Crossrefs

Cf. A001223, A007510 (isolated primes), A027883, A048614, A048198, A052011, A052012, A061273, A076777, A073784, A082602, A088700, A179067 (clusters of twin primes).
Showing 1-9 of 9 results.