A145397 Numbers not of the form m*(m+1)*(m+2)/6, the non-tetrahedral numbers.
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, 30, 31, 32, 33, 34, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78
Offset: 1
Keywords
Links
- G. C. Greubel, Table of n, a(n) for n = 1..5000
- Cristinel Mortici, Remarks on Complementary Sequences, Fibonacci Quart. 48 (2010), no. 4, 343-347.
Programs
-
Magma
[n: n in [1..100] | Binomial(Floor((6*n-1)^(1/3))+2, 3) ne n ]; // G. C. Greubel, Feb 20 2022
-
Mathematica
Select[Range[100], Binomial[Floor[Surd[6*# -1, 3]] +2, 3] != # &] (* G. C. Greubel, Feb 20 2022 *)
-
PARI
is(n)=binomial(sqrtnint(6*n,3)+2,3)!=n \\ Charles R Greathouse IV, Feb 22 2017
-
Python
from itertools import count from math import comb from sympy import integer_nthroot def A145397(n): def f(x): return n+next(i for i in count(integer_nthroot(6*x,3)[0],-1) if comb(i+2,3)<=x) def iterfun(f,n=0): m, k = n, f(n) while m != k: m, k = k, f(k) return m return iterfun(f,n) # Chai Wah Wu, Sep 09 2024
-
Python
from math import comb from sympy import integer_nthroot def A145397(n): return n+(m:=integer_nthroot(6*n,3)[0])-(n+m<=comb(m+2,3)) # Chai Wah Wu, Oct 01 2024
-
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
Formula
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
Extensions
Definition corrected by Ant King, Sep 20 2012
Comments