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.

Showing 1-10 of 15 results. Next

A091662 Duplicate of A063006.

Original entry on oeis.org

1, 5, 7, 8, 1, 2, 4, 7, 5, 3, 6, 1, 0, 8, 4, 7, 8, 4, 5, 1, 2, 5, 4, 0, 0, 6, 7, 6, 8, 7, 1, 9, 9, 1, 8
Offset: 0

Views

Author

Keywords

A317905 Convergence speed of m^^m, where m = A067251(n) and n >= 2. a(n) = f(m, m) - f(m, m - 1), where f(x, y) corresponds to the maximum value of k, such that x^^y == x^^(y + 1) (mod 10^k).

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 2, 1, 1, 1, 1, 2, 3, 2, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, 6, 1, 1, 3, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 5, 1, 1
Offset: 2

Views

Author

Marco Ripà, Aug 10 2018

Keywords

Comments

It is possible to anticipate the convergence speed of m^^m, where ^^ indicates tetration or hyper-4 (e.g., 3^^4 = 3^(3^(3^3))), simply looking at the congruence (mod 25) of m. In fact, assuming m > 2, a(n) = 1 for any m == 2, 3, 4, 6, 8, 9, 11, 12, 13, 14, 16, 17, 19, 21, 22, 23 (mod 25), and a(n) >= 2 otherwise.
It follows that 32/45 = 71.11% of the a(n) assume unitary value.
You can also obtain an arbitrary high convergence speed, such as taking the beautiful base b = 999...99 (9_9_9... n times), which gives a(n) = len(b), for any len(b) > 1. Thus, 99...9^^m == 99...9^^(m + 1) (mod m*10^len(b)), as proved by Ripà in "La strana coda della serie n^n^...^n", pages 25-26. In fact, m = 99...9 == 24 (mod 25) and a(m=24) > 1.
From Marco Ripà, Dec 19 2021: (Start)
Knowing the "constant congruence speed" of a given base (a.k.a. the convergence speed of the base m, assuming m > 2) is very useful in order to calculate the exact number of stable digits of all its tetrations of height b > 1. As an example, let us consider all the a(n) such that n is congruent to 4 (mod 9) (i.e., all the tetration bases belonging to the congruence class 5 (mod 10)). Then, the exact number of stable digits (#S(m, b)) of any tetration m^^b (i.e., the number of its last "frozen" digits) such that m is congruent to 5 (mod 10), for any b >= 3, can automatically be calculated by simply knowing that (under the stated constraint) the congruence speed of the m corresponds to the 2-adic valuation of (m^2 - 1) minus 1. Thus, let k = 1, 2, 3, ..., and we have that
If m = 20*k - 5, then #S(m, b > 2) = b*(v_2(m^2 - 1) - 1) + 1 = b*(v_2(m + 1) + 1);
If m = 20*k + 5, then #S(m, b > 2) = (b + 1)*(v_2(m^2 - 1) - 1) = (b + 1)*(v_2(m - 1));
If m = 5, then #S(m, 1) = 1, #S(m, 2) = 4, #S(m, b > 2) = 8 + 2*(b - 3).
(End)
For any n > 2, the value of a(n) depends on the congruence modulo 18 of n, since the constant congruence speed of m arises from the 14 nontrivial solutions of the fundamental equation y^5 = y in the (commutative) ring of decadic integers (e.g., y = -1 = ...9999 is a solution of y^5 = y, so it originates the law a(n) = min(v_2(m + 1), v_5(m + 1)) concerning every n belonging to the congruence class 0 modulo 18, as stated in the "Formula" section of the present sequence). - Marco Ripà, Feb 17 2022
a(n) satisfies the following multiplicative constraint: for each pair (m_1, m_2) of terms of A067251, a(m_1*m_2) is necessarily greater than or equal to the minimum between a(m_1) and a(m_2) (see Equation 2.4 and Appendix of "A Compact Notation for Peculiar Properties Characterizing Integer Tetration" in Links). - Gabriele Di Pietro, Apr 29 2025

Examples

			For m = 25, a(23) = 3 implies that 25^^(25 + i) freezes 3*i "new" rightmost digits (i >= 0).
		

References

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

Crossrefs

Programs

  • PARI
    \\ uses reducetower.gp from links
    f2(x,y) = my(k=0); while(reducetower(x, 10^k, y) == reducetower(x, 10^k, y+1), k++); k;
    f1(n) = polcoef(x*(x+1)*(x^4-x^3+x^2-x+1)*(x^4+x^3+x^2+x+1) / ((x-1)^2*(x^2+x+1)*(x^6+x^3+1)) + O(x^(n+1)), n, x); \\ A067251
    a(n) =  my(m=f1(n)); f2(m, m) - f2(m, m-1);
    lista(nn) = {for (n=2, nn, print1(a(n), ", "););} \\ Michel Marcus, Jan 27 2021

Formula

Let n > 2. For any integer c >= 0, if n is an element of the set {5, 7, 14, 17, 22, 23, 24, 29, 32, 39, 41, 45, 46}, then a(n + 45*c) >= 2; whereas a(n) = 1 otherwise. - Marco Ripà, Sep 28 2018
If n == 5 (mod 9), then a(n) = v_2(a(n)^2 - 1) - 1, where v_2(x) indicates the 2-adic valuation of x. - Marco Ripà, Dec 19 2021
If n == 1 (mod 18) and n <> 1, then a(n) = min(v_2(m - 1), v_5(m - 1)) (i.e., 1 plus the number of trailing zeros, if any, next to the rightmost digit of m);
if n == 10 (mod 18), then a(n) = min(v_2(m + 1), v_5(m - 1));
if n == {2,8}(mod 9) and n <> 2, then a(n) = v_5(m^2 + 1);
if n == {3,7}(mod 18), then a(n) = min(v_2(m + 1), v_5(n^2 + 1));
if n == {12,16}(mod 18), then a(n) = min(v_2(m - 1), v_5(n^2 + 1));
if n == 4 (mod 9), then a(n) = v_5(m + 1);
if n == 5 (mod 18), then a(n) = v_2(m - 1);
if n == 14 (mod 18), then a(n) = v_2(m + 1);
if n == 6 (mod 9), then a(n) = v_5(m - 1);
if n == 9 (mod 18), then a(n) = min(v_2(m - 1), v_5(m + 1));
if n == 0 (mod 18), then a(n) = min(v_2(m + 1), v_5(m + 1)) (i.e., number of digits of the rightmost repunit "9's" of m); where v_2(x) and v_5(x) indicates the 2-adic valuation of (x) and the 5-adic valuation of (x), respectively. - Marco Ripà, Feb 17 2022

Extensions

Edited by Jinyuan Wang, Aug 30 2020

A091664 10-adic integer x=.....06619977392256259918212890624 satisfying x^3 = x.

Original entry on oeis.org

4, 2, 6, 0, 9, 8, 2, 1, 2, 8, 1, 9, 9, 5, 2, 6, 5, 2, 2, 9, 3, 7, 7, 9, 9, 1, 6, 6, 0, 1, 4, 0, 0, 9, 0, 1, 6, 9, 8, 0, 3, 2, 3, 2, 4, 3, 2, 4, 7, 5, 5, 0, 0, 0, 1, 1, 8, 3, 6, 8, 0, 8, 5, 9, 0, 5, 6, 6, 1, 2, 6, 0, 0, 9, 8, 9, 0, 5, 8, 3, 9, 2, 0, 8, 9, 6, 1, 8, 0, 1, 9, 1, 3, 7, 0, 0, 3, 5, 9, 3
Offset: 0

Views

Author

Edoardo Gueglio (egueglio(AT)yahoo.it), Jan 28 2004

Keywords

Comments

Let a,b be integers defined in A018247, A018248 satisfying a^2=a, b^2=b, obviously a^3=a, b^3=b; let c,d,e,f be integers defined in A091661, A063006, A091663, A091664; then c^3=c, d^3=d, e^3=e, f^3=f, c+d=1, a+e=1, b+f=1, b+c=a, d+f=e, a+f=c, a=f+1, b=e+1, cd=-1, af=-1, gh=-1 where -1=.....999999999.

Examples

			x equals the limit of the (n+1) trailing digits of 4^(5^n):
4^(5^0) = (4), 4^(5^1) = 10(24), 4^(5^2) = 1125899906842(624), ...
x = ...0557423423230896109004106619977392256259918212890624.
		

Crossrefs

Programs

  • Mathematica
    To calculate c, d, e, f use Mathematica algorithms for a, b and equations: c=a-b, d=1-c, e=b-1, f=a-1.
  • PARI
    {a(n)=local(b=4,v=[]); for(k=1, n+1, b=b^5%10^k; v=concat(v,(10*b\10^k))); v[n+1]} \\ Paul D. Hanna, Jul 06 2006
    
  • PARI
    (A091664_vec(n)=Vecrev(digits(lift(chinese(Mod(0,2^n),Mod(-1,5^n))))))(99) \\ M. F. Hasler, Jan 26 2020

Formula

x = r^2 where r = ...1441224165530407839804103263499879186432 (A120817). x = 10-adic lim_{n->oo} 4^(5^n). - Paul D. Hanna, Jul 06 2006
For n > 0, a(n) = 9 - A018248(n) = A018247(n). - Seiichi Manyama, Jul 28 2017

A091663 10-adic integer x=.....93380022607743740081787109375 satisfying x^3 = x.

Original entry on oeis.org

5, 7, 3, 9, 0, 1, 7, 8, 7, 1, 8, 0, 0, 4, 7, 3, 4, 7, 7, 0, 6, 2, 2, 0, 0, 8, 3, 3, 9, 8, 5, 9, 9, 0, 9, 8, 3, 0, 1, 9, 6, 7, 6, 7, 5, 6, 7, 5, 2, 4, 4, 9, 9, 9, 8, 8, 1, 6, 3, 1, 9, 1, 4, 0, 9, 4, 3, 3, 8, 7, 3, 9, 9, 0, 1, 0, 9, 4, 1, 6, 0, 7, 9, 1, 0, 3, 8, 1, 9, 8, 0, 8, 6, 2, 9, 9, 6, 4, 0, 6
Offset: 0

Views

Author

Edoardo Gueglio (egueglio(AT)yahoo.it), Jan 28 2004

Keywords

Comments

Let a,b be integers defined in A018247, A018248 satisfying a^2=a, b^2=b, obviously a^3=a, b^3=b; let c,d,e,f be integers defined in A091661, A063006, A091663, A091664 then c^3=c, d^3=d, e^3=e, f^3=f, c+d=1, a+e=1, b+f=1, b+c=a, d+f=e, a+f=c, a=f+1, b=e+1, cd=-1, af=-1, gh=-1 where -1=.....999999999.

Crossrefs

Programs

  • Mathematica
    To calculate c, d, e, f use Mathematica algorithms for a, b and equations: c=a-b, d=1-c, e=b-1, f=a-1.

Formula

For n > 0, a(n) = 9 - A018247(n) = A018248(n). - Seiichi Manyama, Jul 28 2017

A373387 Constant congruence speed of the tetration base n (in radix-10), or -1 if n is a multiple of 10.

Original entry on oeis.org

0, 0, 1, 1, 1, 2, 1, 2, 1, 1, -1, 1, 1, 1, 1, 4, 1, 1, 2, 1, -1, 1, 1, 1, 2, 3, 2, 1, 1, 1, -1, 1, 2, 1, 1, 2, 1, 1, 1, 1, -1, 1, 1, 2, 1, 2, 1, 1, 1, 2, -1, 2, 1, 1, 1, 3, 1, 3, 1, 1, -1, 1, 1, 1, 1, 6, 1, 1, 3, 1, -1, 1, 1, 1, 2, 2, 2, 1, 1, 1, -1, 1, 2, 1
Offset: 0

Views

Author

Marco Ripà, Jun 02 2024

Keywords

Comments

It has been proved that this sequence contains arbitrarily large entries, while a(0) = a(1) = 0 by definition (given the fact that 0^0 = 1 is a reasonable choice and then 0^^b is 1 if b is even, whereas 0^^b is 0 if b is even). For any nonnegative integer n which is not a multiple of 10, a(n) is given by Equation (16) of the paper "Number of stable digits of any integer tetration" (see Links).
Moreover, a sufficient condition for having a constant congruence speed of any tetration base n, greater than 1 and not a multiple of 10, is that b >= 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)
(u_5 and u_2 indicate the 5-adic and the 2-adic valuation of the argument, respectively).
Therefore b >= n + 1 is always a sufficient condition for the constancy of the congruence speed (as long as n > 1 and n <> 0 (mod 10)).
As a trivial application of this property, we note that the constant congruence speed of the tetration 3^^b is 1 for any b > 1, while 3^3 is not congruent to 3 modulo 10. Thus, we can easily calculate the exact number of the rightmost digits of Graham’s number, G(64) (see A133613), that are the same of the homologous rightmost digits of 3^3^3^... since 3^3 is not congruent to 3 modulo 10, while the congruence speed of n = 3 is constant from height 2 (see A372490). This means that the last slog_3(G(64))-1 digits of G(64) are the same slog_3(G(64))-1 final digits of 3^3^3^..., whereas the difference between the slog_3(G(64))-th digit of G(64) and the slog_3(G(64))-th digit of 3^3^3^... is congruent to 6 modulo 10.
The constant congruence speed of tetration satisfies the following multiplicative constraint: for each pair (n_1, n_2) of nonnegative integers whose product is not divisible by 10, a(n_1*n_2) is necessarily greater than or equal to the minimum between a(n_1) and a(n_2) (see Equation 2.4 and Appendix of "A Compact Notation for Peculiar Properties Characterizing Integer Tetration" in Links). - Marco Ripà, Apr 26 2025

Examples

			a(3) = 1 since 3^^b := 3^3^3^... freezes 1 more rightmost digit for each unit increment of b, starting from b = 2.
		

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
    def v2(n):
        count = 0
        while n % 2 == 0 and n > 0:
            n //= 2
            count += 1
        return count
    def v5(n):
        count = 0
        while n % 5 == 0 and n > 0:
            n //= 5
            count += 1
        return count
    def V(a):
        mod_20 = a % 20
        mod_10 = a % 10
        if mod_20 == 1:
            return min(v2(a - 1), v5(a - 1))
        elif mod_20 == 11:
            return min(v2(a + 1), v5(a - 1))
        elif mod_10 in {2, 8}:
            return v5(a ** 2 + 1)
        elif mod_20 in {3, 7}:
            return min(v2(a + 1), v5(a ** 2 + 1))
        elif mod_20 in {13, 17}:
            return min(v2(a - 1), v5(a ** 2 + 1))
        elif mod_10 == 4:
            return v5(a + 1)
        elif mod_20 == 5:
            return v2(a - 1)
        elif mod_20 == 15:
            return v2(a + 1)
        elif mod_10 == 6:
            return v5(a - 1)
        elif mod_20 == 9:
            return min(v2(a - 1), v5(a + 1))
        elif mod_20 == 19:
            return min(v2(a + 1), v5(a + 1))
    def generate_sequence():
        sequence = []
        for a in range(1026):
            if a == 0 or a == 1:
                sequence.append(0)
            elif a % 10 == 0:
                sequence.append(-1)
            else:
                sequence.append(V(a))
        return sequence
    sequence = generate_sequence()
    print("a(0), a(1), a(2), ..., a(1025) =", ", ".join(map(str, sequence)))

Formula

a(n) = -1 iff n == 0 (mod 10), a(n) = 0 iff n = 1 or 2. Otherwise, a(n) >= 1 and it is given by Equation (16) from Ripà and Onnis.

A091661 Coefficients in a 10-adic square root of 1.

Original entry on oeis.org

9, 4, 2, 1, 8, 7, 5, 2, 4, 6, 3, 8, 9, 1, 5, 2, 1, 5, 4, 8, 7, 4, 5, 9, 9, 3, 2, 3, 1, 2, 8, 0, 0, 8, 1, 2, 2, 9, 7, 1, 6, 4, 6, 4, 8, 6, 4, 8, 4, 1, 1, 1, 0, 0, 2, 2, 6, 7, 2, 7, 1, 6, 1, 9, 1, 0, 3, 3, 3, 4, 2, 1, 0, 8, 7, 9, 1, 0, 7, 7, 8, 5, 0, 6, 9, 3, 3, 6, 1, 2, 8, 3, 6, 4, 1, 0, 6, 0, 9, 7
Offset: 0

Views

Author

Edoardo Gueglio (egueglio(AT)yahoo.it), Jan 28 2004

Keywords

Comments

10-adic integer x=.....239954784512519836425781249 satisfying x^3 = x.
Let a,b be integers defined in A018247, A018248 satisfying a^2=a, b^2=b, obviously a^3=a, b^3=b; let c,d,e,f be integers defined in A091661, A063006, A091663, A091664 then c^3=c, d^3=d, e^3=e, f^3=f, c+d=1, a+e=1, b+f=1, b+c=a, d+f=e, a+f=c, a=f+1, b=e+1, cd=-1, af=-1, gh=-1 where -1=.....999999999.

Crossrefs

Another 10-adic root of 1 is given by A063006.

Programs

  • Mathematica
    To calculate c, d, e, f use Mathematica algorithms for a, b and equations: c=a-b, d=1-c, e=b-1, f=a-1.
  • Ruby
    def A(s, n)
      n.times{|i|
        m = 10 ** (i + 1)
        (0..9).each{|j|
          k = j * m + s
          if (k ** 2 - k) % (m * 10) == 0
            s = k
            break
          end
        }
      }
      s
    end
    def A091661(n)
      str = (10 ** (n + 1) + A(5, n) - A(6, n)).to_s.reverse
      (0..n).map{|i| str[i].to_i}
    end
    p A091661(100) # Seiichi Manyama, Jul 31 2017

Formula

For n>0, a(n) = 9 - A063006(n).

A224474 (2*16^(5^n) - 1) mod 10^n: a sequence of trimorphic numbers ending in 1.

Original entry on oeis.org

1, 51, 751, 8751, 18751, 218751, 4218751, 74218751, 574218751, 3574218751, 63574218751, 163574218751, 163574218751, 80163574218751, 480163574218751, 7480163574218751, 87480163574218751, 487480163574218751, 5487480163574218751, 15487480163574218751
Offset: 1

Views

Author

Eric M. Schmidt, Apr 07 2013

Keywords

Comments

a(n) is the unique positive integer less than 10^n such that a(n) + 1 is divisible by 2^n and a(n) - 1 is divisible by 5^n.

Crossrefs

Cf. A033819. Corresponding 10-adic number is A063006. The other trimorphic numbers ending in 1 are included in A199685 and A224476.

Programs

  • Sage
    def A224474(n) : return crt(-1, 1, 2^n, 5^n)

Formula

a(n) = (2 * A016090(n) - 1) mod 10^n.

A376842 Asymptotic phase shift of the tetration base n written by juxtaposing its representative congruence classes modulo 10 (i.e., the 1, 2, or 4, distinct sfasamenti taken by starting from the minimum height such that the congruence speed of n is constant), and a(n) = -1 if n is a multiple of 10.

Original entry on oeis.org

8, 46, 6248, 5, 4268, 2684, 6842, 2, -1, 4, 46, 6248, 8, 5, 64, 4, 28, 4862, -1, 6248, 6248, 2486, 8, 5, 46, 2684, 4862, 6842, -1, 8426, 8426, 28, 28, 5, 4, 2684, 28, 82, -1, 64, 4268, 46, 4268, 5, 4862, 4, 2, 6842, -1, 5, 6, 8, 6248, 5, 8426, 2684, 4268, 2
Offset: 2

Views

Author

Marco Ripà, Oct 06 2024

Keywords

Comments

By Definition 1.2 of “Number of stable digits of any integer tetration” (see Links), let bar_b be the smallest hyperexponent of the tetration m^^b such that the congruence speed of m is constant.
Then, assuming that n is not a multiple of 10, we define as asymptotic phase shift (original name "sfasamento asintotico” - see References, “La strana coda della serie n^n^...^n”, Chapter 7) the subsequence of the 4 (or 2 or even 1) congruence classes of the differences between the rightmost non-stable digits of n^^(bar_b) (i.e., the least significant digit of the tetration n^^(bar_b) that is not frozen as we move to n^^(b + 1)) and the corresponding digit of n^^(bar_b + 1), and ditto for (n^^(bar_b + 1) and n^^(bar_b + 2)), (n^^(bar_b + 2) and n^^(bar_b + 3)), (n^^(bar_b + 3) and n^^(bar_b + 4)).
Now, let us indicate this subsequence as [s_1, s_2, s_3, s_4] and then, if s_1 = s_3 and also s_2 = s_4, we transform [s_1, s_2, s_3, s_4] into [s_1, s_2], and lastly, if s_1 = s_2, we transform [s_1, s_2] into [s_1].
Finally, we get a(n) by juxtaposing all the 4 (or 2, or 1) digits inside [...] (e.g., if n = 3, then bar_b = 2 so that we get s_1 = 4 = s_3 and s_2 = 6 = s_4, and consequently a(3) = 46 instead of 4646 - see Definition 3.2 of "Graham's number stable digits: an exact solution" in Links).
Assuming that n is not a multiple of 10, in general, for any given pair of nonnegative integers c and k, the congruence class modulo 10 of the difference between the least significant digits of n^^(bar_b+c+4*k) and n^^(bar_b+c+1+4*k) does not depend on k. Moreover, if s_1 <> s_2, then s_1 + s_3 = s_2 + s_4 = 10.
In detail, if the last digit of n is 5, then a(n) = 5, while if n is coprime to 5, a(n) mandatorily belongs to the following set: {1, 2, 3, 4, 5, 6, 7, 8, 9, 19, 28, 37, 46, 64, 73, 82, 91, 1397, 1793, 2486, 2684, 3179, 3971, 4268, 4862, 6248, 6842, 7139, 7931, 8426, 8624, 9317, 9713}.
The author conjectures that if n is not a multiple of 10, then a(n) is necessarily an element of the subset {2, 4, 5, 6, 8, 9, 19, 28, 46, 64, 82, 2486, 2684, 3971, 4268, 4862, 6248, 6842, 7931, 8426, 8624}.
As a mere consequence of a(3) = 46 and the fact that congruence speed of 3 is 0 at height 1 and 1 at any height above 1, it follows that 4 is equal to the difference between the slog_3(G)-th least significant digit of Graham's number, G, and the slog_3(G)-th least significant digit of any power tower of the form 3^3^3^... whose height is above slog_3(G) (where slog(...) indicates the super-logarithm of the argument).
By definition, a(n) consists of a circular permutation of the digits of A376446(n).

Examples

			a(3) = 46 since the congruence speed of 3^^b becomes constant starting from height 2 and its value is 0 for b = 1 and 1 for any b >= 2, then (3^3 - 3^(3^3))/10 == 4 (mod 10) while (3^(3^3) - 3^(3^(3^3)))/10^2 == 6 (mod 10).
		

References

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

Crossrefs

A224476 (2*16^(5^n) + (10^n)/2 - 1) mod 10^n: a sequence of trimorphic numbers ending (for n > 1) in 1.

Original entry on oeis.org

6, 1, 251, 3751, 68751, 718751, 9218751, 24218751, 74218751, 8574218751, 13574218751, 663574218751, 5163574218751, 30163574218751, 980163574218751, 2480163574218751, 37480163574218751, 987480163574218751, 487480163574218751, 65487480163574218751
Offset: 1

Views

Author

Eric M. Schmidt, Apr 07 2013

Keywords

Comments

a(n) is the unique positive integer less than 10^n such that a(n) + 2^(n-1) + 1 is divisible by 2^n and a(n) - 1 is divisible by 5^n.

Crossrefs

Cf. A033819. Converges to the 10-adic number A063006. The other trimorphic numbers ending in 1 are included in A199685 and A224474.

Programs

  • Sage
    def A224476(n) : return crt(2^(n-1)-1, 1, 2^n, 5^n)

Formula

a(n) = (A224474(n) + 10^n/2) mod 10^n.

A376446 Modular phase shift of the tetration base n written by juxtaposing its representative congruence classes modulo 10 taken by starting from height 2 + v(n), and a(n) = -1 if n is a multiple of 10.

Original entry on oeis.org

8, 64, 2486, 5, 4268, 8426, 8426, 2, -1, 4, 64, 4862, 8, 5, 46, 4, 82, 6248, -1, 4862, 6248, 4862, 8, 5, 64, 6842, 8624, 4268, -1, 4268, 2684, 28, 82, 5, 4, 8426, 28, 82, -1, 46, 4268, 46, 2684, 5, 4862, 4, 2, 2684, -1, 5, 6, 8, 2486, 5, 4268, 2684, 4268, 2
Offset: 2

Views

Author

Marco Ripà, Sep 23 2024

Keywords

Comments

Let b := 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).
Assuming that n is not a multiple of 10, we define as modular phase shift (original name "sfasamento modulare" - see References, “La strana coda della serie n^n^...^n”, Chapter 7) the subsequence of the 4 (or 2 or even 1) congruence classes of the differences between the rightmost non-stable digits of n^^b (i.e., the least significant digit of the tetration n^^b that is not frozen as we move to n^^(b + 1)) and the corresponding digit of n^^(b + 1), and ditto for (n^^(b + 1) and n^^(b + 2)), (n^^(b + 2) and n^^(b + 3)), (n^^(b + 3) and n^^(b + 4)).
Now, let us indicate this subsequence as [s_1, s_2, s_3, s_4] and then, if s_1 = s_3 and also s_2 = s_4, we transform [s_1, s_2, s_3, s_4] into [s_1, s_2], and lastly, if s_1 = s_2, we transform [s_1, s_2] into [s_1].
Finally, we get a(n) by juxtaposing all the 4 (or 2, or 1) digits inside [...] (e.g., if n = 3, then b = 2 + 1 so that we get s_1 = 6 = s_3 and s_2 = 4 = s_4, and consequently a(3) = 64 instead of 6464).
Assuming that n is not a multiple of 10, in general, for any given pair of nonnegative integers c and k, the congruence class modulo 10 of the difference between the least significant digits of n^^(b+c+4*k) and n^^(b+c+1+4*k) does not depend on k. Moreover, if s_1 <> s_2, then s_1 + s_3 = s_2 + s_4 = 10.
In detail, if the last digit of n is 5, then a(n) = 5, while if n is coprime to 5, a(n) mandatorily belongs to the following set: {1, 2, 3, 4, 5, 6, 7, 8, 9, 19, 28, 37, 46, 64, 73, 82, 91, 1397, 1793, 2486, 2684, 3179, 3971, 4268, 4862, 6248, 6842, 7139, 7931, 8426, 8624, 9317, 9713}.
The author conjectures that if n is not a multiple of 10, then a(n) is necessarily an element of the subset {2, 4, 5, 6, 8, 9, 19, 28, 46, 64, 82, 91, 1397, 1793, 2486, 2684, 3179, 3971, 4268, 4862, 6248, 6842, 7139, 7931, 8426, 8624, 9317, 9713}.
As a mere consequence of a(3) = 64 and the fact that congruence speed of 3 is 0 at height 1 and 1 at any height above 1, it follows that 4 is equal to the difference between the slog_3(G)-th least significant digit of Graham's number, G, and the slog_3(G)-th least significant digit of any power tower of the form 3^3^3^... whose height is above slog_3(G) (where slog(...) indicates the super-logarithm of the argument).

Examples

			a(3) = 64 since the congruence speed of 3 at height 3^^(2 + u_5(3^2 + 1)) is constant and its value is 1, so (3^(3^3) - 3^(3^(3^3)))/10^2 == 6 (mod 10) while (3^(3^(3^3)) - 3^(3^(3^(3^3))))/10^3 == 4 (mod 10).
		

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=500):
        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(500)  # Pad with zeros if needed
            string_n_plus_1 = str(tetrations[n+1]).zfill(500)
            # Find the first difference starting from the rightmost digit
            for i in range(499, -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:
        a = int(input("Enter a positive integer greater than 1: "))
        # Check if the number ends with 0
        if a % 10 == 0:
            print(-1)
        elif a <= 1:
            raise ValueError("The number must be greater than 1.")
        else:
            # 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, 30, last_digits=500)
            # 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]]
            # Convert the list of differences into a string without brackets or commas
            result_str = ''.join(map(str, mod_10_differences))
            # Print the optimized result
            print(f"a({a}) = {result_str}")
    except Exception as e:
        print(f"ERROR!\n{e}")
Showing 1-10 of 15 results. Next