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.

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