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

A075552 Primes generated in A073628.

Original entry on oeis.org

3, 7, 11, 17, 23, 29, 37, 47, 59, 67, 73, 79, 89, 101, 113, 127, 139, 149, 157, 167, 179, 191, 211, 229, 251, 263, 277, 283, 293, 307, 331, 353, 373, 383, 397, 409, 421, 431, 439, 449, 457, 467, 479, 491, 503, 521, 541, 563, 577, 587, 593, 599, 607, 617, 631
Offset: 1

Views

Author

Zak Seidov, Sep 23 2002

Keywords

Crossrefs

Cf. A073628.

Formula

a(n) = Sum_{-1..1} A073628(n+i).

Extensions

a(1) corrected by Sean A. Irvine, Feb 25 2025

A073627 a(1)=a(2)=1; for n > 2, a(n) is the smallest integer such that a(n) > a(n-1) and a(n)+a(n-1) is prime.

Original entry on oeis.org

1, 1, 2, 3, 4, 7, 10, 13, 16, 21, 22, 25, 28, 31, 36, 37, 42, 47, 50, 51, 52, 55, 58, 69, 70, 79, 84, 89, 90, 91, 100, 111, 112, 115, 118, 121, 130, 133, 136, 141, 142, 151, 156, 157, 160, 171, 176, 177, 182, 185, 188, 191, 192, 197, 200, 201, 208, 211, 220, 223
Offset: 1

Views

Author

Amarnath Murthy, Aug 08 2002

Keywords

Comments

Essentially the same as A062042. [John W. Layman, Oct 11 2013]

Crossrefs

Cf. A073628.

Programs

  • Mathematica
    s=1; Join[{1,1}, Table[k=s+1; While[ !PrimeQ[k+s], k++ ]; s=k, {100}]] (* T. D. Noe, Nov 02 2009 *)
  • PARI
    FirstTerms(n)={my(x=1,y,a=vector(n),j=2);a[1]=1;a[2]=1;while(j++<=n,y=x+1;while(!isprime(x+y),y++);x=y;a[j]=y);return(a)} \\ R. J. Cano, Jan 18 2017

Extensions

Edited by Matthew Conroy, Oct 21 2002
Definition corrected by T. D. Noe, Nov 02 2009

A074311 a(1) = 1; a(2) = 2; a(n) = smallest number greater than the previous term such that the average of three successive terms is a prime.

Original entry on oeis.org

1, 2, 3, 4, 8, 9, 16, 26, 27, 34, 50, 57, 70, 74, 75, 88, 104, 111, 112, 116, 153, 178, 188, 207, 238, 242, 243, 268, 278, 285, 286, 308, 327, 358, 362, 381, 394, 416, 417, 424, 452, 453, 466, 470, 501, 502, 506, 519, 538, 566, 567, 574, 590, 597, 610, 614, 615
Offset: 1

Views

Author

Zak Seidov, Sep 23 2002

Keywords

Comments

Inspired by A073627, A073628. Primes generated in the sequence are in A075551. Primes generated in A073628 are in A075552.

Examples

			a(5) = 8 because 1/3(a(3) + a(4) + a(5)) is a prime.
		

Crossrefs

Programs

  • Mathematica
    sngpt[{a_,b_}]:=Module[{k=b+1},While[CompositeQ[Mean[{a,b,k}]],k++];{b,k}]; NestList[sngpt,{1,2},60][[All,1]] (* Harvey P. Dale, May 29 2019 *)

A075551 Primes generated in A074311.

Original entry on oeis.org

2, 3, 5, 7, 11, 17, 23, 29, 37, 47, 59, 67, 73, 79, 89, 101, 109, 113, 127, 149, 173, 191, 211, 229, 241, 251, 263, 277, 283, 293, 307, 331, 349, 367, 379, 397, 409, 419, 431, 443, 457, 463, 479, 491, 503, 509, 521, 541, 557, 569, 577, 587, 599, 607, 613, 617
Offset: 1

Views

Author

Zak Seidov, Sep 23 2002

Keywords

Comments

Inspired by A073627, A073628. Primes generated in the sequence are in A075551. Primes generated in A073628 are in A075552.

Crossrefs

A215099 a(0)=0, a(1)=1, a(n) = least k>a(n-1) such that k+a(n-2) is prime.

Original entry on oeis.org

0, 1, 2, 4, 5, 7, 8, 10, 11, 13, 18, 24, 25, 29, 34, 38, 39, 41, 44, 48, 53, 55, 56, 58, 71, 73, 78, 84, 85, 89, 94, 102, 103, 109, 120, 124, 131, 133, 138, 144, 145, 149, 162, 164, 169, 173, 178, 180, 181, 187, 192, 196, 197, 201
Offset: 0

Views

Author

Alex Ratushnyak, Aug 03 2012

Keywords

Comments

For n>0 and (n mod 4)<2, a(n) is odd.
Same definition, but k+a(n-2) is a
Fibonacci number: A006498 except first two terms,
Lucas number: A000045 except first two terms,
Pell number: A089928(n-1),
Jacobsthal number: A215095,
factorial: A215096,
square: A194274,
cube: A215097,
triangular number: A011848(n+2),
oblong number: A215098.
Example of a related sequence definition: a(0)=0, a(1)=1, a(n) = least k>a(n-1) such that k+a(n-2) is a cube.

Crossrefs

Cf. A062042: a(1) = 2, a(n) = least k>a(n-1) such that k+a(n-1) is a prime.

Programs

  • PARI
    first(n) = my(res = vector(n, i, i-1), k); for(x=3, n, k=res[x-1]+1; while(!isprime(k+res[x-2]), k++); res[x]=k); res \\ Iain Fox, Apr 22 2019 (corrected by Iain Fox, Apr 25 2019)
  • Python
    from sympy import prime
    prpr = 0
    prev = 1
    for n in range(77):
        print(prpr, end=', ')
        b = c = 0
        while c<=prev:
            c = prime(b+1) - prpr
            b+=1
        prpr = prev
        prev = c
    

A073629 a(1) = 1; a(2) =2; a(3) = 3; a(n) = smallest number greater than the previous term such that the sum of four successive terms is a prime.

Original entry on oeis.org

1, 2, 3, 5, 7, 8, 9, 13, 17, 20, 21, 25, 31, 32, 39, 47, 49, 56, 59, 63, 73, 74, 83, 87, 93, 96, 97, 103, 105, 114, 117, 121, 127, 134, 139, 141, 143, 146, 147, 151, 155, 160, 165, 167, 169, 172, 175, 185, 187, 192, 193, 197, 205, 214, 223, 235, 239, 240, 253, 259, 261
Offset: 1

Views

Author

Amarnath Murthy, Aug 08 2002

Keywords

Examples

			a(4)=5 as 1+2+3+5=11 is prime, 1+2+3+4=10 composite
		

Crossrefs

Programs

  • Mathematica
    nxt[{a_,b_,c_}]:=Module[{k=c+1},While[!PrimeQ[a+b+c+k],k++];{b,c,k}]; Transpose[NestList[ nxt[#]&,{1,2,3},70]][[1]] (* Harvey P. Dale, Aug 29 2012 *)

Extensions

Corrected and extended by Sam Alexander, Feb 26 2005
Showing 1-6 of 6 results.