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

A257278 Prime powers p^m with p <= m.

Original entry on oeis.org

4, 8, 16, 27, 32, 64, 81, 128, 243, 256, 512, 729, 1024, 2048, 2187, 3125, 4096, 6561, 8192, 15625, 16384, 19683, 32768, 59049, 65536, 78125, 131072, 177147, 262144, 390625, 524288, 531441, 823543, 1048576, 1594323, 1953125, 2097152, 4194304, 4782969, 5764801, 8388608, 9765625
Offset: 1

Views

Author

M. F. Hasler, Apr 28 2015

Keywords

Comments

Might be called "high" powers of primes. Motivated by challenges for which low powers of large primes provide somewhat trivial solutions, cf. A257279. The definition also avoids the question of the whether prime itself is to be considered as a prime power or not, cf. A000961 vs. A025475. In view of the condition p <= n, up to 10^10, only powers of the primes 2, 3, 5 and 7 (namely, less than 10) can occur.

Crossrefs

Cf. A000040, A051674 (subsequence).
Subsequence of A122494 and A192135 (p < m, subsequence).

Programs

  • Haskell
    import Data.Set (singleton, deleteFindMin, insert)
    a257278 n = a257278_list !! (n-1)
    a257278_list = f (singleton (4, 2)) 27 (tail a000040_list) where
       f s pp ps@(p:ps'@(p':_))
         | qq > pp   = pp : f (insert (pp * p, p) s) (p' ^ p') ps'
         | otherwise = qq : f (insert (qq * q, q) s') pp ps
         where ((qq, q), s') = deleteFindMin s
    -- Reinhard Zumkeller, May 01 2015
  • Mathematica
    seq[lim_] := Module[{s = {}, p = 2}, While[p^p <= lim, AppendTo[s, p^Range[p, Log[p, lim]]]; p = NextPrime[p]]; Sort[Flatten[s]]]; seq[10^7] (* Amiram Eldar, Apr 14 2025 *)
  • PARI
    L=List();lim=10;forprime(p=1,lim,for(n=p,lim*log(lim)\log(p),listput(L,p^n)));listsort(L);L
    

Formula

a(n) = A257572(n) ^ A257573(n). - Reinhard Zumkeller, May 01 2015
Sum_{n>=1} 1/a(n) = Sum_{p prime} 1/(p^(p-1)*(p-1)) = 0.55595697220270661763... - Amiram Eldar, Oct 24 2020

A257569 Triangular array read by rows: T(h,k) = number of steps from (h,k) to (0,0), where one step is (x,y) -> (x-1, y) if x is odd or (x,y) -> (y, x/2) if x is even.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, May 01 2015

Keywords

Comments

The number of pairs (h,k) satisfying T(h,k) = n is F(n), where F = A000045, the Fibonacci numbers. The number of such pairs having odd h is F(n-2), and the number having even h is F(n-1).
Let c(n,k) be the number of pairs (h,k) satisfying T(h,k) = n; in particular, c(n,0) is the number of integers (pairs of the form (h,0)) satisfying T(h,0) = n. Let p(n) = A000931(n). Then c(n,0) = p(n+3) for n >= 0. More generally, for fixed k >=0, the sequence satisfies the recurrence r(n) = r(n-2) + r(n-3) except for initial terms.
The greatest h for which some (h,k) is n steps from (0,0) is H = A029744(n-1) for n >= 2, and the only such pair is (H,0).
T(n,k) is also the number of steps from h + k*sqrt(2) to 0, where one step is x + y*sqrt(2) -> x-1 + y*sqrt(2) if x is odd, and x + sqrt(y) -> y + (x/2)*sqrt(2) if x is even.

Examples

			First ten rows:
0
1   2
3   3   4
4   4   5   5
5   5   5   6   6
6   6   6   6   7   7
6   7   6   7   7   8   7
7   7   7   7   8   8   8   8
7   8   7   8   7   9   8   9   8
8   8   8   8   8   8   9   9   9   9
Row 3 counts the pairs (2,0), (1,1), (0,2), for which the paths to (0,0) are as shown here:
(2,0) -> (0,1) -> (1,0) -> (0,0)  (3 steps);
(1,1) -> (0,1) -> (1,0) -> (0,0)  (3 steps);
(0,2) -> (2,0) -> (0,1) -> (1,0) -> (0,0) (4 steps).
		

Crossrefs

Programs

  • Mathematica
    f[{x_, y_}] := If[EvenQ[x], {y, x/2}, {x - 1, y}];
    g[{x_, y_}] := Drop[FixedPointList[f, {x, y}], -1];
    h[{x_, y_}] := -1 + Length[g[{x, y}]];
    t = Table[h[{n - k, k}], {n, 0, 16}, {k, 0, n}];
    TableForm[t] (* A257569 array *)
    Flatten[t]   (* A257569 sequence *)

A257573 Exponents in A257278 = powers of primes p^m, p <= m.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, May 01 2015

Keywords

Crossrefs

Programs

  • Haskell
    a257573 = a001222 . a257278
    
  • Mathematica
    seq[lim_] := Module[{s = {}, p = 2, r}, While[p^p <= lim, r = Range[p, Log[p, lim]]; AppendTo[s, Transpose[{r, p^r}]]; p = NextPrime[p]]; SortBy[Flatten[s, 1], Last][[;; , 1]]]; seq[10^13] (* Amiram Eldar, Apr 14 2025 *)
  • PARI
    apply(bigomega,A257278) \\ (A257278 assumed to be defined as vector). - M. F. Hasler, May 02 2015

Formula

a(n) = A001222(A257278(n)).
A257278(n) = A257572(n) ^ a(n).
A257572(n) <= a(n) by definition of A257278.

Extensions

Edited by M. F. Hasler, May 02 2015
Showing 1-3 of 3 results.