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

A158698 Numbers not occurring in A073627.

Original entry on oeis.org

5, 6, 8, 9, 11, 12, 14, 15, 17, 18, 19, 20, 23, 24, 26, 27, 29, 30, 32, 33, 34, 35, 38, 39, 40, 41, 43, 44, 45, 46, 48, 49, 53, 54, 56, 57, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 71, 72, 73, 74, 75, 76, 77, 78, 80, 81, 82, 83, 85, 86, 87, 88, 92, 93, 94, 95, 96, 97, 98, 99, 101
Offset: 1

Views

Author

Zak Seidov, Mar 24 2009

Keywords

Crossrefs

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

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

Original entry on oeis.org

0, 1, 2, 4, 5, 8, 10, 11, 16, 20, 23, 24, 26, 29, 34, 38, 41, 48, 50, 51, 56, 60, 63, 68, 80, 81, 90, 92, 95, 96, 102, 109, 120, 124, 129, 130, 138, 141, 142, 148, 149, 152, 156, 159, 164, 168, 171, 182, 188, 193, 196, 198, 199, 202, 206, 209, 216, 218, 219, 222, 232
Offset: 0

Views

Author

Amarnath Murthy, Aug 08 2002

Keywords

Comments

Slowest increasing sequence where 3 consecutive integers sum up to a prime.
In a string there can be at most two consecutive integers, e.g., (10, 11). More generally, three consecutive terms cannot be in arithmetic progression.

Examples

			0 + 1 + 2 = 3, which is prime; 1 + 2 + 4 = 7, which is prime; 2 + 4 + 5 = 11, which is prime.
		

Crossrefs

Cf. A073627.

Programs

  • Mathematica
    n1 = 0; n2 = 1; counter = 1; maxnumber = 10^4; Do[ If[PrimeQ[n1 + n2 + n], {sol[counter] = n; counter = counter + 1; n1 = n2; n2 = n}], {n, 2, maxnumber}]; Table[sol[j], {j, 1, counter}] (* Ben Ross (bmr180(AT)psu.edu), Jan 29 2006 *)
    nxt[{a_,b_,c_}]:={b,c,Module[{x=c+1},While[!PrimeQ[b+c+x],x++];x]}; Transpose[ NestList[nxt,{0,1,2},60]][[1]] (* Harvey P. Dale, Jun 10 2013 *)

Extensions

More terms from Matthew Conroy, Sep 09 2002
Entry revised by N. J. A. Sloane, Mar 25 2007

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
    

A231507 a(n) is smallest number greater than a(n-1) such that a(n)+a(n-1) is composite.

Original entry on oeis.org

4, 5, 7, 8, 10, 11, 13, 14, 16, 17, 18, 20, 22, 23, 25, 26, 28, 29, 31, 32, 33, 35, 37, 38, 39, 41, 43, 44, 46, 47, 48, 50, 52, 53, 55, 56, 58, 59, 60, 61, 62, 63, 65, 67, 68, 70, 71, 72, 73, 74, 76, 77, 78, 80, 81, 83, 85, 86, 88, 89, 91, 92, 93, 94, 95, 97
Offset: 1

Views

Author

Neil Fernandez, Nov 09 2013

Keywords

Examples

			a(1) = 4, the first composite. So the smallest a(2) could possibly be 5. 4+5=9, which is composite, so a(2) = 5. a(3) cannot be 6, because 5+6=11, which is prime. But 5+7=12 is composite, so a(3) = 7.
		

Crossrefs

Programs

  • Mathematica
    nxt[n_]:=Module[{k=n+1},While[PrimeQ[n+k],k++];k]; NestList[nxt,4,70] (* Harvey P. Dale, Jul 18 2014 *)

A364442 a(n) is the smallest number > a(n-1) such that a(n-1) + a(n) is a triprime (A014612), with a(1) = 1.

Original entry on oeis.org

1, 7, 11, 16, 26, 37, 38, 40, 52, 53, 57, 59, 65, 73, 74, 79, 85, 86, 88, 94, 96, 99, 108, 114, 116, 120, 122, 123, 132, 134, 139, 140, 142, 143, 147, 163, 169, 174, 180, 183, 186, 188, 197, 202, 204, 206, 212, 213, 215, 219, 223, 229, 236, 238, 239, 244, 250, 256, 262, 268, 271, 277, 278, 283
Offset: 1

Views

Author

Zak Seidov and Robert Israel, Jul 25 2023

Keywords

Comments

For n > 1, a(n) is the least number > a(n-1) such that A001222(a(n) + a(n-1)) = 3.
a(n-1) + a(n) is the least triprime > 2*a(n-1).

Examples

			a(3) = 11 because a(2) = 7, none of 7 + 8 = 15, 7 + 9 = 16 and 7 + 10 = 17 is a triprime, but 7 + 11 = 18 = 2*3^2 is a triprime.
		

Crossrefs

Programs

  • Maple
    R:= 1: x:= 1:
    for i from 1 to 100 do
       for y from x+1 while numtheory:-bigomega(x+y) <> 3 do od:
       R:= R,y;
       x:= y
    od:
    R;
  • Mathematica
    s = {p = 1}; Do[q = p + 1; While[3 != PrimeOmega[p + q],
    q++];  AppendTo[s, p = q], {100}]; s

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

A107817 Slowest increasing sequence where 2 consecutive integers sum up to a prime.

Original entry on oeis.org

0, 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, 226
Offset: 0

Views

Author

Eric Angelini, Jun 11 2005

Keywords

Comments

Essentially the same as A073627. [R. J. Mathar, Aug 24 2008]
Essentially the same as A062042. [Zak Seidov, Nov 04 2009]

Examples

			0+2=2, which is a prime; 2+3=5=prime; 3+4=7=prime; 4+7=11=prime, etc.
		

Programs

  • Mathematica
    k = 0; Print[k]; Do[p = k + 1; While[ !PrimeQ[k + p], p++ ]; k = p; Print[k], {n, 1, 100}] (* Ryan Propper, Sep 04 2005 *)

Extensions

More terms from Ryan Propper, Sep 04 2005
Showing 1-9 of 9 results.