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.

A284047 a(n) is the smallest positive integer not already in the sequence such that a(n) + a(n-1) and a(n)^2 + a(n-1)^2 are primes, with a(1) = 1.

This page as a plain text file.
%I A284047 #7 Mar 22 2017 21:54:27
%S A284047 1,2,3,8,5,6,11,20,23,18,35,24,19,10,7,12,17,42,25,4,9,14,15,22,57,32,
%T A284047 27,52,37,30,13,28,33,40,39,34,45,16,31,70,69,80,21,26,41,56,51,50,53,
%U A284047 48,65,36,71,60,29,44,59,54,85,46,81,100,49,90,61,76,91,66,101,96,55,58,73,108,43,120,79,84,145,78,103
%N A284047 a(n) is the smallest positive integer not already in the sequence such that a(n) + a(n-1) and a(n)^2 + a(n-1)^2 are primes, with a(1) = 1.
%C A284047 Conjectured to be a permutation of the natural numbers.
%H A284047 Rémy Sigrist, <a href="/A284047/b284047.txt">Table of n, a(n) for n = 1..10000</a>
%H A284047 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%e A284047 a(4) = 8 because 1, 2 and 3 have already been used in the sequence, 3 + 4 = 7 is a prime but 3^2 + 4^2 = 25 is not prime, 3 + 5 = 8, 3 + 6 = 9, 3 + 7 = 10 are not primes while 3 + 8 = 11 is a prime and 3^2 + 8^2 = 73 is a prime also.
%t A284047 f[s_List] := Block[{k = 1, a = s[[-1]]}, While[MemberQ[s, k] || ! (PrimeQ[a + k] && PrimeQ[a^2 + k^2]), k++]; Append[s, k]]; Nest[f, {1}, 80]
%Y A284047 Cf. A002313, A055265, A055266, A121878, A228730, A243625.
%K A284047 nonn
%O A284047 1,2
%A A284047 _Ilya Gutkovskiy_, Mar 19 2017