login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A258742 With a(1) = 1, a(n) is the smallest positive number not already in the sequence such that a(n)^2 + a(n-1)^2 is not prime. 1
1, 3, 4, 2, 6, 7, 5, 9, 8, 10, 11, 12, 14, 13, 15, 16, 17, 19, 18, 20, 21, 22, 24, 23, 25, 27, 26, 28, 29, 31, 32, 30, 33, 34, 36, 37, 35, 38, 39, 41, 40, 42, 44, 43, 45, 46, 47, 49, 48, 50, 52, 51, 53, 54, 55, 56, 57, 58, 59, 60, 62, 61, 63, 64, 65, 67, 66, 68, 69, 71, 72, 70, 73, 74, 75, 76, 77, 78, 79, 81 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Believed to be a permutation of the natural numbers.

LINKS

Table of n, a(n) for n=1..80.

MATHEMATICA

f[n_] := Block[{a = {1}, k}, For[k = 2, k <= n, k++, i = 1; While[Or[PrimeQ[i^2 + a[[k - 1]]^2], MemberQ[a, i]], i++]; AppendTo[a, i]]; a]; f@ 120 (* Michael De Vlieger, Jun 10 2015 *)

PROG

(PARI) v=[1]; n=1; while(n<100, if(!isprime(n^2+v[#v]^2)&&!vecsearch(vecsort(v), n), v=concat(v, n); n=0); n++); v

CROSSREFS

Cf. A055266, A100208.

Sequence in context: A049277 A214917 A260316 * A143052 A297104 A243256

Adjacent sequences:  A258739 A258740 A258741 * A258743 A258744 A258745

KEYWORD

nonn

AUTHOR

Derek Orr, Jun 08 2015

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 15 02:56 EDT 2021. Contains 345042 sequences. (Running on oeis4.)