A285356 Numbers n such that the entries in the n-th row of the irregular triangle A237591 are in nonincreasing order.
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 21, 22, 23, 24, 26, 28, 29, 30, 31, 32, 36, 37, 38, 40, 41, 45, 46, 47, 48, 51, 55, 57, 58, 59, 66, 67, 70, 71, 78, 79, 80, 84, 92, 93, 94, 108, 109, 120, 136, 137, 155
Offset: 1
Keywords
Examples
19 is in the sequence since row 19 in A237591 is 10, 4, 2, 2, 1. 20 is not in the sequence since row 20 in A237591 is 11, 4, 2, 1, 2.
Links
- Hartmut F. W. Hoft, Example plot and justification for the formula in conjecture 4
Programs
-
Mathematica
(* functions row[] and f[] are defined in A237591 *) nonincreasingQ[n_] := Module[{i=2, b=row[n], good=True}, While[good && i<=b, good=good && (f[n, i]<=f[n, i-1]); i++]; good] a285356[m_, n_] := Module[{i, sols={}}, For[i=m, i<=n, i++, If[nonincreasingQ[i], AppendTo[sols, i]]]; sols] a285356[1,200] (* data *)
-
Python
import math from sympy import sqrt def T(n, k): return int(math.ceil((n + 1)/k - (k + 1)/2)) - int(math.ceil((n + 1)/(k + 1) - (k + 2)/2)) def isok(n): l = [T(n, k) for k in range(1, int(math.floor((sqrt(8*n + 1) - 1)/2)) + 1)] for i in range(len(l) - 1): if l[i + 1] > l[i]: return 0 return 1 print([n for n in range(1, 156) if isok(n)]) # Indranil Ghosh, Apr 20 2017
Comments