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.

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

Original entry on oeis.org

3, 13, 11, 13, 17, 19, 23, 29, 29, 107, 37, 43, 47, 53, 53, 59, 137, 67, 73, 107, 79, 89, 89, 167, 103, 107, 109, 113, 137, 149, 137, 137, 173, 149, 227, 157, 163, 173, 173, 179, 257, 191, 197, 199, 233, 227, 239, 229, 233, 239, 239, 317, 251, 257, 263, 269, 347
Offset: 1

Views

Author

Zak Seidov, Jun 29 2003

Keywords

Comments

Primes resulting in procedure of A085415. See also A085417, A085418.

Examples

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

Crossrefs

Programs

  • Mathematica
    Table[SelectFirst[Prime[n]+Accumulate[Range[20]],PrimeQ],{n,60}] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 11 2019 *)

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
Showing 1-3 of 3 results.