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-15 of 15 results.

A277596 Numbers k such that k/10^m == 9 mod 10, where 10^m is the greatest power of 10 that divides n.

Original entry on oeis.org

9, 19, 29, 39, 49, 59, 69, 79, 89, 90, 99, 109, 119, 129, 139, 149, 159, 169, 179, 189, 190, 199, 209, 219, 229, 239, 249, 259, 269, 279, 289, 290, 299, 309, 319, 329, 339, 349, 359, 369, 379, 389, 390, 399, 409, 419, 429, 439, 449, 459, 469, 479, 489, 490
Offset: 1

Views

Author

Clark Kimberling, Nov 07 2016

Keywords

Comments

Positions of 9 in A065881.
Numbers having 9 as rightmost nonzero digit in base 10. This is one sequence in a 10-way splitting of the positive integers; the other nine are indicated in the Mathematica program.

Crossrefs

Programs

A116081 Final nonzero digit of n^n.

Original entry on oeis.org

1, 4, 7, 6, 5, 6, 3, 6, 9, 1, 1, 6, 3, 6, 5, 6, 7, 4, 9, 6, 1, 4, 7, 6, 5, 6, 3, 6, 9, 9, 1, 6, 3, 6, 5, 6, 7, 4, 9, 6, 1, 4, 7, 6, 5, 6, 3, 6, 9, 5, 1, 6, 3, 6, 5, 6, 7, 4, 9, 6, 1, 4, 7, 6, 5, 6, 3, 6, 9, 9, 1, 6, 3, 6, 5, 6, 7, 4, 9, 6, 1, 4, 7, 6, 5, 6, 3, 6, 9, 1, 1, 6, 3, 6, 5, 6, 7, 4, 9, 1, 1, 4, 7, 6, 5
Offset: 1

Views

Author

Greg Dresden, Mar 12 2006

Keywords

Comments

The decimal number .147656369116... formed from these digits is a transcendental number; see Dresden's second article. These digits are never eventually periodic.
Digits appear with predictable frequencies: 1/10 for 3, 4, and 7; 1/9 for 5; 3/25 for 9; 28/225 for 1; and 307/900 for 6. - Charles R Greathouse IV, Oct 03 2022

Examples

			a(4) = 6 because 4^4 (which is 256) ends in 6.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local d, m, p; d:= min(padic:-ordp(n,2), padic:-ordp(n,5));
       m:= n/10^d;
       p:= n - 1 mod 4 + 1;
       m &^ p mod 10;
    end proc:
    seq(f(n), n=1..1000); # Robert Israel, Oct 19 2014
  • Mathematica
    f[n_] := Block[{m = n}, While[ Mod[m, 10] == 0, m /= 10]; PowerMod[m, n, 10]]; Array[f, 105] (* Robert G. Wilson v, Mar 13 2006 and modified Oct 12 2014 *)
  • PARI
    f(n) = while(!(n % 10), n/=10); n % 10; \\ A065881
    a(n) = lift(Mod(f(n), 10)^n); \\ Michel Marcus, Sep 13 2022
    
  • PARI
    a(n)=my(k=n/10^valuation(n,10)); lift(Mod(k,10)^(n%4+4)) \\ Charles R Greathouse IV, Sep 13 2022
    
  • Python
    def a(n):
        k = n
        while k%10 == 0: k //= 10
        return pow(k, n, 10)
    print([a(n) for n in range(1, 106)]) # Michael S. Branicky, Sep 13 2022
    
  • Python
    def A116081(n): return pow(int(str(n).rstrip('0')[-1]),n,10) # Chai Wah Wu, Dec 07 2023

Formula

a(n) = A065881(n)^n mod 10 = A010879(A065881(n)^(A010883(n-1))). - Robert Israel, Oct 19 2014

Extensions

More terms from Robert G. Wilson v, Mar 13 2006

A376838 Phase shift (original name "sfasamento") of the tetration base 10*n at height 2.

Original entry on oeis.org

1, 6, 9, 6, 5, 6, 9, 6, 1, 1, 1, 6, 9, 6, 5, 6, 9, 6, 1, 6, 1, 6, 9, 6, 5, 6, 9, 6, 1, 1, 1, 6, 9, 6, 5, 6, 9, 6, 1, 6, 1, 6, 9, 6, 5, 6, 9, 6, 1, 5, 1, 6, 9, 6, 5, 6, 9, 6, 1, 6, 1, 6, 9, 6, 5, 6, 9, 6, 1, 1, 1, 6, 9, 6, 5, 6, 9, 6, 1, 6, 1, 6, 9, 6, 5, 6, 9
Offset: 1

Views

Author

Marco Ripà, Oct 06 2024

Keywords

Comments

Let m^^b be m^m^...^m b-times (integer tetration).
For any n, the phase shift of n*10 at height b is defined as the congruence class modulo 10 of the difference between the least significant non-stable digit of (n*10)^^b and the corresponding digit of (n*10)^^(b+1), so the phase shift of n*10 at height 1 is trivially A065881(n).
Thus, assume b = 2 and, for any given tetration base n*10, this sequence represents the congruence classes modulo 10 of the differences between the rightmost non-stable digit of (n*10)^(n*10) and the zero of (n*10)^((n*10)^(n*10)) which occupies the same decimal position (counting from right to the left) as the rightmost nonzero digit of (n*10)^(n*10).

Examples

			a(2) = 6 since 20^20 == 0 (mod 10^20) and 20^20 == 6 (mod 10^21), and trivially 6 - 0 = 6.
		

References

  • Marco Ripà, La strana coda della serie n^n^...^n, Trento, UNI Service, Nov 2011. ISBN 978-88-6178-789-6.

Crossrefs

Programs

  • Python
    # Function to calculate the p-adic valuation
    def p_adic_valuation(n, p):
        count = 0
        while n % p == 0 and n != 0:
            n //= p
            count += 1
        return count
    # Function to calculate tetration (tower of powers)
    def tetration(base, height, last_digits=50000):
        results = [base]
        for n in range(1, height):
            result = pow(base, results[-1], 10**last_digits)  # Only the last last_digits digits
            results.append(result)
        return results
    # Function to find the first non-zero difference and compute modulo 10
    def find_difference_mod_10(tetrations):
        differences = []
        for n in range(len(tetrations) - 1):
            string_n = str(tetrations[n]).zfill(50000)  # Pad with zeros if needed
            string_n_plus_1 = str(tetrations[n+1]).zfill(50000)
            # Find the first difference starting from the rightmost digit
            for i in range(49999, -1, -1):  # From right to left
                if string_n[i] != string_n_plus_1[i]:
                    difference = (int(string_n[i]) - int(string_n_plus_1[i])) % 10
                    differences.append(difference)
                    break
        return differences
    # Function to determine the first hyperexponent based on modulo 5 congruences
    def calculate_initial_exponent(a):
        mod_5 = a % 5
        if mod_5 == 1:
            valuation = p_adic_valuation(a - 1, 5)
            initial_exponent = valuation + 2
        elif mod_5 in [2, 3]:
            valuation = p_adic_valuation(a**2 + 1, 5)
            initial_exponent = valuation + 2
        elif mod_5 == 4:
            valuation = p_adic_valuation(a + 1, 5)
            initial_exponent = valuation + 2
        else:
            valuation = p_adic_valuation(a**2 - 1, 2)
            initial_exponent = valuation + 1
        return initial_exponent
    # Main logic
    try:
        # Ask for the maximum value of n*10
        n = int(input("Write the maximum value of n*10: "))
        # Validate the input
        if n <= 1 or n > 1000:
            raise ValueError("Please enter a positive integer between 1 and 1000.")
        # Initialize an empty list to store the second digits of the sfasamenti
        sfasamenti_second_digits = []
        # Loop through bases 10, 20, ..., n*10
        for a in range(10, (n * 10) + 1, 10):
            # Calculate the initial exponent based on modulo 5 congruence
            initial_exponent = calculate_initial_exponent(a)
            # Generate tetrations for 30 iterations and the last 500 digits
            tetrations = tetration(a, 3, last_digits=50000)
            # Find the modulo 10 differences for the 4 required iterations
            mod_10_differences = find_difference_mod_10(tetrations[initial_exponent-1:initial_exponent+4])
            # Optimization of the output
            if mod_10_differences[:2] == mod_10_differences[2:]:
                mod_10_differences = mod_10_differences[:2]
            if len(set(mod_10_differences)) == 1:
                mod_10_differences = [mod_10_differences[0]]
            # Append the second digit of the sfasamenti (if it exists) to the list
            if len(mod_10_differences) > 1:
                sfasamenti_second_digits.append(mod_10_differences[1])
            else:
                sfasamenti_second_digits.append(mod_10_differences[0])
        # Convert the list of second digits into a string
        result_str = ', '.join(map(str, sfasamenti_second_digits))
        # Print the final output
        print(f"The values of the sfasamenti at height 2 of 10 to {n * 10} are: {result_str}")
    except Exception as e:
        print(f"ERROR!\n{e}")

Formula

a(n) equals the least significant nonzero digit of n^(n*10).
Let h indicate the least significant digit of n, then
a(n) = 1 if h = 1,9 or (h = 3,7 and n == (0 mod 10));
a(n) = 6 if h = 2,4,6,8;
a(n) = 9 if (h = 3,7 and n is not congruent to 0 modulo 10);
a(n) = 5 if h = 5.

A377124 Phase shift (original name "sfasamento") of the tetration base 10*n at any height greater than or equal to 3.

Original entry on oeis.org

1, 6, 1, 6, 5, 6, 1, 6, 1, 1, 1, 6, 1, 6, 5, 6, 1, 6, 1, 6, 1, 6, 1, 6, 5, 6, 1, 6, 1, 1, 1, 6, 1, 6, 5, 6, 1, 6, 1, 6, 1, 6, 1, 6, 5, 6, 1, 6, 1, 5, 1, 6, 1, 6, 5, 6, 1, 6, 1, 6, 1, 6, 1, 6, 5, 6, 1, 6, 1, 1, 1, 6, 1, 6, 5, 6, 1, 6, 1, 6, 1, 6, 1, 6, 5, 6, 1
Offset: 1

Views

Author

Marco Ripà, Oct 17 2024

Keywords

Comments

Let m^^b be m^m^...^m b-times (integer tetration).
For any n, the phase shift of n*10 at height b is defined as the congruence class modulo 10 of the difference between the least significant non-stable digit of (n*10)^^b and the corresponding digit of (n*10)^^(b+1), so the phase shift of n*10 at height 1 is trivially A065881(n) while the phase shift of n*10 at height 2 is given by A376838(n).
Thus, assume b >= 3 and, for any given tetration base n*10, this sequence represents the congruence classes modulo 10 of the differences between the rightmost non-stable digit of (n*10)^^b and the zero of (n*10)^^(b+1) which occupies the same decimal position (counting from right to the left) as the rightmost nonzero digit of (n*10)^^b (see Appendix of "Graham's number stable digits: an exact solution" in Links).
If n == 3,7 (mod 10), a(n) <> A065881(n) since the least significant nonzero digit of (n*10)^^b only depends on the last digit of n^^(b - 1) and, in the mentioned two cases, n*10 is not congruent to 0 modulo 4, whereas (n*10)^(n*10) is clearly a multiple of 4 given the fact that it is also a multiple of 100 (e.g., if n = 3 is given, the last nonzero digit of (n*10)^(n*10) is 3 iff (n*10) == 1 (mod 4), 9 iff (n*10) == 2 (mod 4), 7 iff (n*10) == 3 (mod 4), 1 iff (n*10) == 0 (mod 4), which is the only case we are considering here since (3*10)^(3*10) == 0 (mod 100)).

Examples

			a(1) = 1 since 10^(10^10) == 0 (mod 10^10000000000) and 10^(10^10) == 1 (mod 10^10000000001), and trivially 1 - 0 = 1.
		

References

  • Marco Ripà, La strana coda della serie n^n^...^n, Trento, UNI Service, Nov 2011. ISBN 978-88-6178-789-6.

Crossrefs

Formula

a(n) equals the least significant nonzero digit of n^((n*10)^(n*10)).
Let h indicate the least significant nonzero digit of n. Then,
a(n) = 1 iff h = 1,3,7,9;
a(n) = 5 iff h = 5;
a(n) = 6 iff h = 2,4,6,8.

A376883 Phase shift of the tetration base n at height n.

Original entry on oeis.org

8, 6, 4, 5, 8, 6, 4, 2, 1, 4, 4, 6, 8, 5, 6, 4, 8, 6, 6, 6, 8, 4, 8, 5, 6, 6, 6, 6, 1, 4, 2, 2, 2, 5, 4, 2, 8, 8, 6, 4, 8, 6, 6, 5, 2, 4, 2, 6, 5, 5, 6, 8, 6, 5, 2, 2, 8, 2, 1, 4, 8, 4, 8, 5, 6, 4, 4, 4, 6, 4, 8, 4, 4, 5, 8, 8, 8, 4, 1, 6, 8, 6, 2, 5, 4, 6, 8
Offset: 2

Views

Author

Marco Ripà, Oct 25 2024

Keywords

Comments

Let n^^b be n^n^...^n b-times (integer tetration).
From here on, we call "stable digits" (or frozen digits) of any given tetration n^^b all and only the rightmost digits of the above-mentioned tetration that matches the corresponding string of right-hand digits generated by the unlimited power tower n^(n^(n^...)).
We define as "constant congruence speed" of n all the nonnegative terms of A373387(n).
Let #S(n) indicate the total number of the least significant stable digits of n at height n. Additionally, for any n not a multiple of 10, let bar_b be the smallest hyperexponent of the tetration base n such that its congruence speed is constant (see A373387(n)), and assume bar_b = 3 if n is multiple of 10.
If n > 1, we note that a noteworthy property of the phase shift of n at any height b >= bar_b is that it describes a cycle whose period length is either 1, 2, or 4 so that (assuming b >= bar_b) the phase shift of n at height b is always equal to the phase shift of n at height b+4, b+8, and so forth.
Lastly, for any n, the phase shift of n at height n is defined as the (least significant non-stable digit of n^^n minus the corresponding digit of n^^(n+1)) mod 10 (e.g., the phase shift of 2 at height 2 is (4 - 6) mod 10 = 8).
Now, if n > 2 is not a multiple of 10 and is such that A377126(n) = 1, then a(n) = A376842(n) since the congruence speed of n is certainly stable at height n being a sufficient but not necessary condition for the constancy of the congruence speed of n that the hyperexponent of the given base is greater than or equal to 2 + v(n), where v(n) is equal to u_5(n - 1) iff n == 1 (mod 5), u_5(n^2 + 1) iff n == 2,3 (mod 5), u_5(n + 1) iff n == 4 (mod 5), u_2(n^2 - 1) - 1 iff n == 5 (mod 10), while u_5 and u_2 indicate the 5-adic and the 2-adic valuation of the argument (respectively).
Since 4 is a multiple of every A377126(n), a(n) is equal to ((n^((n - bar_b) mod 4 + bar_b) - n^((n - bar_b) mod 4 + bar_b + 1))/10^#S(n)) mod 10.
Moreover, if n is not a multiple of 10, a(n) is also equal to ((n^((n - (v(n) + 2)) mod 4 + (v(n) + 2)) - n^((n - (v(n) + 2)) mod 4 + (v(n) + 2) + 1))/10^#S(n)) mod 10, where v(n) is equal to
u_5(n - 1) iff n == 1 (mod 5),
u_5(n^2 + 1) iff n == 2,3 (mod 5),
u_5(n + 1) iff n == 4 (mod 5),
u_2(n^2 - 1) - 1 iff n == 5 (mod 10) (u_5 and u_2 indicate the 5-adic and the 2-adic valuation of the argument, respectively, see Comments of A373387).

Examples

			a(11) = 4 since A376842(11) = 4 is a 1 digit number.
		

References

  • Marco Ripà, La strana coda della serie n^n^...^n, Trento, UNI Service, Nov 2011. ISBN 978-88-6178-789-6.

Crossrefs

Formula

a(n) = ((n^((n - (v(n) + 2)) mod 4 + (v(n) + 2)) - n^((n - (v(n) + 2)) mod 4 + (v(n) + 2) + 1))/10^#S(n)) mod 10 if n not a multiple of 10, and a(n) = A377124(n/10) if n is a multiple of 10.
Previous Showing 11-15 of 15 results.