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.

A026468 a(1) = 1, a(2) = 2; for n >= 3, a(n) = least positive integer > a(n-1) and not a(i)^2 + a(j)^2 for 1<=i<=j<=n-1.

This page as a plain text file.
%I A026468 #14 Sep 01 2015 16:34:41
%S A026468 1,2,3,4,6,7,9,11,12,14,15,16,19,21,22,23,24,26,27,28,29,30,31,33,34,
%T A026468 35,36,38,39,41,42,43,44,46,47,48,49,51,54,55,56,57,59,60,61,62,63,64,
%U A026468 66,67,68,69,70,71,73,74,75,76,77,78
%N A026468 a(1) = 1, a(2) = 2; for n >= 3, a(n) = least positive integer > a(n-1) and not a(i)^2 + a(j)^2 for 1<=i<=j<=n-1.
%p A026468 # return true if 'candid' is allowed (not a sum of squares)
%p A026468 A026469aux := proc(a,candid) local i,j; for j from 1 to nops(a) do for i from 1 to j do if (op(i,a))^2+(op(j,a))^2 = candid then RETURN(false); fi; od; od; RETURN(true); end:
%p A026468 A026468 := proc(nmax) local a,candidat; a := [1,2]; while nops(a) < nmax do candidat := op(nops(a),a)+1; while A026469aux(a,candidat) = false do candidat := candidat+1; od; a := [op(a),candidat]; od: RETURN(a); end: A026468(60); # _R. J. Mathar_, Nov 01 2006
%Y A026468 A022544 is a subsequence.
%Y A026468 Cf. A026469, A261604.
%K A026468 nonn
%O A026468 1,2
%A A026468 _Clark Kimberling_
%E A026468 Definition corrected by _Ralf Stephan_, Nov 01 2006