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.

A083569 Smallest m not occurring earlier such that m+n is prime.

This page as a plain text file.
%I A083569 #17 Apr 11 2015 15:10:18
%S A083569 1,3,2,7,6,5,4,9,8,13,12,11,10,15,14,21,20,19,18,17,16,25,24,23,22,27,
%T A083569 26,31,30,29,28,35,34,33,32,37,36,41,40,39,38,47,46,45,44,43,42,49,48,
%U A083569 51,50,55,54,53,52,57,56,69,68,67,66,65,64,63,62,61,60,59,58,79,78,77
%N A083569 Smallest m not occurring earlier such that m+n is prime.
%C A083569 a(a(n))=n: a self-inverse permutation with A010051(a(n)+n)=1. - _Reinhard Zumkeller_, Nov 25 2004
%H A083569 Paul Tek, <a href="/A083569/b083569.txt">Table of n, a(n) for n = 1..1000</a>
%H A083569 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%o A083569 (PARI) A083569(n)={global(a083569);type(a083569)=="t_VEC"||a083569=vector(n); #a083569<n&&a083569=concat(a083569,vector(n-#a083569));my(u=[0]); a083569[n]||for(i=1,n, a083569[i]||for(k=u[1]+1,9e9, !setsearch(u,k)&&isprime(i+k)&&(a083569[i]=k)&&break);u=setunion(u,[a083569[i]]); while(#u>1&&u[2]==u[1]+1,u=u[2..-1]));a083569[n]} \\ Returns the n-th term and defines the global array a083569 up to that value at least. For efficiency it is better to (pre)compute a large number of terms at once (via A083569(N_max)) rather than one after the other. - _M. F. Hasler_, Apr 11 2015
%Y A083569 Cf. A084721.
%Y A083569 Cf. A071065.
%K A083569 nonn
%O A083569 1,2
%A A083569 _Amarnath Murthy_, Jun 12 2003
%E A083569 More terms from _David Wasserman_, Nov 19 2004