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.

A097764 Numbers of the form (kp)^p for prime p and k=1,2,3,....

Original entry on oeis.org

4, 16, 27, 36, 64, 100, 144, 196, 216, 256, 324, 400, 484, 576, 676, 729, 784, 900, 1024, 1156, 1296, 1444, 1600, 1728, 1764, 1936, 2116, 2304, 2500, 2704, 2916, 3125, 3136, 3364, 3375, 3600, 3844, 4096, 4356, 4624, 4900, 5184, 5476, 5776, 5832, 6084, 6400
Offset: 1

Views

Author

T. D. Noe, Aug 24 2004

Keywords

Comments

The polynomial x^n - n is reducible over the integers for n in this sequence.
A result of Vahlen shows that the polynomial x^n - n is reducible over the integers for n in this sequence and no other n.
The representation (k*p)^p is generally not unique, e.g. a(120) = 46656 = (108*2)^2 = (12*3)^3. - Reinhard Zumkeller, Feb 14 2015
This is also numbers of the form (km)^m for any m > 1, not just primes. Let m be > 1; then m has a prime factor, so let m=pj, p a prime and j an integer > 0. Then (km)^m = (kpj)^pj = (k^j p^j j^j)^p = ((k^j p^(j-1) j^j) p) ^ p. - Franklin T. Adams-Watters, Sep 13 2015

Crossrefs

Cf. A084746 (least k such that n^k-k is prime).
Cf. A097792 (numbers of the form 4k^4 or (kp)^p).
Cf. A000040, A051674, A255134 (first differences).

Programs

  • Haskell
    import Data.Set (singleton, deleteFindMin, insert)
    a097764 n = a097764_list !! (n-1)
    a097764_list = f 0 (singleton (4, 2, 2)) $
                     tail $ zip a051674_list a000040_list where
       f m s ppps'@((pp, p) : ppps)
         | pp < qq   = f m (insert (pp, p, 2) s) ppps
         | qq == m   = f m (insert ((k * q) ^ q, q, k + 1) s') ppps'
         | otherwise = qq : f qq (insert ((k * q) ^ q, q, k + 1) s') ppps'
         where ((qq, q, k), s') = deleteFindMin s
    -- Reinhard Zumkeller, Feb 14 2015
    
  • Mathematica
    nMax=10000; lst={}; n=1; While[p=Prime[n]; p^p<=nMax, k=1; While[(k*p)^p<=nMax, AppendTo[lst, (k*p)^p]; k++ ]; n++ ]; Union[lst]
  • PARI
    is(n)=my(b,e=ispower(n,,&b),f); if(e==0, return(0)); f=factor(e)[,1]; for(i=1,#f, if(b%f[i]==0, return(1))); 0 \\ Charles R Greathouse IV, Aug 29 2016

A099228 Primes of the form m^k-k, with m and k > 1.

Original entry on oeis.org

2, 5, 7, 23, 47, 61, 79, 167, 223, 359, 439, 503, 509, 727, 839, 997, 1019, 1087, 1223, 1367, 1847, 2207, 2399, 2741, 3023, 3719, 3967, 4093, 4759, 5039, 5623, 5927, 6553, 7919, 8179, 8647, 10607, 11447, 13687, 14159, 14639, 15619, 16127, 17159, 17573
Offset: 1

Views

Author

T. D. Noe, Oct 06 2004

Keywords

Comments

It appears that primes of this form are much more common than primes of the form m^k+k (A099227).

Crossrefs

Cf. A057897 (numbers of the form m^k-k, with m and k > 1), A084746 (least k such that n^k-k is prime).
Cf. A099227.

Programs

  • Mathematica
    nLim=32000; lst={}; Do[k=2; While[n=m^k-k; n<=nLim, AppendTo[lst, n]; k++ ], {m, 2, Sqrt[nLim]}]; Select[Union[lst], PrimeQ]

A084745 Smallest prime of the form n^k - k, or 0 if no such prime exists.

Original entry on oeis.org

2, 2, 3, 23, 5, 47, 7, 79, 997, 5559917313492231463, 11, 167, 13, 223, 4093, 24137563, 17, 359, 19, 439, 10947877107572929152919737180202022857988400441953615831
Offset: 2

Views

Author

Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jun 15 2003

Keywords

Comments

a(11) > 379749833583227. Conjecture: No entry is zero.
a(23) is 150 digits long and too long to include. - Alec Mihailovs (Alec(AT)Mihailovs.com), Jun 16 2003
If n-1 is a prime then a(n)=n-1. - Farideh Firoozbakht, Aug 09 2014

Examples

			a(7) = 47 = 7^2 - 2.
		

Crossrefs

Cf. A084746.

Programs

  • Maple
    a := proc(n) local k; k := 1; while not isprime(n^k-k) do k := k+1 od; n^k-k end: seq(a(n),n=2..35);
  • Mathematica
    sp[n_]:=Module[{k=1},While[!PrimeQ[n^k-k],k++];n^k-k]; Array[sp,21,2] (* Harvey P. Dale, Jul 22 2021 *)
  • PARI
    a(n)=my(k=1);while(!ispseudoprime(n^k-k),k++);return(n^k-k)
    vector(20, n, a(n+1)) \\ Derek Orr, Aug 08 2014

Formula

a(n) = n^A084746(n) - A084746(n). - Michel Marcus, Aug 09 2014

Extensions

More terms from Alec Mihailovs (Alec(AT)Mihailovs.com), Jun 16 2003
Showing 1-3 of 3 results.