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.

A145397 Numbers not of the form m*(m+1)*(m+2)/6, the non-tetrahedral numbers.

This page as a plain text file.
%I A145397 #32 Jan 05 2025 19:51:38
%S A145397 2,3,5,6,7,8,9,11,12,13,14,15,16,17,18,19,21,22,23,24,25,26,27,28,29,
%T A145397 30,31,32,33,34,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,
%U A145397 54,55,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78
%N A145397 Numbers not of the form m*(m+1)*(m+2)/6, the non-tetrahedral numbers.
%C A145397 Complement of A000292; A000040 is a subsequence.
%H A145397 G. C. Greubel, <a href="/A145397/b145397.txt">Table of n, a(n) for n = 1..5000</a>
%H A145397 Cristinel Mortici, <a href="https://web.archive.org/web/2024*/https://www.fq.math.ca/Papers1/48-4/Mortici.pdf">Remarks on Complementary Sequences</a>, Fibonacci Quart. 48 (2010), no. 4, 343-347.
%F A145397 A014306(a(n)) = 1; A023533(a(n)) = 0.
%F A145397 a(n) = n+m if 6(n+m)>m(m+1)(m+2) and a(n)=n+m-1 otherwise where m is floor((6n)^(1/3)). - _Chai Wah Wu_, Oct 01 2024
%t A145397 Select[Range[100], Binomial[Floor[Surd[6*# -1, 3]] +2, 3] != # &] (* _G. C. Greubel_, Feb 20 2022 *)
%o A145397 (PARI) is(n)=binomial(sqrtnint(6*n,3)+2,3)!=n \\ _Charles R Greathouse IV_, Feb 22 2017
%o A145397 (Magma) [n: n in [1..100] | Binomial(Floor((6*n-1)^(1/3))+2, 3) ne n ]; // _G. C. Greubel_, Feb 20 2022
%o A145397 (Sage) [n for n in (1..100) if binomial( floor( real_nth_root(6*n-1, 3) ) +2, 3) != n ] # _G. C. Greubel_, Feb 20 2022
%o A145397 (Python)
%o A145397 from itertools import count
%o A145397 from math import comb
%o A145397 from sympy import integer_nthroot
%o A145397 def A145397(n):
%o A145397     def f(x): return n+next(i for i in count(integer_nthroot(6*x,3)[0],-1) if comb(i+2,3)<=x)
%o A145397     def iterfun(f,n=0):
%o A145397         m, k = n, f(n)
%o A145397         while m != k: m, k = k, f(k)
%o A145397         return m
%o A145397     return iterfun(f,n) # _Chai Wah Wu_, Sep 09 2024
%o A145397 (Python)
%o A145397 from math import comb
%o A145397 from sympy import integer_nthroot
%o A145397 def A145397(n): return n+(m:=integer_nthroot(6*n,3)[0])-(n+m<=comb(m+2,3)) # _Chai Wah Wu_, Oct 01 2024
%Y A145397 Cf. A000040, A000292, A014306, A023533.
%K A145397 nonn
%O A145397 1,1
%A A145397 _Reinhard Zumkeller_, Oct 14 2008
%E A145397 Definition corrected by _Ant King_, Sep 20 2012