r/MathHelp • • 14h ago

Sequence formulas I derived starting from any two consecutive terms — feedback welcome

1 Upvotes

Note: This is my own work as a high school student, so there might be some mistakes or missing conditions. Any corrections or feedback are very welcome.

I put together a set of sequence formulas that work starting from any two consecutive terms a_m and a_{m+1} (for positive integers n and m, assuming no division by zero).

Shorthand notation I used for variable-step multiplication:

[x ↑ k]_t means the product of t consecutive factors starting at x and increasing by k each step (and when t = 0, the value is 1).

Formulas:

(1) Arithmetic (direct from two consecutive terms):

a_n = a_{m+1}(n - m) - a_m(n - m - 1) (for n >= 1)

(2) Geometric (direct from two consecutive terms):

a_n = (a_{m+1})^(n - m) / (a_m)^(n - m - 1) (for n >= m + 1, a_m != 0)

(3) Variable-step multiplication (direct, multiplier increases by +k each step):

a_n = a_m * [r_m ↑ k]_{n - m} where r_m = a_{m+1} / a_m (for n >= m + 1, a_m != 0)

(4) Variable-step division (direct, divisor increases by +k each step):

a_n = a_m / [q_m ↑ k]_{n - m} where q_m = a_m / a_{m+1} (for n >= m + 1, a_{m+1} != 0)

(5) Quadratic (recursive when the second difference k is constant):

a_n = 2a_{n-1} - a_{n-2} + k (for n >= 3)

Quick example:

If a_2 = 6 and a_3 = 18 (so m = 2 and r_2 = 3), and the multiplier increases by k = 1 each step, to find a_5:

a_5 = 6 * [3 ↑ 1]_3 = 6 * (3 * 4 * 5) = 6 * 60 = 360

Are there any edge cases or domain conditions I missed, or ways to make the notation clearer?


r/MathHelp • • 18h ago

Vector Math not aligning with graph

1 Upvotes

I have a problem where I am trying to find the deflection of a rod that is fixed at both ends.

In order to do this, I found the coordinates of the rod at 7 points, then I calculated the vector from point 1 to point 7 (V1_7) by taking pt7 - pt1.

Once i had my vector, I used a cross product formula to find the perpendicular distance of all the other points from that vector line using the cross product. (|V1_N X V1_7) / |V1_7|

When I graph my results, point 4 is what bothers me. According to my offsets graph, point 4 is the second furthest from the line. However, when I plot all the points on a 3d graph, point 4 is very close to the line, much closer than any other points.

I'm sure I'm missing something, and any help would be greatly appreciated.

Pictures will be in the comments.

###---------------------------------------------------------------------------------###

Here is some of the python code that I'm using:

    Rod = np.array([[26.646, 4369.909, -95.854], 
                [-450.477, 4312.063, -96.437], 
                [-903.188, 4256.946, -96.951],
                [-1448.336, 4190.796, -97.84], 
                [-2010.247, 4122.95, -99.004],
                [-2552.131, 4058.507, -99.636],
                [-2827.032, 4025.964, -99.672]])

    Vector1_7 = Rod[-1,:] - Rod[0,:]
    length = len(Rod)
    i = 0
    offsets = np.zeros(length)
    while i < length : 
        Vector_i = Rod[i,:] - Rod[0,:]
        offset_i = np.linalg.norm(np.cross(Vector_i, Vector1_7)) / (np.linalg.norm(Vector1_7))
        offset_i_inches = offset_i / 25.4
        print("i = ",i, "    offset = ", offset_i_inches, '"')
        offsets[(i)] = offset_i_inches
        i +=1
    print(offsets)
    x = range(1, length + 1)
    plt.plot(x,offsets)
    plt.ylabel("offset (\")")
    plt.xlabel("point on Rod")
    plt.title(name)
    plt.show()