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.

Showing 1-2 of 2 results.

A005214 Triangular numbers together with squares (excluding 0).

Original entry on oeis.org

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
Offset: 1

Views

Author

Russ Cox, Jun 14 1998

Keywords

References

  • Douglas 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.

Crossrefs

Union of A000290 and A000217.
Cf. A001110, A054686, A157259, A117704 (first differences), A193711 (partial sums), A193748, A193749 (partitions into).
Cf. A241241 (subsequence), A242401 (complement).

Programs

  • Haskell
    import Data.List.Ordered (union)
    a005214 n = a005214_list !! (n-1)
    a005214_list = tail $ union a000290_list a000217_list
    -- Reinhard Zumkeller, Feb 15 2015, Aug 03 2011
    
  • 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 *)
  • 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

Formula

From Reinhard Zumkeller, Aug 03 2011: (Start)
A010052(a(n)) + A010054(a(n)) > 0.
A010052(a(A193714(n))) = 1.
A010054(a(A193715(n))) = 1. (End)
a(n) ~ c * n^2, where c = 3 - 2*sqrt(2) = A157259 - 4 = 0.171572... . - Amiram Eldar, Apr 04 2025

A193715 Positions of triangular numbers (A000217) in the union of squares and triangular numbers (A005214).

Original entry on oeis.org

1, 2, 4, 6, 7, 9, 11, 12, 13, 15, 17, 18, 20, 22, 23, 25, 27, 29, 30, 32, 34, 35, 37, 39, 41, 42, 44, 46, 47, 49, 51, 52, 54, 56, 58, 59, 61, 63, 64, 66, 68, 70, 71, 73, 75, 76, 78, 80, 81, 82, 84, 86, 87, 89, 91, 92, 94, 96, 98, 99, 101, 103, 104, 106, 108
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 03 2011

Keywords

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndex)
    import Data.Maybe (fromJust)
    a193715 n = a193715_list !! (n-1)
    a193715_list =
       map ((+ 1) . fromJust . (`elemIndex` a005214_list)) $ tail a000217_list
  • Mathematica
    With[{max = 2500}, Position[Union[Join[Accumulate[Range[Floor[(Sqrt[8*max + 1] - 1)/2]]], Range[Floor[Sqrt[max]]]^2]], ?(IntegerQ[Sqrt[8*# + 1]] &)] // Flatten] (* _Amiram Eldar, Apr 04 2025 *)

Formula

A010054(A005214(a(n))) = 1.
a(n) ~ c * n, where c = 1 + sqrt(2)/2 = 1.707106... . - Amiram Eldar, Apr 04 2025
Showing 1-2 of 2 results.