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.

A224229 a(0)=2; for n>0, a(n) = smallest prime not occurring earlier in the sequence such that a(n-1)+a(n) is a multiple of floor(sqrt(n)). If no such prime exists, the sequence terminates.

This page as a plain text file.
%I A224229 #13 Jul 25 2015 14:03:52
%S A224229 2,3,5,7,11,13,17,19,23,31,29,37,41,43,47,61,59,53,67,73,71,89,79,97,
%T A224229 83,107,103,127,113,137,163,157,173,167,193,197,109,101,139,131,151,
%U A224229 149,181,179,199,191,211,227,223,239,251,281,293,337,307,379,349,421,419,449,433,463,461,491,229,283,269,331,277,347,317,443,373,467,389,499,397,523
%N A224229 a(0)=2; for n>0, a(n) = smallest prime not occurring earlier in the sequence such that a(n-1)+a(n) is a multiple of floor(sqrt(n)). If no such prime exists, the sequence terminates.
%C A224229 Is this sequence infinite and, if so, is it a permutation of the primes? For this sequence the answers are probably both Yes. A134204 and A224223 are similar sequences whose status is also unknown, while A224221 and A224222 are similar sequences which terminate after about 20 terms.
%H A224229 N. J. A. Sloane, <a href="/A224229/b224229.txt">Table of n, a(n) for n = 0..9999</a>
%p A224229 # A224229
%p A224229 Digits:=100;
%p A224229 M1:=100000; hit:=Array(1..M1);
%p A224229 M2:=1000;
%p A224229 a:=[2]; hit[1]:=1;
%p A224229 p:=2;
%p A224229 for n from 1 to M2 do
%p A224229 t1:=floor(sqrt(n));
%p A224229 sw1:=-1;
%p A224229    for i from 2 to M1  do
%p A224229       q:=ithprime(i);
%p A224229       if ( (p+q) mod t1 ) = 0 and hit[i] <> 1 then sw1:=1; break; fi;
%p A224229    od:
%p A224229 if sw1 < 0 then lprint("ERROR", n, a); break; fi;
%p A224229 a:=[op(a),q];
%p A224229 hit[i]:=1;
%p A224229 p:=q;
%p A224229                   od:
%p A224229 a;
%Y A224229 Cf. A134204, A224221, A224222, A224223.
%K A224229 nonn,look
%O A224229 0,1
%A A224229 _N. J. A. Sloane_, Apr 10 2013