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.

A075330 Second members of pairs in A075329.

This page as a plain text file.
%I A075330 #10 Jun 06 2024 03:51:30
%S A075330 3,11,15,19,25,31,38,44,50,57,61,67,71,79,83,89,95,101,104,109,117,
%T A075330 122,127,134,139,145,151,157,159,167,173,179,185,191,194,201,210,213,
%U A075330 221,225,229,235,241,248,254,260,263,271,275,281,287,293,297,305,310,319
%N A075330 Second members of pairs in A075329.
%p A075330 A075330 := proc(nmax) local r,s,n,stst,rtst ; r := [1] : s := [] : n := {1} : while nops(r) < nmax do stst := 1 ; while stst in n or stst-op(-1,r) in n or stst+op(-1,r) in n do stst := stst +1 ; od ; s := [op(s),stst] ; n := n union {stst, stst-op(-1,r), stst+op(-1,r)} ; rtst := 1 ; while rtst in n do rtst := rtst +1 ; od ; r := [op(r),rtst] ; n := n union {rtst} ; od : RETURN(s) ; end: A075330(100) ; # _R. J. Mathar_, Feb 03 2007
%t A075330 A075330[nmax_] := Module[{r = {1}, s = {}, n = {1}, stst, rtst}, While[Length[r] < nmax, stst = 1; While[MemberQ[n, stst] || MemberQ[n, stst - Last[r]] || MemberQ[n, stst + Last[r]], stst++]; s = Append[s, stst]; n = n ~Union~ {stst, stst - Last[r], stst + Last[r]}; rtst = 1; While[MemberQ[n, rtst], rtst++]; r = Append[r, rtst]; n = n ~Union~ {rtst}]; Return[s]];
%t A075330 A075330[100] (* _Jean-François Alcover_, Jun 06 2024, after _R. J. Mathar_ *)
%Y A075330 Cf. A075329, A075331, A075332.
%K A075330 nonn
%O A075330 1,1
%A A075330 _Amarnath Murthy_, Sep 18 2002
%E A075330 More terms from _R. J. Mathar_, Feb 03 2007