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!)
A176747 Triangular numbers and numbers which cannot be represented as a sum of two earlier members of the sequence. 6
0, 1, 3, 5, 6, 10, 14, 15, 21, 23, 28, 32, 36, 40, 45, 52, 55, 66, 74, 78, 82, 86, 91, 105, 113, 117, 120, 124, 136, 153, 155, 166, 171, 184, 190, 197, 201, 209, 210, 217, 228, 231, 247, 253, 276, 278, 300, 311, 325, 349, 351, 378, 390, 406, 435, 439, 465, 474, 496, 516, 518 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
EXAMPLE
5 is the smallest number which is not represented as sum of 2 numbers of the set {0,1,3}. Therefore 5 is in the sequence.
14 is the smallest number which is not represented as sum of 2 numbers of the set {0,1,3,5,6,10}. Therefore 14 is in the sequence.
MAPLE
isA000217 := proc(n) issqr(8*n+1) ; end proc:
A176747 := proc(n) option remember; if n <=1 then n; else for a from procname(n-1)+1 do if isA000217(a) then return a; end if;
isrep := false; for i from 1 to n-1 do for j from i to n-1 do if procname(i)+procname(j) = a then isrep := true; end if; end do: end do: if not isrep then return a; end if; end do: end if; end proc:
seq(A176747(n), n=0..60) ; # R. J. Mathar, Nov 01 2010
# Alternative:
A176747_list := proc(upto) local P, k, issum, istri; P := [];
issum := k -> ormap(p -> member(k - p, P), P);
istri := k -> issqr(8*k + 1);
for k from 0 to upto do
if istri(k) or not issum(k) then P := [op(P), k] fi od;
P end: print(A176747_list(518)); # Peter Luschny, Jul 20 2022
MATHEMATICA
A176747list[upto_] := Module[{P = {}, issum, istri},
issum[k_] := AnyTrue[P, MemberQ[P, k-#]&];
istri[k_] := IntegerQ@Sqrt[8k+1];
For[k = 0, k <= upto, k++,
If[istri[k] || !issum[k], AppendTo[P, k]]];
P];
A176747list[518] (* Jean-François Alcover, Sep 26 2022, after Peter Luschny *)
CROSSREFS
Sequence in context: A115823 A190721 A112926 * A238488 A230124 A027627
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, Apr 25 2010
EXTENSIONS
Definition rephrased, sequence extended beyond 55 by R. J. Mathar, Nov 01 2010
STATUS
approved

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 April 26 20:29 EDT 2024. Contains 372004 sequences. (Running on oeis4.)