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.

A093504 A093503(k) is a term if A093503(k) and A093503(k+1) are successive primes.

Original entry on oeis.org

2, 3, 23, 113
Offset: 1

Views

Author

Amarnath Murthy, Apr 17 2004

Keywords

Comments

There are no further terms < A093503(1000000); this suggests the conjecture that there are no other terms. - Klaus Brockhaus

Examples

			113 is a member as the next member of A093503 is the next prime 127.
		

Crossrefs

Cf. A093503.

Extensions

Edited by Klaus Brockhaus, Apr 27 2004

A113161 a(1) = 1; for n > 1, a(n) = largest prime <= a(n-1) + n - 1.

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 17, 23, 31, 37, 47, 53, 61, 73, 83, 97, 113, 127, 139, 157, 173, 193, 211, 233, 257, 281, 307, 331, 359, 383, 409, 439, 467, 499, 523, 557, 593, 619, 653, 691, 727, 761, 797, 839, 883, 919, 953, 997, 1039, 1087, 1129, 1171, 1223, 1259, 1307
Offset: 1

Views

Author

Leroy Quet, Jan 05 2006

Keywords

Examples

			a(7) = 17. So a(8) = the largest prime <= 17 + 7 = 24, which is 23.
		

Crossrefs

Cf. A093503.

Programs

  • Mathematica
    PrevPrim[n_] := Block[{k = n - 1}, While[ !PrimeQ[k], k-- ]; k]; a[1] = 1; a[n_] := a[n] = PrevPrim[a[n - 1] + n]; Array[a, 55] (* Robert G. Wilson v *)
    a[1]=1;a[n_]:=NextPrime[a[n-1]+n,-1];Table[a[n],{n,55}] (* James C. McMahon, Jun 16 2024 *)
    nxt[{n_,a_}]:={n+1,If[PrimeQ[a+n],a+n,NextPrime[a+n,-1]]}; NestList[nxt,{1,1},60][[;;,2]] (* Harvey P. Dale, Dec 15 2024 *)
  • PARI
    {print1(a=1,",");for(n=2,55,print1(a=precprime(a+n-1),","))} \\ Klaus Brockhaus, Jan 06 2006

Extensions

More terms from Klaus Brockhaus and Robert G. Wilson v, Jan 06 2006

A351140 a(1) = 1, a(n) = smallest prime > a(n-1) + n.

Original entry on oeis.org

1, 5, 11, 17, 23, 31, 41, 53, 67, 79, 97, 113, 127, 149, 167, 191, 211, 233, 257, 281, 307, 331, 359, 389, 419, 449, 479, 509, 541, 577, 613, 647, 683, 719, 757, 797, 839, 881, 929, 971, 1013, 1061, 1109, 1163, 1213, 1277, 1327, 1381, 1433, 1487, 1543, 1597
Offset: 1

Views

Author

Alex Ratushnyak, Feb 02 2022

Keywords

Comments

The sequence with >= in place of > is essentially the same after the first three terms: 1, 3, 7, 11, 17, 23, 31, ...

Examples

			The smallest prime above 1+2 is 5, so a(2)=5.
The smallest prime above 5+3 is 11, so a(3)=11.
		

Crossrefs

Programs

  • Maple
    R:= 1: p:= 1:
    for n from 2 to 100 do
      p:= nextprime(p+n);
      R:= R,p;
    od:
    R; # Robert Israel, Nov 20 2023
  • Mathematica
    a[1] = 1; a[n_] := a[n] = NextPrime[a[n - 1] + n]; Array[a, 50] (* Amiram Eldar, Feb 03 2022 *)
  • PARI
    lista(nn) = my(list = List(), last = 1); listput(list, last); for (n=2, nn, last = nextprime(last + n +1); listput(list, last);); Vec(list); \\ Michel Marcus, Feb 03 2022
  • Python
    from sympy import nextprime
    p = 1
    for i in range(2,1000):
      print(p, end=",")
      p = nextprime(p+i)
    
Showing 1-3 of 3 results.