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.
%I A105822 #12 May 16 2024 15:13:19 %S A105822 1,2,3,5,8,4,12,7,10,17,6,11,21,32,13,19,14,33,20,28,24,27,42,40,18,9, %T A105822 35,44,39,54,48,22,15,37,52,89,30,59,23,36,99,70,16,86,47,45,92,65, %U A105822 157,34,123,135,222,56,136,82,29,53,102,155,25,130,87,43,170,213,63,150,57 %N A105822 For n > 2, a(n) > 0 not appeared previously is such that a(n-1)^2+4*a(n-2)*a(n) = d^2 is a minimal square, a(1)=1, a(2)=2. %C A105822 Is it a permutation of positive integers? Among first 2000 terms, first missing numbers are 233, 349, 394, 443, 449. %C A105822 The sequence depends on seed terms a(1) and a(2); if a(1) = 1, a(3) = a(2)+1. %C A105822 Values of d^2 in A105823. %H A105822 Ivan Neretin, <a href="/A105822/b105822.txt">Table of n, a(n) for n = 1..10000</a> %p A105822 N:= 1000: # to get a(1) to a(N) %p A105822 S:= 'S': %p A105822 a[1]:= 1: a[2]:= 2: %p A105822 S[1]:= 1: S[2]:= 1: %p A105822 for n from 3 to N do %p A105822 ds:= map(t -> rhs(op(t)), [msolve(x^2=a[n-1]^2, 4*a[n-2])]); %p A105822 xmin:= infinity; %p A105822 for d in ds do %p A105822 found:= false; %p A105822 for y from floor((a[n-1]-d)/(4*a[n-2]))+1 do %p A105822 xy:= 4*a[n-2]*y + d; %p A105822 cand:= (xy^2 - a[n-1]^2)/(4*a[n-2]); %p A105822 if cand >= xmin then found:= false; break fi; %p A105822 if not assigned(S[cand]) then found:= true; break fi; %p A105822 od: %p A105822 if found then xmin:= cand; fi; %p A105822 od: %p A105822 a[n]:= xmin; %p A105822 S[xmin]:= 1; %p A105822 od: %p A105822 seq(a[n],n=1..N); # _Robert Israel_, May 11 2015 %t A105822 a = {1, 2}; Do[i = 1; While[MemberQ[a, i] || !IntegerQ[Sqrt[a[[-1]]^2 + 4 a[[-2]]*i]], i++]; AppendTo[a, i], {n, 3, 70}]; a (* _Ivan Neretin_, May 11 2015 *) %Y A105822 Cf. A076839, A105823, A104663 (putative inverse). %K A105822 nonn %O A105822 1,2 %A A105822 _Zak Seidov_, Apr 22 2005