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.

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

A376341 Position of first appearance of n in A057820, the sequence of first differences of prime-powers, or 0 if n does not appear.

Original entry on oeis.org

1, 5, 10, 13, 19, 25, 199, 35, 118, 48, 28195587, 61, 3745011205066703, 80, 6635, 312, 1079, 207, 3249254387600868788, 179, 43580, 216, 21151968922, 615, 762951923, 403, 1962, 466, 12371, 245, 1480223716, 783, 494890212533313, 1110, 2064590, 1235, 375744164943287809536
Offset: 1

Views

Author

Gus Wiseman, Sep 22 2024

Keywords

Comments

For odd n either a(n) or a(n)+1 is in A024622 (unless a(n) = 0), corresponding to cases where the smaller or the larger term in the pair of consecutive prime powers, respectively, is a power of 2. - Pontus von Brömssen, Sep 27 2024

Examples

			a(4) = 13, because the first occurrence of 4 in A057820 is at index 13. The corresponding first pair of consecutive prime powers with difference 4 is (19, 23), and a(4) = A025528(23) = 13.
a(61) = A024622(96), because the first pair of consecutive prime powers with difference 61 is (2^96, 2^96+61), and A025528(2^96+61) = A024622(96).
		

Crossrefs

For compression instead of first appearances we have A376308.
For run-lengths instead of first appearances we have A376309.
For run-sums instead of first appearances we have A376310.
For squarefree numbers instead of prime-powers we have A376311.
The sorted version is A376340.
A000040 lists the prime numbers, differences A001223.
A000961 and A246655 list prime-powers, first differences A057820.
A024619 and A361102 list non-prime-powers, first differences A375708.
A003242 counts compressed compositions, ranks A333489.
A005117 lists squarefree numbers, differences A076259.
A116861 counts partitions by compressed sum, by compressed length A116608.

Programs

  • Mathematica
    mnrm[s_]:=If[Min@@s==1,mnrm[DeleteCases[s-1,0]]+1,0];
    q=Differences[Select[Range[100],#==1||PrimePowerQ[#]&]];
    Table[Position[q,k][[1,1]],{k,mnrm[q]}]

Formula

A057820(a(n)) = n whenever a(n) > 0. - Pontus von Brömssen, Sep 24 2024

Extensions

Definition modified by Pontus von Brömssen, Sep 26 2024
More terms from Pontus von Brömssen, Sep 27 2024

A089576 Let p_k = k-th prime, let f((p_k)^n) = m where m is the largest power of p_(k+1) < (p_k)^n. a(n) = number of iterations of f to reach 1, starting from n and starting from k = 1.

Original entry on oeis.org

0, 1, 2, 2, 3, 4, 4, 4, 5, 5, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 10, 10, 10, 11, 11, 11, 11, 11, 12, 12, 12, 13, 13, 13, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 17, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 20, 20, 20, 21, 21
Offset: 0

Views

Author

Naohiro Nomoto, Dec 29 2003

Keywords

Comments

The steps are a downward recursion in the prime powers: start at 2^n in A000961, i.e., at A000961(A024622(n)); skip to the left to the next smaller power 3^e_3 (see A024623), then to the left to the next smaller power 5^e_5, to the left to the next smaller power 7^e_7 etc., and count the steps to reach 1. - R. J. Mathar, Sep 08 2021

Examples

			a(5)=4 as f(2^5)=3^3 < 2^5, f(3^3)=5^2 < 3^3, f(5^2)=7 < 5^2 and f(7)=11^0 < 7.
		

Crossrefs

Row lengths of A347285.

Programs

  • Maple
    # largest exponent m of prime(k+1)^m< prime(k)^n.
    A089576f := proc(k,n)
        local pkn,pplus,m ;
        pkn := ithprime(k)^n ;
        pplus := ithprime(k+1) ;
        for m from 1 do
            if pplus^m >= pkn then
                return m-1 ;
            end if;
        end do:
    end proc:
    A089576 := proc(n)
        local itr,m;
        if n = 0 then
            return 0 ;
        end if;
        m := n ;
        for itr from 1 do
            m := A089576f(itr,m) ;
            if m = 0 then
                return itr ;
            end if;
        end do:
    end proc:
    seq(A089576(n),n=0..80) ; # R. J. Mathar, Sep 07 2021
  • Mathematica
    Array[-1 + Length@ NestWhile[Append[#1, #2^Floor@ Log[#2, #1[[-1]]]] & @@ {#, Prime[Length@ # + 1]} &, {2^#}, #[[-1]] > 1 &] &, 71, 0] (* Michael De Vlieger, Sep 08 2021 *)

Extensions

More terms from Michael De Vlieger, Sep 08 2021

A192015 Arithmetic derivative of prime powers: a(n) = A003415(A000961(n)).

Original entry on oeis.org

0, 1, 1, 4, 1, 1, 12, 6, 1, 1, 32, 1, 1, 1, 10, 27, 1, 1, 80, 1, 1, 1, 1, 14, 1, 1, 1, 192, 1, 1, 1, 1, 108, 1, 1, 1, 1, 1, 1, 1, 1, 22, 75, 1, 448, 1, 1, 1, 1, 1, 1, 1, 1, 26, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 405, 1, 1024, 1, 1, 1, 1, 1, 1, 1, 34
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 26 2011

Keywords

Comments

a(A000040(n)) = 1; a(A002808(n)) > 1;
A001787, A027471, A100484, A079705 and A051674 are subsequences;
A001787 and A024622 give record values and where they occur;
A192016(n) = A003415(a(n)).

Programs

  • Haskell
    a192015 = a003415 . a000961  -- Reinhard Zumkeller, Apr 16 2014
    
  • Mathematica
    Join[{0}, Reap[For[n = 1, n <= 300, n++, f = FactorInteger[n]; If[Length[f] == 1, Sow[n*Total[Apply[#2/#1&, f, {1}]]]]]][[2, 1]]] (* Jean-François Alcover, Feb 21 2014 *)
  • Python
    from sympy import primepi, integer_nthroot, factorint
    def A192015(n):
        if n == 1: return 0
        def f(x): return int(n+x-1-sum(primepi(integer_nthroot(x,k)[0]) for k in range(1,x.bit_length())))
        m, k = n, f(n)
        while m != k:
            m, k = k, f(k)
        return sum((m*e//p for p,e in factorint(m).items())) # Chai Wah Wu, Aug 15 2024

Formula

a(n) = A025474(n) * 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)).
Showing 1-5 of 5 results.