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.

Previous Showing 11-12 of 12 results.

A374266 Smallest number reachable by a Fibonacci-like iteration where one has the option to either omit or keep zero digits.

Original entry on oeis.org

1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 61, 438, 499, 937, 1436, 2373, 389, 2762, 1657, 1368, 325, 1693, 218, 1911, 2129, 44, 1516, 129, 394, 37, 53, 9, 62, 35, 133, 24, 121, 181, 95, 69, 11, 53, 19, 9, 19, 19, 2, 12, 5, 8, 4, 3, 7, 1, 8, 9, 8, 8, 7, 6, 4
Offset: 1

Views

Author

Bryle Morga, Jul 02 2024

Keywords

Comments

a(n) is the smallest f(n) such that f(1)=f(2)=1 and f(i) = OpNoz_i(f(i-1)+f(i-2)) for 2
Choosing to always remove zero digits at each step gives A243063. This strategy of always choosing to remove zeros is optimal for n < 23. For n >= 23, a(n) < A243063(n), i.e., the optimal path contains a step that keeps zeros.
Removal of zeros preserves the digital root giving the lower bound a(n) >= A030132(n). In fact, for n >= 53, a(n) = A030132(n). It follows that this sequence is eventually periodic with a period of 24.

Examples

			a(23) = 1657 via the path: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 1946, 8711, 1657.
		

Programs

  • Python
    def a(n):
        reach = {(1, 1)}
        for _ in range(n-1):
            newreach = set()
            for a, b in reach:
                newreach.update([(b, a+b), (b, int(str(a+b).replace('0', '')))])
            reach = newreach
        return min(reach, key = lambda k:k[0])[0]

Formula

a(n) <= A243063(n); Strict inequality for n >= 23.
a(n) = A030132(n) and a(n) = a(n+24) for n >= 53.

A371916 Zeroless analog of tetranacci numbers.

Original entry on oeis.org

1, 1, 1, 1, 4, 7, 13, 25, 49, 94, 181, 349, 673, 1297, 25, 2344, 4339, 85, 6793, 13561, 24778, 45217, 9349, 9295, 88639, 1525, 1888, 11347, 13399, 28159, 54793, 17698, 11449, 11299, 95239, 135685, 253672, 495895, 98491, 983743, 183181, 176131, 1441546, 278461, 279319, 2175457
Offset: 0

Author

Bryle Morga, Apr 12 2024

Keywords

Comments

It is not known whether this sequence cycles, but it is conjectured to cycle just like A243063 and A371911 (have periods of 912 and 300056874, respectively) because the expected growth factor in the number of digits of successive terms is 0.9.
It's been computationally verified that if the sequence does cycle, then s+p > 10^10, where s and p are the starting index and period of the cycle, respectively.

Examples

			a(14) = Zr(a(13)+a(12)+a(11)+a(10)) = Zr(1297+673+349+181) = Zr(2500) = 25.
		

Programs

  • Mathematica
    a[0]=a[1]=a[2]=a[3]=1; a[n_]:=FromDigits[DeleteCases[IntegerDigits[a[n-1]+a[n-2]+a[n-3]+a[n-4]], 0]]; Array[a, 46, 0] (* Stefano Spezia, Apr 12 2024 *)
  • Python
    def a(n):
        a, b, c, d = 1, 1, 1, 1
        for _ in range(n):
            a, b, c, d = b, c, d, int(str(a+b+c+d).replace('0', ''))
        return a
    
  • Python
    # faster for initial segment of sequence
    from itertools import islice
    def agen(): # generator of terms
        a, b, c, d = 1, 1, 1, 1
        while True:
            yield a
            a, b, c, d = b, c, d, int(str(a+b+c+d).replace("0", ""))
    print(list(islice(agen(), 45))) # Michael S. Branicky, Apr 13 2024

Formula

a(n) = Zr(a(n-1)+a(n-2)+a(n-3)+a(n-4)), where the function Zr(k) removes zero digits from k.
Previous Showing 11-12 of 12 results.