login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A244915 Smallest positive integer a(n) such that b(n) = a(n)^2 + a(n-1)^2 is a prime different from the primes b(1), b(2), ..., b(n-1), where a(0) = 1. 2
1, 1, 2, 3, 8, 5, 2, 7, 8, 13, 2, 15, 4, 1, 6, 5, 4, 9, 10, 1, 14, 9, 16, 1, 20, 3, 10, 7, 12, 13, 10, 17, 2, 27, 10, 19, 6, 11, 4, 21, 10, 29, 4, 25, 6, 29, 16, 5, 18, 7, 20, 11, 14, 15, 22, 5, 24, 1, 26, 5, 28, 13, 20, 19, 14, 25, 12, 17, 8, 23, 12, 43, 8 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

If every positive integer appears in the sequence infinitely often then the sequence b(n) is a permutation of all primes of the form x^2 + y^2.

LINKS

Jens Kruse Andersen, Table of n, a(n) for n = 0..10000

PROG

(PARI)

a244915(maxn) = {

  my(a=[1], b=[], an, bn);

  for(n=1, maxn,

    an=1;

    while(!(isprime(bn=an^2+a[#a]^2) && setsearch(b, bn)==0), an++);

    a=concat(a, an);

    b=setunion(b, [bn])

  );

  a

}

a244915(100) \\ Colin Barker, Aug 24 2014

(Python)

from sympy import isprime

A244915 = [1]

blist = []

for n in range(1, 100):

....a, b = 1, 1 + A244915[-1]**2

....while not isprime(b) or b in blist:

........b += 2*a+1

........a += 1

....blist.append(b)

....A244915.append(a)

# Chai Wah Wu, Aug 28 2014

CROSSREFS

Cf. A100208.

Sequence in context: A334859 A084110 A299788 * A244668 A192646 A338841

Adjacent sequences:  A244912 A244913 A244914 * A244916 A244917 A244918

KEYWORD

nonn

AUTHOR

Thomas Ordowski, Aug 21 2014

EXTENSIONS

More terms from Colin Barker, Aug 24 2014

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 29 14:20 EDT 2022. Contains 357090 sequences. (Running on oeis4.)