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.

A085415 Take prime[n] and continue adding 1, 2, ..., a(n) until one reaches a prime.

Original entry on oeis.org

1, 4, 3, 3, 3, 3, 3, 4, 3, 12, 3, 3, 3, 4, 3, 3, 12, 3, 3, 8, 3, 4, 3, 12, 3, 3, 3, 3, 7, 8, 4, 3, 8, 4, 12, 3, 3, 4, 3, 3, 12, 4, 3, 3, 8, 7, 7, 3, 3, 4, 3, 12, 4, 3, 3, 3, 12, 3, 3, 8, 4, 11, 3, 3, 8, 8, 3, 4, 3, 4, 3, 15, 3, 3, 4, 3, 12, 8, 11, 4, 24, 4, 8, 3, 4, 3, 15, 3, 3, 7, 8, 12, 8, 11, 4, 3, 12, 8
Offset: 1

Views

Author

Zak Seidov, Jun 29 2003

Keywords

Comments

Resulting primes in A085416. See also A085417, A085418.
Prime[n] plus a triangular number is prime. - Harvey P. Dale, Jun 12 2013

Examples

			a(2)=4 because prime[2]+(1+2+3+4)=3+10=13 is a prime
		

Crossrefs

Programs

  • Mathematica
    Flatten[(Sqrt[1+8#]-1)/2&/@With[{trnos=Accumulate[Range[30]]}, Table[ Select[ trnos,PrimeQ[Prime[n]+#]&,1],{n,100}]]] (* Harvey P. Dale, Jun 12 2013 *)

Formula

Prime[n]+m*(1+m)/2 is a prime for some m>0.

A085417 Take prime[n] and continue adding n,n+1,..., n+a(n)-1 until one reaches a prime.

Original entry on oeis.org

1, 1, 3, 1, 3, 1, 3, 9, 3, 5, 3, 5, 3, 12, 4, 9, 3, 1, 3, 4, 3, 1, 4, 1, 7, 1, 7, 5, 3, 4, 3, 1, 3, 1, 3, 8, 3, 9, 7, 5, 4, 1, 8, 12, 4, 4, 15, 1, 8, 21, 3, 5, 24, 9, 12, 8, 3, 4, 3, 9, 11, 4, 3, 5, 48, 1, 7, 33, 3, 1, 3, 1, 15, 12, 3, 5, 8, 5, 3, 36, 19, 1, 3, 5, 11, 5, 12, 5, 4, 4, 3, 1, 3, 5, 3, 1, 15, 1
Offset: 1

Views

Author

Zak Seidov, Jun 30 2003

Keywords

Comments

Primes obtained are in A085418. See also A085415, A085416.
No terms == 2 (mod 4). - Robert Israel, Mar 24 2023

Examples

			a(3)=3 because prime[3]=5 and 5+(3+4+5)=17= is a prime A085418(3).
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local m,k,x;
      m:= ithprime(n) - (n-1)*n/2;
      for k from n do
        x:= k*(k+1)/2 + m;
        if isprime(x) then return k+1-n fi
      od;
    end proc:
    map(f, [$1..100]); # Robert Israel, Mar 24 2023

A085418 Primes reached in A085417.

Original entry on oeis.org

3, 5, 17, 11, 29, 19, 41, 127, 53, 89, 67, 107, 83, 277, 113, 233, 113, 79, 127, 157, 139, 101, 181, 113, 293, 127, 313, 257, 199, 239, 223, 163, 239, 173, 257, 467, 271, 541, 461, 383, 349, 223, 563, 787, 383, 389, 1021, 271, 647, 1489, 389, 509, 1789, 773, 983
Offset: 1

Views

Author

Zak Seidov, Jun 30 2003

Keywords

Examples

			a(3)=17 because prime[3]=5 and 5+(3+4+5)=17 is a prime.
		

Crossrefs

Showing 1-3 of 3 results.