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

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)

A137502 Reverse sequence of powers in prime decomposition of n.

Original entry on oeis.org

1, 2, 2, 4, 2, 6, 2, 8, 4, 10, 2, 18, 2, 14, 6, 16, 2, 12, 2, 50, 10, 22, 2, 54, 4, 26, 8, 98, 2, 30, 2, 32, 14, 34, 6, 36, 2, 38, 22, 250, 2, 70, 2, 242, 18, 46, 2, 162, 4, 20, 26, 338, 2, 24, 10, 686, 34, 58, 2, 150, 2, 62, 50, 64, 14, 154, 2, 578, 38, 42, 2, 108, 2, 74, 12, 722, 6, 286
Offset: 1

Views

Author

Philippe Lallouet (philip.lallouet(AT)orange.fr), Apr 22 2008

Keywords

Comments

The term a(1) = 1 added on the grounds that as 1 has an empty prime factorization, it stays same when reversed. - Antti Karttunen, May 20 2014
In the prime decomposition of n we use all the primes up to the highest prime divisor, exponents of zero being allowed except for the largest prime.
If n = (p(1)^e1)*(p(2)^e2)*.......*(p(k)^ek) (ek>0, other ei>=0 and p(n) = n-th prime) then we reverse the sequence e1, e2 , ..., ek to build a(n): a(n) = (p(1)^ek)*(p(2)^e(k-1))* . . . . *(p(k)^e1)
As p(1)=2 and ek is never zero for n>1, a(n) is always even for n>1.
If n is prime then a(n) = 2 and if n is a power of prime, a(n) is the same power of 2.
(That is, a(A000961(n)) = A000079(A025474(n)) for all n.) - Antti Karttunen, May 20 2014.
If the sequence e1, e2, ..., ek is palindromic, a(n)=n. (A242418 gives such n).
For any given even number Q, we can by reversing the sequence of its powers define not only one but an infinity (by adding as many zeros as we want on the left end) of n such that a(n) = Q. Hence the sequence is a permutation of even integers where each even integer is infinitely repeated.
For example as Q = 1224 = (2^3)*(3^2)*(5^0)*(7^0)*(11^0)*(13^0)*(17^1),
Q = a((2^1)*(3^0)*(5^0)*(7^0)*(11^0)*(13^2)*(17^3)) = a(1660594) but also of an infinity of other ones, the first one being a((2^0)*(3^1)*(5^0)*(7^0)*(11^0)*(13^0)*(17^2)*(19^1)) = a(5946753).
Please see A241916 for a variant which results an ordinary permutation of all natural numbers. - Antti Karttunen, May 20 2014

Examples

			As 9 = (2^0)*(3^2), hence a(9) = (2^2)*(3^0) = 4.
As 50 = (2^1)*(3^0)*(5^2), hence a(50) = (2^2)*(3^0)*(5^1) = 2*2*5 = 20.
As 57 = (2^0)*(3^1)*(5^0)*(7^0)*(11^0)*(13^0)*(17^0)*(19^1), hence a(57) = (2^1)*(3^0)*(5^0)*(7^0)*(11^0)*(13^0)*(17^1)*(19^0) = 2*17 = 34.
		

Crossrefs

A242418 gives the fixed points.

Programs

  • Mathematica
    f[n_] := If[n == 1, {0}, Function[f, ReplacePart[Table[0, {PrimePi[f[[-1, 1]]]}], #] &@ Map[PrimePi@ First@ # -> Last@ # &, f]]@ FactorInteger@ n]; g[w_List] := Times @@ Flatten@ MapIndexed[Prime[#2]^#1 &, w]; Table[g@ Reverse@ f@ n, {n, 120}] (* Michael De Vlieger, Aug 27 2016 *)
  • Scheme
    (define (A137502 n) (if (< n 2) n (/ (* 2 (A241916 n)) (A006530 n)))) ;; Antti Karttunen, May 20 2014

Formula

a(1) = 1, and for n>1, a(n) = 2*A241916(n) / A006530(n). - Antti Karttunen, May 20 2014

Extensions

Edited by N. J. A. Sloane, Jan 16 2009.
Term a(1)=1 prepended, and erroneous terms (first at n=50) corrected, Antti Karttunen, May 20 2014

A192134 Difference between n-th prime power and its arithmetic derivative.

Original entry on oeis.org

1, 1, 2, 0, 4, 6, -4, 3, 10, 12, -16, 16, 18, 22, 15, 0, 28, 30, -48, 36, 40, 42, 46, 35, 52, 58, 60, -128, 66, 70, 72, 78, -27, 82, 88, 96, 100, 102, 106, 108, 112, 99, 50, 126, -320, 130, 136, 138, 148, 150, 156, 162, 166, 143, 172, 178, 180, 190, 192, 196
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 26 2011

Keywords

Crossrefs

Programs

  • Haskell
    a192134 n = a000961 n - a192015 n  -- Reinhard Zumkeller, Apr 16 2014
  • Mathematica
    f[n_] := If[n == 1, 1, If[PrimePowerQ[n], {p, e} = FactorInteger[n][[1]]; n - e*p^(e-1), Nothing]]; Array[f, 300] (* Amiram Eldar, Apr 11 2025 *)

Formula

a(n) = A000961(n)-A192015(n) = A000961(n)-A003415(A000961(n)) = A192133(n)*A025473(n)^(A025474(n)-1) = A192133(n)*A000961(n)/A025473(n).
a(A095874(A000040(n))) = A006093(n).
a(A095874(A001248(n))) = A005722(n) + 1.

A335866 Number of classes of simple difference sets of the Singer type (m^2 + m + 1, m + 1, 1) with m = m(n) = A000961(n), for n >= 1.

Original entry on oeis.org

1, 2, 4, 2, 10, 12, 8, 12, 36, 40, 12, 102, 84, 156, 60, 84, 264, 220, 60, 264, 574, 420, 720, 252, 816, 1180, 768, 144, 840, 1704, 1200, 1176, 432, 2196, 2670, 2112, 3434, 2380, 3024, 2280, 3960, 1296, 1656, 3612, 672, 5764, 5184, 3984, 6120, 4368, 5512, 4752, 9352, 3120, 10034, 9204, 7176, 9360, 7128
Offset: 1

Views

Author

Wolfdieter Lang, Jul 26 2020

Keywords

Comments

For details on these simple difference sets see A333852, with references, and a W. Lang link.
The formula given below was conjectured by Singer for n >= 2 on p. 383. See also the table on p. 384.
This conjecture was later proved by Berman.

Examples

			n = 2, m(2) = 2 = 2^1, a(2) = phi(7)/(3*1) = 6/3 = 2. There are two classes of type (7,3,1) (Fano plane), with representatives {0, 1, 3} and {0, 1, 5}. The two equivalence classes (by elementwise addition of 1, 2, ..., 6 modulo 7) are Dev({0, 1, 3}) = {{0, 1, 3}, {0, 2, 6}, {0, 4, 5}, {1, 2, 4}, {1, 5, 6}, {2, 3, 5}, {3, 4, 6}, and Dev({0, 1, 5}) = {{0, 1, 5}, {0, 2, 3}, {0, 4, 6}, {1, 2, 6}, {1, 3, 4}, {2, 4, 5}, {3, 5, 6}}.
		

Crossrefs

Programs

  • PARI
    print1(1); for(q=2, 193 , if(n=isprimepower(q), print1(", ", eulerphi(q^2+q+1)/(3*n)))) \\ Martin Becker, Jun 11 2024

Formula

a(1) = 1, and a(n) = phi(v(n))/(3*e(n)), with phi = A000010 (Euler's totient), v(n) = A335865(n) = m(n)^2 + m(n) + 1, with m(n) = A000961(n), and e(n) = A025474(n), the exponent of the prime power dividing m(n), for n >= 2.

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

A086455 Sum of divisors of prime powers: sigma(p^e).

Original entry on oeis.org

1, 3, 4, 7, 6, 8, 15, 13, 12, 14, 31, 18, 20, 24, 31, 40, 30, 32, 63, 38, 42, 44, 48, 57, 54, 60, 62, 127, 68, 72, 74, 80, 121, 84, 90, 98, 102, 104, 108, 110, 114, 133, 156, 128, 255, 132, 138, 140, 150, 152, 158, 164, 168, 183, 174, 180, 182, 192, 194, 198
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 20 2003

Keywords

Crossrefs

Programs

  • Maple
    A086455 := proc(n)
        numtheory[sigma](A000961(n)) ;
    end proc: # R. J. Mathar, Jun 04 2016
  • Mathematica
    DivisorSigma[1, #]& /@ Join[{1}, Select[Range[2, 200], PrimePowerQ]] (* Jean-François Alcover, Feb 10 2018 *)
  • PARI
    list(lim) = apply(sigma, select(x -> x == 1 || isprimepower(x), vector(lim, i, i))); \\ Amiram Eldar, May 07 2025

Formula

a(n) = A000203(A000961(n)).
a(n) = (p^(e+1)-1)/(p-1), where p^e = A000961(n).
a(n) = (A025473(n)^(A025474(n)+1)-1)/(A025473(n)-1).

A117331 Lexicographically earliest permutation of prime powers such that the exponents of succeeding terms increase at most by 1.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 9, 8, 11, 13, 17, 19, 23, 25, 27, 16, 29, 31, 37, 41, 43, 47, 49, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 121, 125, 81, 32, 64, 127, 131, 137, 139, 149, 151, 157, 163, 167, 169, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 08 2006

Keywords

Comments

A025474(A095874(a(n+1))) - A025474(A095874(a(n))) <= 1;
A117332(n) = A095874(a(n));
a(A117333(n)) = A000961(n).

Examples

			a(13)..a(16): 23,5^2,3^3,2^4;
a(38)..a(43): 113,11^2,5^3,3^4,2^5,2^6;
a(239)..a(248): 1367,37^2,11^3,5^4,3^5,3^6,2^7,2^8,2^9,2^10.
		

A192133 Difference of base and exponent of prime powers (cf. A000961).

Original entry on oeis.org

1, 1, 2, 0, 4, 6, -1, 1, 10, 12, -2, 16, 18, 22, 3, 0, 28, 30, -3, 36, 40, 42, 46, 5, 52, 58, 60, -4, 66, 70, 72, 78, -1, 82, 88, 96, 100, 102, 106, 108, 112, 9, 2, 126, -5, 130, 136, 138, 148, 150, 156, 162, 166, 11, 172, 178, 180, 190, 192, 196, 198, 210
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 26 2011

Keywords

Comments

a(1) = 1 by convention, in accordance with A025473(1) = 1 and A025474(1) = 0.

Crossrefs

A006093 and A090076 are subsequences.

Programs

  • Mathematica
    s[n_] := Module[{f = FactorInteger[n]}, If[Length[f] == 1, f[[1, 1]] - f[[1, 2]], Nothing]]; s[1] = 1; Array[s, 250] (* Amiram Eldar, May 16 2025 *)

Formula

a(n) = A025473(n)-A025474(n) = A192134(n)*A025473(n)/A000961(n).

A085730 Euler's totient function applied to the sequence of prime powers.

Original entry on oeis.org

1, 1, 2, 2, 4, 6, 4, 6, 10, 12, 8, 16, 18, 22, 20, 18, 28, 30, 16, 36, 40, 42, 46, 42, 52, 58, 60, 32, 66, 70, 72, 78, 54, 82, 88, 96, 100, 102, 106, 108, 112, 110, 100, 126, 64, 130, 136, 138, 148, 150, 156, 162, 166, 156, 172, 178, 180, 190, 192, 196, 198, 210
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 20 2003

Keywords

Crossrefs

Programs

  • Haskell
    a085730 1 = 1
    a085730 n = (p - 1) * p ^ (e - 1)
       where p =  a025473 n; e =  a025474 n
    -- Reinhard Zumkeller, Feb 16 2012
    
  • Mathematica
    f[p_, e_] := (p-1)*p^(e-1); s[n_] := If[n == 1, 1, If[PrimePowerQ[n], f @@ (FactorInteger[n][[1]]), Nothing]]; Array[s, 220] (* Amiram Eldar, Apr 05 2025 *)
  • PARI
    list(lim)=my(v=List(primes(primepi(lim)))); listput(v,1); for(e=2, log(lim+.5)\log(2),forprime(p=2,(lim+.5)^(1/e),listput(v, p^e))); apply(n->eulerphi(n),vecsort(Vec(v))) \\ Charles R Greathouse IV, Apr 30 2012

Formula

a(n) = A000010(A000961(n)).
a(p^e) = (p-1)*p^(e-1).
a(n) = (A025473(n)-1)*A025473(n)^(A025474(n)-1).

A192083 Arithmetic derivative of squares of prime powers: a(n) = A003415(A056798(n)).

Original entry on oeis.org

0, 4, 6, 32, 10, 14, 192, 108, 22, 26, 1024, 34, 38, 46, 500, 1458, 58, 62, 5120, 74, 82, 86, 94, 1372, 106, 118, 122, 24576, 134, 142, 146, 158, 17496, 166, 178, 194, 202, 206, 214, 218, 226, 5324, 18750, 254, 114688, 262, 274, 278, 298, 302, 314, 326, 334
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 26 2011

Keywords

Comments

A001787 and A024622 give record values and where they occur.

Crossrefs

Programs

  • Mathematica
    s[n_] := If[PrimePowerQ[n], f = FactorInteger[n][[1]]; 2*f[[2]]*n^(2 - 1/f[[2]]), Nothing]; s[1] = 0; Array[s, 200] (* Amiram Eldar, Apr 06 2025 *)

Formula

a(n) = 2 * A025474(n) * A025473(n)^(2*A025474(n) - 1).
A192084(n) = A003415(a(n)).
Previous Showing 11-20 of 34 results. Next