|
|
A005214
|
|
Triangular numbers together with squares (excluding 0).
|
|
13
|
|
|
1, 3, 4, 6, 9, 10, 15, 16, 21, 25, 28, 36, 45, 49, 55, 64, 66, 78, 81, 91, 100, 105, 120, 121, 136, 144, 153, 169, 171, 190, 196, 210, 225, 231, 253, 256, 276, 289, 300, 324, 325, 351, 361, 378, 400, 406, 435, 441, 465, 484, 496, 528, 529, 561, 576, 595, 625, 630, 666, 676
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
REFERENCES
|
D. R. Hofstadter, Fluid Concepts and Creative Analogies: Computer Models of the Fundamental Mechanisms of Thought, (together with the Fluid Analogies Research Group), NY: Basic Books, 1995. p. 15.
|
|
LINKS
|
D. R. Hofstadter, Analogies and Sequences: Intertwined Patterns of Integers and Patterns of Thought Processes, DIMACS Conference on Challenges of Identifying Integer Sequences, Rutgers University, October 10 2014; Part 1, Part 2.
|
|
FORMULA
|
|
|
MAPLE
|
a := proc(n) floor(sqrt(n)): floor(sqrt(n+n)):
`if`(n+n = %*% + % or n = %% * %%, n, NULL) end: # Peter Luschny, May 01 2014
|
|
MATHEMATICA
|
With[{upto=700}, Module[{maxs=Floor[Sqrt[upto]], maxt=Floor[(Sqrt[8upto+1]- 1)/2]}, Union[Join[Range[maxs]^2, Table[(n(n+1))/2, {n, maxt}]]]]] (* Harvey P. Dale, Sep 17 2011 *)
|
|
PROG
|
(Haskell)
import Data.List.Ordered (union)
a005214 n = a005214_list !! (n-1)
a005214_list = tail $ union a000290_list a000217_list
(PARI) upTo(lim)=vecsort(concat(vector(sqrtint(lim\1), n, n^2), vector(floor(sqrt(2+2*lim)-1/2), n, n*(n+1)/2)), , 8) \\ Charles R Greathouse IV, Aug 04 2011
(PARI) isok(m) = ispolygonal(m, 3) || ispolygonal(m, 4); \\ Michel Marcus, Mar 13 2021
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|