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 31-34 of 34 results.

A330669 The prime indices of the prime powers (A000961).

Original entry on oeis.org

0, 1, 2, 1, 3, 4, 1, 2, 5, 6, 1, 7, 8, 9, 3, 2, 10, 11, 1, 12, 13, 14, 15, 4, 16, 17, 18, 1, 19, 20, 21, 22, 2, 23, 24, 25, 26, 27, 28, 29, 30, 5, 3, 31, 1, 32, 33, 34, 35, 36, 37, 38, 39, 6, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49
Offset: 1

Views

Author

Grant E. Martin and Robert G. Wilson v, Dec 23 2019

Keywords

Examples

			a(16) is 2 since A000961(16) is 27 which is 3^3 = (p_2)^3, i.e., the prime index of 3 is 2.
		

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; local k; for k from
          1+b(n-1) while nops(ifactors(k)[2])>1 do od; k
        end: b(1):=1:
    a:= n-> `if`(n=1, 0, numtheory[pi](ifactors(b(n))[2, 1$2])):
    seq(a(n), n=1..100);  # Alois P. Heinz, Feb 20 2020
  • Mathematica
    mxn = 500; Join[{0}, Transpose[ Sort@ Flatten[ Table[ {Prime@n^ex, n}, {n, PrimePi@ mxn}, {ex, Log[Prime@n, mxn]}], 1]][[2]]]
  • PARI
    lista(nn) = {print1(0); for(n=2, nn, if(isprimepower(n, &p), print1(", ", primepi(p)))); } \\ Jinyuan Wang, Feb 19 2020
    
  • Python
    from sympy import primepi, integer_nthroot, primefactors
    def A330669(n):
        if n == 1: return 0
        def f(x): return int(n-2+x-sum(primepi(integer_nthroot(x,k)[0]) for k in range(1,x.bit_length())))
        kmin, kmax = 1,2
        while f(kmax) >= kmax:
            kmax <<= 1
        while True:
            kmid = kmax+kmin>>1
            if f(kmid) < kmid:
                kmax = kmid
            else:
                kmin = kmid
            if kmax-kmin <= 1:
                break
        return int(primepi(primefactors(kmax)[0])) # Chai Wah Wu, Aug 20 2024

Formula

a(n) = A000720(A025473(n)). - Michel Marcus, Dec 24 2019
A000040(a(n))^A025474(n) = A000961(n) for n > 0. - Alois P. Heinz, Feb 20 2020

A082950 Power base and exponent of n-th prime power exchanged.

Original entry on oeis.org

0, 1, 1, 4, 1, 1, 9, 8, 1, 1, 16, 1, 1, 1, 32, 27, 1, 1, 25, 1, 1, 1, 1, 128, 1, 1, 1, 36, 1, 1, 1, 1, 64, 1, 1, 1, 1, 1, 1, 1, 1, 2048, 243, 1, 49, 1, 1, 1, 1, 1, 1, 1, 1, 8192, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 125, 1, 64, 1, 1, 1, 1, 1, 1, 1, 131072, 1, 1, 1, 1, 1, 1, 1, 2187, 1, 1, 1, 1
Offset: 1

Views

Author

Reinhard Zumkeller, May 26 2003

Keywords

Crossrefs

Programs

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

Formula

a(n) = A025474(n)^A025473(n) while A025473(n)^A025474(n) = A000961(n).
a(n) = 1 iff A000961(n) is prime.

Extensions

a(71) and following corrected by Georg Fischer, Dec 09 2022

A271394 1 and the prime powers (p^k, p prime, k >= 1) such that p^k - k and p^k + k are prime powers.

Original entry on oeis.org

1, 2, 3, 8, 9, 25, 32, 512, 6561, 36703368217294125441230211032033660188801
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 06 2016

Keywords

Comments

a(10) = 7^48. If it exists, a(11) > 10^100. - Giovanni Resta, Apr 12 2016

Examples

			6561 is in this sequence because 6561 = 3^8, 6561 - 8 = 6553 is prime and 6561 + 8 = 6569 is prime.
		

Crossrefs

Programs

  • Mathematica
    nn = 10^6; {1}~Join~Sort@ Apply[Power, Select[Flatten[Function[k, {#, k}] /@ Range[Floor@ Log[#, nn]] & /@ Prime@ Range@ PrimePi@ nn, 1], With[{p = First@ #, k = Last@ #}, And[Or[PrimePowerQ@ #, # == 1] &[p^k - k], Or[PrimePowerQ@ #, # == 1] &[p^k + k]]] &], 1] (* Michael De Vlieger, Apr 06 2016 *)
  • PARI
    ispp(n) = (n==1) || isprimepower(n);
    isok(n) = (n==1) || ((k=isprimepower(n)) && ispp(n+k) && ispp(n-k));
    \\ Michel Marcus, Apr 07 2016

Extensions

a(10) from Giovanni Resta, Apr 12 2016

A335089 Decimal expansion of log(Pi^2/6).

Original entry on oeis.org

4, 9, 7, 7, 0, 0, 3, 0, 2, 4, 7, 0, 7, 4, 5, 3, 4, 7, 4, 7, 4, 3, 7, 7, 3, 4, 4, 3, 2, 5, 4, 1, 5, 1, 5, 0, 5, 7, 1, 5, 9, 8, 9, 3, 3, 6, 4, 7, 6, 1, 8, 4, 3, 7, 1, 7, 1, 8, 7, 1, 7, 9, 9, 8, 1, 3, 3, 8, 7, 6, 2, 4, 5, 8, 1, 3, 4, 8, 4, 7, 7, 0, 8, 7, 7, 6, 7, 4, 5, 8, 7, 4, 0, 8, 2, 8, 6, 3, 9, 0, 7, 4, 0, 4, 8, 1
Offset: 0

Views

Author

Terry D. Grant, Sep 11 2020

Keywords

Examples

			Equals 1/(2^2) + 1/(3^2) + (1/(4^2))*(1/2) + 1/(5^2) + + 1/(7^2) + (1/(8^2))*(1/3) + ... = 0.4977003024707...
		

Crossrefs

Programs

  • Mathematica
    RealDigits[Log[Pi^2/6], 10, 120][[1]]
    RealDigits[Sum[PrimeZetaP[2 k]/k, {k, 1, inf}], 10, 120][[1]]
  • PARI
    log(Pi^2/6) \\ Michel Marcus, Sep 15 2020

Formula

Equals Sum_{k>=2} MangoldtLambda(k) / ((k^2)*log(k)).
Equals Sum_{k>=1} (1/k)*(1/(A246655(n)^2)) where k is the exponent of the prime power, A025474(n+1).
Equals Sum_{k>=1} primezeta(2*k)/k.
Equals 2*log(Pi) - log(6).
Equals log(zeta(2)) = log(A013661).
Previous Showing 31-34 of 34 results.