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.

A242401 Numbers that are neither triangular nor square.

Original entry on oeis.org

2, 5, 7, 8, 11, 12, 13, 14, 17, 18, 19, 20, 22, 23, 24, 26, 27, 29, 30, 31, 32, 33, 34, 35, 37, 38, 39, 40, 41, 42, 43, 44, 46, 47, 48, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 61, 62, 63, 65, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 79, 80, 82, 83, 84
Offset: 1

Views

Author

J. Lowell, May 13 2014

Keywords

Examples

			6 is not a term because it's triangular;
9 is not a term because it's square.
		

Crossrefs

Cf. A005214 (complement); intersection of A000037 and A014132.

Programs

  • Haskell
    a242401 n = a242401_list !! (n-1)
    a242401_list = filter ((== 0) . a010054) a000037_list
    -- Reinhard Zumkeller, May 13 2014
  • Mathematica
    With[{nn=90},Complement[Range[nn],Range[Floor[Sqrt[nn]]]^2,Accumulate[ Range[ Floor[(Sqrt[1+8nn]-1)/2]]]]] (* Harvey P. Dale, May 03 2022 *)
  • Sage
    [x for x in [1..100] if not(is_square(x)) and not(is_triangular_number(x))] # Tom Edgar, May 13 2014
    

Formula

A010052(a(n)) + A010054(a(n)) = 0. - Reinhard Zumkeller, May 13 2014