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!)
A083016 Rearrangement of primes such that the sum of two consecutive terms is a square. 4
2, 7, 29, 71, 73, 251, 5, 11, 53, 47, 17, 19, 557, 227, 97, 3, 13, 23, 41, 59, 137, 263, 61, 83, 113, 31, 293, 107, 37, 863, 433, 467, 109, 1187, 257, 67, 509, 167, 89, 311, 173, 151, 1613, 503, 281, 43, 101, 223, 353, 131, 193, 383, 401, 499, 797, 103, 1193, 571 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Bunyakovsky's conjecture implies that a(n) always exists. - Robert Israel, Dec 08 2019

LINKS

Robert Israel, Table of n, a(n) for n = 1..10000

MAPLE

N:= 10^4: # to get all terms before the first term > N

Primes:= select(isprime, [seq(i, i=3..N, 2)]):

A[1]:= 2:

for n from 2 do

  found:= false;

  for k from 1 to nops(Primes) do

    if issqr(A[n-1]+Primes[k]) then

      A[n]:= Primes[k];

      Primes:= subsop(k=NULL, Primes);

      found:= true;

      break

    fi

  od;

  if not found then break fi

od:

seq(A[i], i=1..n-1); # Robert Israel, Dec 08 2019

PROG

(PARI) { PS(a)= v=vector(a); v[1]=1; k=prime(1); print1(k", "); while(1, t=0; for(s=1, a, r=prime(s); if(v[s]==0 && issquare(k+r), t=r; v[s]=1; break)); if(t==0, break); print1(r", "); k=r) }

CROSSREFS

Sequence in context: A339868 A181758 A285790 * A062064 A158024 A166940

Adjacent sequences:  A083013 A083014 A083015 * A083017 A083018 A083019

KEYWORD

nonn

AUTHOR

Jason Earls, May 28 2003

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 September 24 13:08 EDT 2021. Contains 347642 sequences. (Running on oeis4.)