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

A077038 Least difference of primes p, q such that p < n^3 < q.

Original entry on oeis.org

4, 6, 6, 14, 12, 10, 12, 6, 12, 34, 10, 24, 8, 16, 6, 10, 12, 6, 16, 20, 12, 34, 22, 10, 6, 6, 18, 12, 18, 14, 22, 18, 12, 36, 14, 20, 8, 52, 10, 10, 16, 38, 34, 6, 40, 24, 10, 16, 12, 14, 8, 18, 20, 30, 20, 32, 18, 34, 40, 48, 10, 6, 8, 18, 10, 18, 18, 30, 30, 30, 42, 20, 6, 44
Offset: 2

Views

Author

Reinhard Zumkeller, Oct 21 2002

Keywords

Comments

Least m such that a(m)=2*n for n=1,2,3,... are: {2,3,14,7,6,5,15,28,21,24,13,...}. - Zak Seidov, May 10 2016
There are numbers k other than 2 such that a(k) = 4. The first few (up to 1000) are 129 189 369 435 549 555 561 819. Conjecture: every even integer greater than 2 occurs infinitely often in this sequence. - Franklin T. Adams-Watters, May 13 2016

Crossrefs

Programs

  • Mathematica
    Table[c=n^3;NextPrime[c]-NextPrime[c,-1],{n,2,80}] (* Harvey P. Dale, Sep 14 2012 *)

Formula

a(n) = A014220(n) - A077037(n).

A242382 Lesser of consecutive primes whose average is a perfect cube.

Original entry on oeis.org

61, 1723, 4093, 17573, 21943, 46649, 110587, 195103, 287491, 314423, 405221, 474547, 1061189, 1191013, 1404919, 1601609, 1906621, 2000371, 2146687, 2196979, 3241783, 3511799, 4912991, 5268017, 6229501, 6751267, 6858997, 7077883, 11239421, 20346407, 21951997, 26198063
Offset: 1

Views

Author

Antonio Roldán, May 12 2014

Keywords

Examples

			1723 is in the sequence because it is prime, nextprime(1723) = 1733, and average(1723,1733) = 1728 = 12^3.
		

Crossrefs

Subsequence of A077037 and A242380.

Programs

  • Mathematica
    Select[Partition[Prime[Range[2, 10^5]], 2, 1], IntegerQ[Surd[(First[#] + Last[#])/2, 3]] &][[;; , 1]] (* Amiram Eldar, Jul 04 2022 *)
  • PARI
    {for(i=3,3*10^7,if(isprime(i),k=(i+nextprime(i+1))/2;if(ispower(k,3),print1(i,", "))))}

A243893 a(n) = prime(k-1) with k = n^2 + prime(n)^2.

Original entry on oeis.org

7, 37, 137, 311, 829, 1249, 2269, 2939, 4483, 7411, 8681, 12653, 15877, 17827, 21673, 28087, 35393, 38317, 46957, 53327, 56897, 67493, 75269, 87523, 105143, 115057, 120427, 130811, 136547, 147863, 189067, 202481, 222991, 230393, 267401, 275677
Offset: 1

Views

Author

Freimut Marschner, Jun 14 2014

Keywords

Comments

prime(k-1) is also the largest prime number < (n^2 + prime(n)^2). Remark : Largest prime number < n^2 is A053001. Largest prime number < n^3 is A077037.

Examples

			n=1, 1^2=1, prime(1)^2 = 4, 1 + 4 = 5, 5 - 1= 4, prime(4) = 7 ;
n=2, 2^2=4, prime(2)^2 = 9, 4 + 9= 13, 13 - 1= 12, prime(12) = 37.
		

Crossrefs

Cf. A000290 (squares n^2), A000040 (prime(n)), A001248 (prime(n)^2), A106587 (n^2 + prime(n)^2).

Programs

  • Mathematica
    a[n_]:=Prime[(n^2 + Prime[n]^2) - 1]; Array[a,36] (* Stefano Spezia, Mar 12 2025 *)

Formula

a(n) = prime((n^2 + prime(n)^2) - 1) = prime(A106587(n) - 1).

A173831 Largest prime < n^4.

Original entry on oeis.org

13, 79, 251, 619, 1291, 2399, 4093, 6553, 9973, 14639, 20731, 28559, 38393, 50599, 65521, 83497, 104971, 130307, 159979, 194479, 234239, 279823, 331769, 390581, 456959, 531383, 614639, 707279, 809993, 923513, 1048573, 1185907, 1336333
Offset: 2

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    PrimePrev[n_]:=Module[{k},k=n-1;While[ !PrimeQ[k],k-- ];k];f[n_]:=n^4;lst={};Do[AppendTo[lst,PrimePrev[f[n]]],{n,5!}];lst
    NextPrime[Range[2,40]^4,-1] (* Harvey P. Dale, May 05 2018 *)

A121844 Excess of n^3 over previous prime.

Original entry on oeis.org

1, 4, 3, 12, 5, 6, 3, 2, 3, 4, 5, 18, 3, 2, 3, 4, 5, 2, 7, 4, 9, 4, 17, 6, 3, 2, 9, 10, 7, 2, 19, 4, 3, 12, 7, 2, 3, 38, 3, 4, 11, 14, 25, 4, 9, 10, 5, 6, 9, 4, 5, 4, 7, 12, 15, 4, 9, 22, 17, 38, 7, 4, 5, 16, 5, 2, 9, 28, 11, 28, 17, 14, 3, 28, 9, 4, 5, 12, 3, 58, 5, 4, 11, 12, 13, 16, 21, 22, 7, 2, 7
Offset: 2

Views

Author

Zak Seidov, Aug 29 2006

Keywords

Examples

			a(5)=12 because 5^3=125 and previous prime is 113 hence a(5)=125-113=12
		

Crossrefs

Cf. A077037.

Programs

  • Mathematica
    Table[n^3-Prime[PrimePi[n^3]],{n,2,100}]
    #-NextPrime[#,-1]&/@((Range[2,100])^3) (* Harvey P. Dale, Apr 06 2013 *)
  • PARI
    a(n) = n^3 - precprime(n^3 - 1) \\ Michel Marcus, Jun 03 2013

A173832 Largest prime < n^5.

Original entry on oeis.org

31, 241, 1021, 3121, 7759, 16787, 32749, 59029, 99991, 161047, 248827, 371291, 537811, 759371, 1048573, 1419839, 1889561, 2476081, 3199997, 4084081, 5153623, 6436327, 7962607, 9765619, 11881357, 14348891, 17210353, 20511143, 24299981
Offset: 2

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    PrimePrev[n_]:=Module[{k},k=n-1;While[ !PrimeQ[k],k-- ];k];f[n_]:=n^5;lst={};Do[AppendTo[lst,PrimePrev[f[n]]],{n,5!}];lst
    NextPrime[Range[2, 30]^5, -1]  (* Ray Chandler, Dec 08 2018 *)

A329931 Reversal of base-n digits of largest prime < n^3.

Original entry on oeis.org

7, 23, 31, 89, 71, 97, 383, 647, 799, 967, 1151, 1507, 2351, 3149, 3583, 4045, 4535, 6497, 5599, 7937, 6775, 10579, 4607, 12499, 16223, 18953, 15679, 16819, 21599, 28829, 14335, 32669, 36991, 29399, 38879, 49283, 51983, 3041, 60799, 63877, 56447, 55469, 38719
Offset: 2

Views

Author

Robert Dougherty-Bliss, Nov 24 2019

Keywords

Comments

Terms are listed in decimal.
Conjecture: a(n) < prevprime(n^3) for n >= 4. In other words, the most-significant base-n digit is larger than the least-significant base-n digit. This conjecture seems to hold for the analogous sequence with n^2, but fails for powers higher than 3.

Examples

			For n = 3, prevprime(3^3) = 23 = 212_3, and reversal gives a(3) = 212_3 = 23. For n = 5, prevprime(5^3) = 113 = 423_5, and reversal gives a(5) = 324_5 = 89.
		

Crossrefs

Base-n reversal of A077037(n).

Programs

  • Mathematica
    a[n_] := FromDigits[ Reverse@ IntegerDigits[ NextPrime[n^3, -1], n], n]; Array[a, 43, 2] (* Giovanni Resta, Nov 24 2019 *)
  • PARI
    a(n) = fromdigits(Vecrev(digits(precprime(n^3-1), n)), n); \\ Michel Marcus, Nov 25 2019
Showing 1-7 of 7 results.