login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A075331 Sums of pairs in A075329. 5

%I #10 Jul 08 2024 08:50:36

%S 4,16,22,28,37,45,56,65,74,84,90,100,106,118,124,132,142,150,155,163,

%T 175,182,190,200,208,217,226,234,237,249,259,267,277,285,290,300,313,

%U 318,331,337,343,351,361,371,380,389,393,406,412,421,430,439,445,457

%N Sums of pairs in A075329.

%p A075331 := proc(nmax) local r,s,n,stst,rtst,i ; 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 : for i from 1 to nops(s) do s := subsop(i=op(i,r)+op(i,s),s) ; od ; RETURN(s) ; end: A075331(100) ; # _R. J. Mathar_, Feb 03 2007

%t A075331[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[Most[r] + s]];

%t A075331[100] (* _Jean-François Alcover_, Jul 08 2024, after _R. J. Mathar_ *)

%Y Cf. A075329, A075330, A075332.

%K nonn

%O 1,1

%A _Amarnath Murthy_, Sep 18 2002

%E More terms from _R. J. Mathar_, Feb 03 2007

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 17 14:26 EDT 2024. Contains 375227 sequences. (Running on oeis4.)