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

A104127 (1+prime(n))^prime(n).

Original entry on oeis.org

9, 64, 7776, 2097152, 743008370688, 793714773254144, 2185911559738696531968, 5242880000000000000000000, 55572324035428505185378394701824, 6863037736488300000000000000000000000000000
Offset: 1

Views

Author

Cino Hilliard, Mar 06 2005

Keywords

Comments

Sum of reciprocals rapidly converges to 0.1268651887726617214821302614..

Programs

  • Mathematica
    (1+#)^#&/@Prime[Range[20]] (* Harvey P. Dale, Nov 19 2015 *)
  • Maxima
    A104127(n) := block(
            return((1+A000040(n))^A000040(n))
      )$
      for n : 1 thru 20 do printf(true,"~d,",A104127(n)) ; /* R. J. Mathar, Feb 27 2012 */
  • PARI
    ptopp1(n) = { local(x,z,sr=0); forprime(x=1,n, z=(x+1)^x; sr+=1./z; print1(z","); ); print(); print(sr) }
    

Extensions

Definition (which equaled A078422) corrected and dummy variables in PARI program removed by R. J. Mathar, Oct 23 2009

A140893 a(n) = prime(n)^prime(n+1) - prime(n+1)^prime(n).

Original entry on oeis.org

-1, 118, 61318, 1957839572, 32730551749894, 8640511341348431996, 233592048827366522661214, 257755012474380136537664158772, 3091054326372819773383775097721670599074, 2141662167055484666186673758527328459608763158
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jul 07 2008

Keywords

Comments

a(n) > 0 for n>=2. - Robert Israel, Nov 02 2014
a(n) = A053089(n) - A078422(n). - Michel Marcus, Oct 10 2016

Examples

			n=1: a(1) = prime(1)^prime(1+1) - prime(1+1)^prime(1) = 2^3 - 3^2 = 8 - 9 = -1.
n=3: a(3) = prime(3)^prime(4) - prime(4)^prime(3) = 5^7 - 7^5 = 78125 - 16807 = 61318.
		

Crossrefs

Programs

  • Magma
    [NthPrime(n)^NthPrime(n+1)-NthPrime(n+1)^NthPrime(n): n in [1..10]]; // Vincenzo Librandi, Nov 02 2014
  • Maple
    seq(ithprime(i)^ithprime(i+1)-ithprime(i+1)^ithprime(i), i=1..20); # Robert Israel, Nov 02 2014
  • Mathematica
    Array[Prime[ # ]^Prime[ #+1]-Prime[ #+1]^Prime[ # ]&,16] (* Vladimir Joseph Stephan Orlovsky, Oct 11 2009 *)

Extensions

Corrected and extended by Vladimir Joseph Stephan Orlovsky, Oct 11 2009
a(10) from Vincenzo Librandi, Nov 02 2014

A277341 a(n) is the nearest integer to prime(n)^prime(n+1)/prime(n+1)^prime(n).

Original entry on oeis.org

1, 2, 5, 101, 19, 873, 44, 3455, 716066, 122, 3682385, 42002, 239, 74612, 38038256, 75356321, 487, 168475200, 414001, 701, 473945370, 786827, 996734911, 1854156102515, 1757001, 1408, 2223586, 1578, 2777435, 102598699146418244788937, 5067957, 14314401926, 2577, 172311367283303079, 3045
Offset: 1

Views

Author

Ahmad J. Masad, Oct 09 2016

Keywords

Comments

Conjecture 1: For each positive integer m, there exists a minimum sufficiently large positive integer r that depends on m, such that taking any two distinct positive integers r1, r2 >= r, we have abs(a(r1) - a(r2)) >= m. For the special case of m=1 it is conjectured that r=1, which would imply (if the conjecture were true) that all terms of this sequence are distinct. - Ahmad J. Masad, Jun 28 2018
A complementary conjecture to Conjecture 1: For each nonnegative integer q, there are infinitely many possible positive integers k, t, w, s such that k < t <= w < s and (t-k) > (s-w) and abs((the nearest integer to (k^t/t^k)) - (the nearest integer to (w^s/s^w))) = q. These two conjectures together describe partially the significance of the set of primes among the set of natural numbers. - Ahmad J. Masad, Mar 29 2018
Conjecture 3: The Riemann hypothesis is true if and only if all terms of this sequence are distinct. This conjecture idea comes from the visual representation of the logarithmic scatterplot of the first 10000 terms of this sequence. - Ahmad J. Masad, Jan 09 2019
Conjecture 4: For each value of n, a(n+1) > a(n) if and only if A058077(n+1) > A058077(n), checked for n <= 10000. Note that the logarithmic scatterplot of A058077 seems to be similar to the logarithmic scatterplot of this sequence. - Ahmad J. Masad, Jun 28 2019
Notification: the conjecture that says that all terms of this sequence are distinct has been checked for the first 10000 terms; that is, the first 10000 terms of this sequence are distinct. - Ahmad J. Masad, Aug 25 2019
Conjecture 5: For each value of n > 1, if a(n) has the same number of digits as a(n+1) and a(n+1) > a(n), then prime(n+2) - prime(n+1) = prime(n+1) - prime(n). This conjecture has been verified for all n < 10000. - Ahmad J. Masad, Oct 08 2019

Examples

			For n = 4, we have ((prime(4)^prime(5))/(prime(5)^prime(4))) = (7^11)/(11^7) = 1977326743/19487171 = 101.4681271..., and 101 is the nearest integer to 101.4681271..., so a(4) = 101.
		

Crossrefs

Programs

  • Magma
    [Round((NthPrime(n)^NthPrime(n+1))/(NthPrime(n+1)^NthPrime(n))): n in [1..40]]; // Vincenzo Librandi Oct 18 2016
    
  • Mathematica
    Table[Round[((Prime[n]^Prime[n + 1])/(Prime[n + 1]^Prime[n]))], {n, 35}] (* Michael De Vlieger, Oct 14 2016 *)
    Round[(#[[1]]^#[[2]])/#[[2]]^#[[1]]]&/@Partition[Prime[Range[40]],2,1] (* Harvey P. Dale, Jun 29 2022 *)
  • PARI
    a(n) = round(prime(n)^prime(n+1)/prime(n+1)^prime(n)); \\ Michel Marcus, Jan 13 2018

A373495 a(1) = 2; thereafter, a(n) = prime(n)^prime(n-1) (mod 10).

Original entry on oeis.org

2, 9, 5, 7, 1, 7, 7, 9, 7, 9, 1, 3, 1, 3, 3, 7, 9, 1, 7, 1, 7, 9, 7, 9, 7, 1, 3, 3, 9, 3, 7, 1, 3, 9, 9, 1, 3, 3, 3, 7, 9, 1, 1, 7, 7, 9, 1, 7, 3, 9, 3, 9, 1, 1, 3, 3, 9, 1, 3, 1, 3, 7, 7, 1, 7, 7, 1, 3, 7, 9, 3, 9, 3, 7, 9, 7, 9, 7, 1, 9, 9, 1, 1, 7, 9, 7, 9, 7, 1, 3, 3, 9, 3, 1, 9, 7, 9, 1, 3, 1, 7, 3, 3, 9, 1
Offset: 1

Views

Author

Robert G. Wilson v, Jun 06 2024

Keywords

Comments

This sequence is not periodic.

Examples

			a(2) = 3^2 (mod 10) = 9.
a(3) = 5^3 (mod 10) = 5.
		

References

  • Ilan Vardi, "Computational Recreations in Mathematica," Addison-Wesley Publishing, Redwood City, CA, 1991, p. 226-229.

Crossrefs

Programs

  • Mathematica
    a[n_] := Switch[ Mod[ Prime[n], 10], 1, 1, 3, If[ Mod[ Prime[n -1], 4] == 1, 3, 7], 5, 5, 7, If[ Mod[ Prime[n -1], 4] == 1, 7, 3], 9, 9]; a[1] = 2; a[2] = 9; Array[a, 105]
    Join[{2}, Map[PowerMod[#[[2]], #[[1]], 10] &, Partition[Prime[Range[100]], 2, 1]]] (* Paolo Xausa, Jul 14 2025 *)
  • PARI
    a(n) = if(n<2, 2, lift(Mod(prime(n),10)^prime(n-1))) \\ Hugo Pfoertner, Jul 07 2024

Formula

a(n) = A078422(n-1) mod 10. - R. J. Mathar, Jul 14 2025

A097499 Numbers of the form p^q + q^p where p and q are consecutive primes.

Original entry on oeis.org

17, 368, 94932, 1996813914, 36314872537968, 8660320497414243870, 244552822542936127033092, 257904243416235317958787975746, 3091062959814255272215316579358416079052
Offset: 1

Views

Author

Cino Hilliard, Aug 24 2004

Keywords

Comments

The first term is the only prime in the sequence.

Crossrefs

Programs

  • Mathematica
    lst={}; Do[p=Prime[n]; q=Prime[n+1]; a=p^q+q^p; AppendTo[lst,a],{n,4!}]; lst (* Vladimir Joseph Stephan Orlovsky, Aug 16 2009 *)
    First[#]^Last[#]+Last[#]^First[#]&/@Partition[Prime[Range[10]],2,1] (* Harvey P. Dale, Sep 20 2011 *)
  • PARI
    f(n) = for(x=1,n,p=prime(x);q=prime(x+1);v=p^q+q^p;print1(v","))

Formula

a(n) = A053089(n) + A078422(n). - Amiram Eldar, Jul 07 2024

Extensions

Offset corrected by Amiram Eldar, Jul 07 2024

A280609 Odd prime powers with prime exponents.

Original entry on oeis.org

9, 25, 27, 49, 121, 125, 169, 243, 289, 343, 361, 529, 841, 961, 1331, 1369, 1681, 1849, 2187, 2197, 2209, 2809, 3125, 3481, 3721, 4489, 4913, 5041, 5329, 6241, 6859, 6889, 7921, 9409, 10201, 10609, 11449, 11881, 12167, 12769, 16129, 16807, 17161, 18769, 19321, 22201, 22801, 24389, 24649, 26569, 27889, 29791, 29929
Offset: 1

Views

Author

Ilya Gutkovskiy, Jan 06 2017

Keywords

Comments

Intersection of A053810 and A061345.

Examples

			9 is in the sequence because 9 = 3^2;
25 is in the sequence because 25 = 5^2;
27 is in the sequence because 27 = 3^3, etc.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[30000], PrimePowerQ[#1] && PrimeQ[PrimeOmega[#1]] && Mod[#1, 2] == 1 & ]
  • Python
    from sympy import primepi, integer_nthroot, primerange
    def A280609(n):
        def f(x): return int(n+x-sum(primepi(integer_nthroot(x, p)[0])-1 for p in primerange(x.bit_length())))
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        return bisection(f,n,n) # Chai Wah Wu, Sep 12 2024

Formula

a(n) = p^q, where p, q are primes and p > 2.
Sum_{n>=1} 1/a(n) = Sum_{p prime} P(p) - A051006 = 0.25699271237062131298..., where P(s) is the prime zeta function. - Amiram Eldar, Sep 13 2024

A180203 Differences between prime powers of primes, offsetting the prime and the power by only one. (For purposes of this sequence, 0 and 1 are treated as primes; see Formula.)

Original entry on oeis.org

1, 1, 7, 116, 16682, 19470364, 1792140906866, 9902785872511900, 5480376953206769280002, 74609990540732925759722548, 4316720643133944843150107810831502
Offset: 1

Views

Author

Rick Stephens (rickstphns68(AT)hotmail.com), Aug 15 2010

Keywords

Comments

Except for the first few terms, first differences of A078422. - Franklin T. Adams-Watters, Mar 08 2014

Examples

			n=7 13^11 - 11^7 = 1 792 160 394 037 - 19 487 171 = 1 792 140 906 866.
		

Crossrefs

Formula

a(n)= {EP(n+2)^EP(n+1)}-{EP(n+1)^EP(n)}, where EP(1) = 0, EP(2) = 1, and EP(n) = Prime(n-2) for n > 2.

Extensions

a(8)-a(11) from Robert G. Wilson v, Aug 23 2010

A268062 a(n) = Sum_{k=1..n} prime(k+1)^prime(k).

Original entry on oeis.org

9, 134, 16941, 19504112, 1792179898149, 9906370212804086, 5480396764155014990025, 74620951324354865576898512, 4316720792370367095095683949638501, 17761887757410618772194137156551786713472772, 4113915065494528452775640793448453170290434881585
Offset: 1

Views

Author

Emre APARI, Jan 25 2016

Keywords

Comments

Partial sums of A078422. - Michel Marcus, Jan 26 2016

Examples

			a(3) = 3^2+5^3+7^5 = 16941.
		

Crossrefs

Programs

  • Magma
    [&+[NthPrime(k+1)^NthPrime(k): k in [1..n]]: n in [1..12]]; // Vincenzo Librandi, Jan 26 2016
    
  • Mathematica
    Table[Sum[Prime[k+1]^Prime[k], {k, 1, n}], {n, 1, 12}] (* Vaclav Kotesovec, Jan 25 2016 *)
  • PARI
    a(n) = sum(k=1, n, prime(k+1)^prime(k)); \\ Michel Marcus, Jan 26 2016
  • Sage
    [sum(nth_prime(i+1)^nth_prime(i) for i in [1..n]) for n in [1..15]] # Tom Edgar, Jan 25 2016
    
Showing 1-8 of 8 results.