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-10 of 14 results. Next

A255134 First differences of A097764.

Original entry on oeis.org

12, 11, 9, 28, 36, 44, 52, 20, 40, 68, 76, 84, 92, 100, 53, 55, 116, 124, 132, 140, 148, 156, 128, 36, 172, 180, 188, 196, 204, 212, 209, 11, 228, 11, 225, 244, 252, 260, 268, 276, 284, 292, 300, 56, 252, 316, 324, 332, 340, 348, 356, 364, 372, 380, 45, 343
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 14 2015

Keywords

Comments

a(n) = A097764(n+1) - A097764(n);
conjecture: a(n) > 1; empirically: Min{a(n): 1 <= n <= 10^7} = 9;
a(A255137(n)) = A255136(n) and a(m) < A255136(n) for m < A255137(n).

Crossrefs

Cf. A097764, record values and where they occur: A255136, A255137.

Programs

  • Haskell
    a255134 n = a255134_list !! (n-1)
    a255134_list = zipWith (-) (tail a097764_list) a097764_list
  • Mathematica
    nMax = 10000; n = 1; lst = Reap[While[p = Prime[n]; p^p <= nMax, k = 1; While[(k*p)^p <= nMax, Sow[(k*p)^p]; k++]; n++]][[2, 1]]; Union[lst] // Differences (* Jean-François Alcover, Oct 20 2016, after T. D. Noe *)

A051674 a(n) = prime(n)^prime(n).

Original entry on oeis.org

4, 27, 3125, 823543, 285311670611, 302875106592253, 827240261886336764177, 1978419655660313589123979, 20880467999847912034355032910567, 2567686153161211134561828214731016126483469, 17069174130723235958610643029059314756044734431
Offset: 1

Views

Author

Keywords

Comments

Numbers k such that bigomega(k)^(bigomega(k)) = k, where bigomega = A001222. - Lekraj Beedassy, Aug 21 2004
Positive k such that k' = k, where k' is the arithmetic derivative of k. - T. D. Noe, Oct 12 2004
David Beckwith proposes (in the AMM reference): "Let n be a positive integer and let p be a prime number. Prove that (p^p) | n! implies that (p^(p + 1)) | n!". - Jonathan Vos Post, Feb 20 2006
Subsequence of A100716; A003415(m*a(n)) = A129283(m)*a(n), especially A003415(a(n)) = a(n). - Reinhard Zumkeller, Apr 07 2007
A168036(a(n)) = 0. - Reinhard Zumkeller, May 22 2015

Examples

			a(1) = 2^2 = 4.
a(2) = 3^3 = 27.
a(3) = 5^5 = 3125.
		

References

  • J.-M. De Koninck & A. Mercier, 1001 Problemes en Theorie Classique Des Nombres, Problem 740 pp. 95; 312, Ellipses Paris 2004.

Crossrefs

Cf. A000040, A000312, A003415 (arithmetic derivative of n), A129150, A129151, A129152, A048102, A072873 (multiplicative closure), A104126.
Subsequence of A100717; A203908(a(n)) = 0.
Subsequence of A097764.
Cf. A168036, A094289 (decimal expansion of Sum(1/p^p)).

Programs

Formula

a(n) = A000312(A000040(n)). - Altug Alkan, Sep 01 2016
Sum_{n>=1} 1/a(n) = A094289. - Amiram Eldar, Oct 13 2020

A097792 Numbers of the form 4k^4 or (kp)^p for prime p > 2 and k = 1, 2, 3, ....

Original entry on oeis.org

4, 27, 64, 216, 324, 729, 1024, 1728, 2500, 3125, 3375, 5184, 5832, 9261, 9604, 13824, 16384, 19683, 26244, 27000, 35937, 40000, 46656, 58564, 59319, 74088, 82944, 91125, 100000, 110592, 114244, 132651, 153664, 157464, 185193, 202500, 216000
Offset: 1

Views

Author

T. D. Noe, Aug 24 2004

Keywords

Comments

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.

Crossrefs

Cf. A093324 (least k such that n^k+k is prime), A097764 (numbers of the form (kp)^p).

Programs

  • Mathematica
    nMax=500000; lst={}; k=1; While[4k^4<=nMax, AppendTo[lst, 4k^4]; k++ ]; n=2; While[p=Prime[n]; p^p<=nMax, k=1; While[(k*p)^p<=nMax, AppendTo[lst, (k*p)^p]; k++ ]; n++ ]; Union[lst]
  • PARI
    upto(n) = {my(res = List()); for(i = 1, sqrtnint(n \ 4, 4), listput(res, 4*i^4) ); forprime(p = 3, log(n), pp = p^p; for(k = 1, sqrtnint(n \ pp, p), listput(res, pp * k ^ p); ) ); listsort(res); res } \\ David A. Corneth, Jan 12 2019
    
  • PARI
    select( {is_A097792(n, p=0)= n%4==0 && ispower(n\4,4) || ((2 < p = ispower(n,,&n)) && if(isprime(p), n%p==0, foreach(factor(p)[,1], q, q%2 && n%q==0 && return(1))))}, [1..10^4]) \\ M. F. Hasler, Jul 07 2024
    
  • Python
    from sympy import isprime, perfect_power, primefactors
    def is_A097792(n):
        return n%4==0 and (perfect_power(n//4,[4]) or n==4) or (
            p := perfect_power(n)) and p[1] > 2 and (p[0]%p[1]==0 if isprime(p[1])
            else any(p[0]%q==0 for q in primefactors(p[1]) if q > 2))
    # M. F. Hasler, Jul 07 2024

Formula

Is a(n) ~ c * n^3? - David A. Corneth, Jan 12 2019

A303121 Least k>1 such that k^n + n is prime, 0 if no such k exists.

Original entry on oeis.org

2, 3, 2, 0, 2, 175, 16, 3, 2, 539, 32, 221, 118, 417, 2, 85, 14, 133, 22, 81, 76, 115, 12, 55, 28, 15, 0, 2465, 110, 31, 232, 117, 230, 3, 12, 851, 4, 375, 2, 1599, 48, 5461, 46, 15, 218, 6815, 78, 7, 100, 993, 28, 901, 624, 13, 252, 183, 226, 43247, 104, 5063, 1348, 777, 1294, 0, 1806
Offset: 1

Views

Author

Hugo Pfoertner, Apr 23 2018

Keywords

Comments

The values of n for which k^n + n is reducible over the integers are given in A097792. - Joseph Myers, Allan C. Wechsler Apr 16 2018

Examples

			a(2) = 3 because 3^2 + 3 = A303122(2) = 11 is prime, whereas 2^2 + 2 = 6 is composite.
		

Crossrefs

Formula

If n + 1 is composite, then a(n) = A072883(n). - Altug Alkan, Apr 23 2018

A255136 Records in A255134.

Original entry on oeis.org

12, 28, 36, 44, 52, 68, 76, 84, 92, 100, 116, 124, 132, 140, 148, 156, 172, 180, 188, 196, 204, 212, 228, 244, 252, 260, 268, 276, 284, 292, 300, 316, 324, 332, 340, 348, 356, 364, 372, 380, 396, 404, 412, 420, 428, 436, 444, 452, 460, 476, 484, 492, 500
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 15 2015

Keywords

Comments

a(n) = A255134(A255137(n)) and A255134(m) < a(n) for m < A255137(n).

Crossrefs

Programs

  • Haskell
    a255136 n = a255136_list !! (n-1)
    (a255136_list, a255137_list) = unzip $ f [1..] a255134_list (-1) where
       f (x:xs) (y:ys) r = if y > r then (y, x) : f xs ys y else f xs ys r

A255137 Where records occur in A255134.

Original entry on oeis.org

1, 4, 5, 6, 7, 10, 11, 12, 13, 14, 17, 18, 19, 20, 21, 22, 25, 26, 27, 28, 29, 30, 33, 36, 37, 38, 39, 40, 41, 42, 43, 46, 47, 48, 49, 50, 51, 52, 53, 54, 57, 58, 59, 60, 61, 62, 63, 64, 65, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 81, 82, 83, 84, 85, 86
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 15 2015

Keywords

Comments

A255134(a(n)) = A255136(n) and A255134(m) < A255136(n) for m < a(n).

Crossrefs

Programs

  • Haskell
    a255137 n = a255137_list !! (n-1)  -- a255137_list is defined in A255136.

A239279 Smallest k such that n^k - k^n is prime, or 0 if no such number exists.

Original entry on oeis.org

5, 1, 1, 14, 1, 20, 1, 10, 273, 14, 1, 38, 1, 68, 0
Offset: 2

Views

Author

Derek Orr, Mar 14 2014

Keywords

Comments

It is believed that for all n > 4 and not in A097764, a(n) > 0.
a(n+1) = 1 if and only if n is prime.
If a(n) > 0 then a(n) and n are coprime.
If n is in the sequence A097764, then a(n) = 0 or 1 since n^k-k^n is factorable.
33^2570 - 2570^33 is a probable prime, so a(33) is probably 2570. - Jon E. Schoenfield, Mar 20 2014
Unknown a(n) values checked for k <= 10000 using PFGW. a(97) = 6006 found by Donovan Johnson in 2005. The Lifchitz link shows some large candidates for larger n but a smaller k exists in many of those cases. - Jens Kruse Andersen, Aug 13 2014
Unknown a(n) values checked for k <= 15000 using PFGW.

Examples

			2^1-1^2 = 1 is not prime. 2^2-2^2 = 0 is not prime. 2^3-3^2 = -1 is not prime. 2^4-4^2 = 0 is not prime. 2^5-5^2 = 7 is prime. So a(2) = 5.
		

Crossrefs

Programs

  • PARI
    a(n)=k=1; if(n>4, forprime(p=1, 100, if(ispower(n)&&ispower(n)%p==0&&n%p==0, return(0)); if(n%p==n, break))); k=1; while(!ispseudoprime(n^k-k^n), k++); return(k)
    vector(15, n, a(n+1))
  • Python
    import sympy
    from sympy import isprime
    from sympy import gcd
    def Min(x):
      k = 1
      while k < 5000:
        if gcd(k,x) == 1:
          if isprime(x**k-k**x):
            return k
          else:
            k += 1
        else:
          k += 1
    x = 1
    while x < 100:
      print(Min(x))
      x += 1
    

A239735 Least number k such that n*k^n +/- 1 are twin primes, or a(n) = 0 if no such number exists.

Original entry on oeis.org

4, 3, 4, 1, 570, 1, 1464, 54, 60, 14025, 1932, 1, 7194, 15, 3612, 0, 4746, 1, 540, 150, 7060, 138, 80094, 6160, 33480, 93135, 0, 366618, 26058, 1, 90510, 16836, 9824, 418875, 57246, 0, 182394, 64077, 14178, 943410, 36078, 1, 314520, 15870, 194942, 15044700, 241944, 3871, 308730
Offset: 1

Views

Author

Derek Orr, Mar 30 2014

Keywords

Comments

a(n) = 1 iff n is in A014574.
If a(n) = 0, then n is in A097764.
If a(n) > 1 then A367566(n) divides a(n). - Jon E. Schoenfield, Nov 23 2023

Examples

			1*1^1+1 (2) and 1*1^1-1 (0) are not both prime. 1*2^1+1 (3) and 1*2^1-1 (1) are not both prime. 1*3^1+1 (4) and 1*3^1-1 (2) are not both prime. 1*4^1+1 (5) and 1*4^1-1 (3) are both prime. So, a(1) = 4.
		

Crossrefs

Programs

  • Mathematica
    zeroQ[n_] := Module[{f = FactorInteger[n]}, pow = GCD @@ f[[;; , 2]]; n > 4 && AnyTrue[Divisors[pow], # > 1 && Divisible[n, #] &]];
    a[n_, kmax_] := Module[{k = 1}, If[zeroQ[n], 0, While[k <= kmax && ! And @@ PrimeQ[n*k^n + {-1, 1}], k++]; If[k < kmax, k, -1]]]; Table[a[n, 10^6], {n, 1, 25}] (* Amiram Eldar, Nov 18 2023, returns -1 if the search limit should exceed kmax *)
  • PARI
    bot(n) = for(k=1, 10^5, if(ispseudoprime(n*k^n-1), if(ispseudoprime(n*k^n+1), return(k))));
    n=1; while(n<100, print1(bot(n), ", "); n+=1)
    
  • PARI
    a(n) = if ((n==16) || (n==27) || (n==36) || (n==64) /* || (n== ... */, return(0)); my(k=1); while (!(ispseudoprime(n*k^n-1) && ispseudoprime(n*k^n+1)), k++); k; \\ Michel Marcus, Nov 18 2023

Extensions

a(46) from Giovanni Resta, Mar 31 2014

A239938 a(n) = least number k > 0 such that n*k^n - 1 is prime, or 0 if no such k exists.

Original entry on oeis.org

3, 2, 1, 1, 4, 1, 8, 1, 40, 3, 10, 1, 56, 1, 10, 0, 46, 1, 6, 1, 42, 51, 4, 1, 8, 67, 0, 18, 102, 1, 98, 1, 38, 6, 136, 0, 90, 1, 10, 3, 52, 1, 12, 1, 18, 3, 28, 1, 72, 165, 40, 657, 418, 1, 44, 205, 94, 9, 426, 1, 482, 1, 4, 0, 418, 252, 38, 1, 400, 165, 28, 1, 140
Offset: 1

Views

Author

Derek Orr, Mar 29 2014

Keywords

Comments

a(n) = 1 iff n-1 is prime.
If a(n) = 0 then n is in A097764. Note the converse is not true: a(4) = 1, not 0.
Up to a(1000), the largest term is a(456) = 947310. The PFGW program has been used to certify all the terms up to a(1000), using the 'N+1' deterministic test. - Giovanni Resta, Mar 30 2014

Examples

			1*1^1 - 1 = 0 is not prime. 1*2^1 - 1 = 1 is not prime. 1*3^1 - 1 = 2 is prime. Thus a(1) = 3.
		

Crossrefs

Programs

  • Mathematica
    nope[n_] := n > 4 && Catch@Block[{p = 2}, While[n >= p^p, If[ IntegerQ[ n^(1/p)/p], Throw@ True]; p = NextPrime@ p]; False]; a[n_] := If[nope@ n, 0, Block[{k = 1}, While[! PrimeQ[n*k^n - 1], k++]; k]]; Array[a, 80] (* Giovanni Resta, Mar 30 2014 *)
    A239938[n_] := If[n != 4 && # != 1 && GCD[n, #] != 1 &[GCD @@ FactorInteger[n][[All, -1]]], 0, NestWhile[# + 1 &, 1, Not@PrimeQ[n #^n - 1] &]]; Array[A239938, 73] (* JungHwan Min, Dec 28 2015 *)
  • PARI
    Pro(n) = for(k=1,10^4,if(ispseudoprime(n*k^n-1),return(k)));
    n=1; while(n<100,print1(Pro(n), ", ");n+=1)

A281141 Least number b > 2 such that n*b^n - 1 is a prime number or 0 if no such b exists.

Original entry on oeis.org

3, 3, 4, 0, 4, 3, 8, 4, 40, 3, 10, 8, 56, 4, 10, 0, 46, 3, 6, 6, 42, 51, 4, 6, 8, 67, 0, 18, 102, 18, 98, 34, 38, 6, 136, 0, 90, 17, 10, 3, 52, 5, 12, 8, 18, 3, 28, 132, 72, 165, 40, 657, 418, 101, 44, 205, 94, 9, 426, 10, 482, 36, 4, 0, 418, 252, 38, 7
Offset: 1

Views

Author

Pierre CAMI, Jan 15 2017

Keywords

Comments

By definition, if b < n+2 then the prime n*b^n - 1 is a generalized Woodall prime.
a(n) = 0 if n is in A097764. - Robert Israel, Jan 15 2017
From Robert G. Wilson v, Jan 20 2017: (Start)
Odd terms are about 3/14 of the total.
Records: 3, 4, 8, 40, 56, 67, 102, 136, 165, 657, 882, 1442, 4080, 5146, 6388, 8617, 9440, 13470, 19285, 22155, 947310, ..., .
Indices of prime terms: 1, 2, 6, 10, 18, 26, 38, 40, 42, 46, 54, 68, 84, 86, 110, ..., .
Indices of perfect power terms: 3, 5, 7, 8, 12, 14, 23, 25, 44, 58, 62, 63, 69, 107, ..., .
(End)

Examples

			1*3^1 - 1 = 2 prime, so a(1) = 3.
2*3^2 - 1 = 17 prime, so a(2) = 3.
3*4^3 - 1 = 191 prime, so a(3) = 4.
4*b^4 - 1 = (2*b^2)^2 - 1 = (2*b^2 + 1)*(2*b^2 - 1), which is always composite, so a(4) = 0.
		

Crossrefs

Programs

  • Mathematica
    lst = {* the terms in A097764 *}; f[n_] := If[ MemberQ[lst, n], 0, Block[{b = 3}, While[ !PrimeQ[n*b^n - 1], b++]; b]]; Array[f, 70] (* Robert G. Wilson v, Jan 20 2017 *)
Showing 1-10 of 14 results. Next