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 20 results. Next

A379906 Smallest integer greater than 1 and not ending in 0 whose congruence speed is not constant at height n (see A373387).

Original entry on oeis.org

2, 2, 5, 307, 807, 72943, 795807, 1295807, 16295807, 166295807, 16666295807, 31666295807, 81666295807, 8581666295807, 26581907922943, 503581666295807, 2003581666295807, 90476581907922943, 140476581907922943, 6847003581666295807, 61847003581666295807, 911847003581666295807
Offset: 1

Views

Author

Marco Ripà, Jan 05 2025

Keywords

Comments

The present sequence is a subsequence of A068407.
Although the congruence speed of any integer m > 1 not divisible by 10 is certainly stable at height m + 1 (for a tighter upper bound see "Number of stable digits of any integer tetration" in Links), this sequence contains infinitely many terms, implying the existence of infinitely many tetration bases whose congruence speed does not stabilize in less than b + 1 iterations, for any chosen positive integer b.
As a nontrivial example, the congruence speed of m := 45115161423787862411847003581666295807 becomes stable at height 41, which exactly matches the mentioned tight bound, for the numbers ending in 2, 3, 7, or 8, of v_5(45115161423787862411847003581666295807^2 + 1) + 2, where v_5(...) indicates the 5-adic valuation of the argument.

Examples

			a(5) = 807 since the congruence speed of 807 is 0 at height 1, 4 at heights 2, 3, 4, and 5, finally matching the value of the constant congruence speed of 807 at height 6 (and it is the smallest integer whose congruence speed stabilizes at height 6 or above).
		

References

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

Crossrefs

Formula

As long as ceiling(log_10(a(n))) < n, for any n > 3, the least significant floor(log_10(a(n))) digits of a(n) (from right to left) are given by the first floor(log_10(a(n))) entries of A290372(n), or A290373(n), or A290374(n), or A290375(n) (i.e., all but the first digit of each a(n) are described by ({5^2^k}_oo + {2^5^k}_oo) := ...17196359523418092077057, ({5^2^k}_oo - {2^5^k}_oo) := ...37588152996418333704193, (- {5^2^k}_oo + {2^5^k}_oo) := ...2411847003581666295807, and (- {5^2^k}_oo - {2^5^k}_oo) := ...2803640476581907922943).

A381460 Smallest n-th perfect power greater than 1 satisfying A373387(a(n)) = n.

Original entry on oeis.org

2, 49, 15625, 625, 7737809375, 735091890625, 1253790880222890625, 6634204312890625, 47312447868976594992787109375, 72624607478879073313928212890625, 471781339858152691906169456697218212890625, 1344888824246298437178134918212890625
Offset: 1

Views

Author

Marco Ripà, Feb 24 2025

Keywords

Comments

This sequence has infinitely many terms since a (trivial) upper bound for a(n) is given by (10^(n - v_{10}(n)) + 1)^n, where v_{10} corresponds to the number of trailing 0's of n (if any), and each of these terms is mandatorily a perfect power of degree n or a multiple of n (e.g., a(3) = 25^3 = 5^6).
All the a(n) are generated by the 13 nontrivial 10-adic solutions of the fundamental equation y^5 = y: ...480163574218751 (see A063006), ...263499879186432 (see A120817), ...996418333704193 (see A290375), ...476581907922943 (see A290373), ...259918212890624 (see A091664), ...259918212890625 (see A018247), ...740081787109375 (see A091663), ...740081787109376 (see A018248), ...003581666295807 (see A290372), ...523418092077057 (see A290374), ...736500120813568 (see A120818), ...519836425781249 (see A091661), and ...999999999999999.
The bases of a(11), a(12), ..., a(50) have been provided by Max Alekseyev on February 14, 2025 (see "Closed form for the general term of 2, 49, 15625, 625, ..." in Links).
It is conjectured that if n > 2 is given, then a(n) is generated by {5^2^k}_oo or -{5^2^k}_oo (this probabilistic argument is based on the study of a(n) up to n = 50 since a(50) is a 762 digit number generated by {5^2^k}_oo = ...6259918212890625).

Examples

			a(3) = 15625 since 15625 = 25^3 and 15625 is the smallest perfect cube whose constant congruence speed equals 3.
		

Crossrefs

A381949 a(n) is the smallest integer k greater than 1 and not a perfect power satisfying A373387(k^n) = n.

Original entry on oeis.org

2, 7, 55, 5, 95, 95, 385, 95, 1535, 1535, 6145, 1025, 24575, 24575, 98305, 4095, 393215, 393215, 1572865, 262145, 6291455, 6291455, 25165825, 6291455, 100663295, 100663295, 402653185, 67108865, 1610612735, 1610612735, 6442450945, 402653185, 25769803775, 25769803775
Offset: 1

Views

Author

Marco Ripà, Mar 10 2025

Keywords

Comments

The terms from a(11) to a(50) of this sequence have been provided by Max Alekseyev on February 14, 2025 (see "Closed form for the general term of 2, 49, 15625, 625, ..." in Links).
For n = 1, 2, ..., 50, A381460(n) equals a(n)^n with the sole exception of n = 3 (i.e., A381460(3) = (5*5)^3 <> 55^3 = a(3)^3, and this is the only known value of n such that A381460(n) <> a(n)^n).
It is conjectured that a(n) is a multiple of 5 for any n > 2 (probabilistic argument).

Examples

			a(3) = 55 since 5*11 is not a perfect power and A373387(55^3) = 3.
		

Crossrefs

A386008 a(n) = A386005(n) - n*A373387(n).

Original entry on oeis.org

-2, -1, -1, 2, 1, -2, -1, 0, 9, 1, -1, 0, -1, 1, 1, 0, -4, 0, 19, 1, -2, -1, -2, 3, 2, -1, -1, 0, 29, 1, -2, 0, -1, 1, 1, 0, -2, 0, 39, 1, -2, -2, -1, 2, 1, -1, -1, 0, 49, 1, -1, 0, -1, 1, 1, 0, -2, 0, 59, 1, -2, -1, -1, 6, 1, -1, -3, 0, 69, 1, -1, 0, -2, 1, 2
Offset: 2

Views

Author

Marco Ripà, Jul 14 2025

Keywords

Comments

Assuming that n is not a multiple of 10, this sequence measures the difference between the number of stable digits in n^^n and the product of n times the constant congruence speed of n (see A373387 and A317905).
A negative value of a(n) means that, on average, each iteration n^^b --> n^^(b+1), with b < A372490(n), contributes fewer stable digits than what will be contributed per step once the congruence speed of n reaches its constant value.
Positive values also imply the existence of a pre-period for the given n, and indicate that its average contribution per step exceeds the constant congruence speed of n.
If n == 5 (mod 10) and n <> 5, the pre-period of the congruence speed always has length 2 (i.e., A372490(n) = 3). However, the number of stable digits observed up to that point follows two distinct rules: if n = 20*k + 5 (for positive integer k), then a(n) = (n + 1)*A373387(n); if n = 20*(k - 1) + 15, then it is n*A373387(n) + 1. The resulting residue is A373387(n) in the former case, and 1 in the latter. For n = 5, the pre-period has length 3 (and this is the only such case for n ending in 5).

Examples

			a(3) = -1 since 3^3^3 == 3^3^3^3 (mod 10^2) while 3^3^3 <> 3^3^3^3 (mod 10^3), and the constant congruence speed of 3 is equal to 1. Thus, a(3) = 2 - 3*1.
		

References

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

Crossrefs

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

A133613 Decimal digits such that for all k >= 1, the number A(k) := Sum_{n = 0..k-1} a(n)*10^n satisfies the congruence 3^A(k) == A(k) (mod 10^k).

Original entry on oeis.org

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

Views

Author

Daniel Geisler (daniel(AT)danielgeisler.com), Dec 18 2007

Keywords

Comments

10-adic expansion of the iterated exponential 3^^n for sufficiently large n (where c^^n denotes a tower of c's of height n). E.g., for n>9, 3^^n == 4195387 (mod 10^7).
This sequence also gives many final digits of Graham's number ...399618993967905496638003222348723967018485186439059104575627262464195387. - Paul Muljadi, Sep 08 2008 and J. Luis A. Yebra, Dec 22 2008
Graham's number can be represented as G(64):=3^^3^^...^^3 [see M. Gardner and Wikipedia], in which case its G(63) lowermost digits are guaranteed to match this sequence (i.e., the convergence speed of the base 3 is unitary - see A317905). To avoid such confusion, it would be best to interpret this sequence as a real-valued constant 0.783591464..., corresponding to 3^^k in the limit of k->infinity, and call it Graham's constant G(3). Generalizations to G(n) and G(n,base) are obvious. - Stanislav Sykora, Nov 07 2015
Let G(64) be Graham's number. Let b and c be two (strictly) positive integers so that the super-logarithm base b of c (i.e., slog_b(c)) is well defined. Then, this sequence gives the slog_3(G(64))-1 final digits of G(64) since the congruence speed of 3 is equal to 0 at height 1 while it is 1 for all the integer hyperexponents above 0 (i.e., 3 is characterized by a constant congruence speed of 1, as proved by Lemma 1 of "On the congruence speed of tetration" and also confirmed by Equation (16) of "Number of stable digits of any integer tetration" - see Links). On the other hand, the difference between the slog_3(G(64))-th rightmost digit of G(64) and a(slog_3(G(64))) is congruent to 6 modulo 10 (since the asymptotic phase shift of 3 is [4,6] - see A376842). - Marco Ripà, Oct 17 2024

Examples

			783591464262726575401950934681584810769327843222300836694509769399816993697535...
Consider the sequence 3^^n: 1, 3, 27, 7625597484987, ... From 3^^3 = 7625597484987 onwards, all terms end with the digits 87. This follows from Euler's generalization of Fermat's little theorem.
		

References

  • M. Gardner, Mathematical Games, Scientific American 237, 18 - 28 (1977).
  • M. Ripà, La strana coda della serie n^n^...^n, Trento, UNI Service, Nov 2011, p. 11-12, 69-78. ISBN 978-88-6178-789-6.
  • Ilan Vardi, "Computational Recreations in Mathematica," Addison-Wesley Publishing Co., Redwood City, CA, 1991, pages 226-229.

Crossrefs

Programs

  • Mathematica
    (* Import Mmca coding for "SuperPowerMod" and "LogStar" from text file in A133612 and then *) $RecursionLimit = 2^14; f[n_] := SuperPowerMod[3, n + 1, 10^n]; Reverse@ IntegerDigits@ f@ 105 (* Robert G. Wilson v, Mar 06 2014 *)

Formula

a(n) = floor( A183613(n+1) / 10^n ).

Extensions

More terms from J. Luis A. Yebra, Dec 12 2008
Edited by N. J. A. Sloane, Dec 22 2008
More terms from Robert G. Wilson v, May 07 2010

A349425 n-th stable digit (in decimal system) of n^(n^(...^n)).

Original entry on oeis.org

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

Views

Author

Marco Ripà, Nov 17 2021

Keywords

Comments

The integer tetration (or hyper-4) n^^b is characterized by a well-known property involving its rightmost digits (as b grows an increasing number of the rightmost digits of n^^b are frozen - following the general rule described by Equation (16) of the linked paper "Number of stable digits of any integer tetration", p. 454).
In 2011 Ripà conjectured that, for any n >= 1, if b >= n + 2, then the n rightmost digits of n^^b are stable.
The above-mentioned paper, published in 2022, proved that this conjecture is true and also stated the stronger sufficient condition that the height of the hyperexponent is greater than or equal to tilde(v(a)) + 2, where tilde(v(a)) := v_5(a - 1) iff a == 1 (mod 5), v_5(a^2 + 1) iff a == {2, 3} (mod 5), v_5(a + 1) iff a == 4 (mod 5), v_2(a^2 - 1) - 1 iff a == 5 (mod 10), where v_2(x) = A007814(x) and v_5(x) = A112765(x) are the 2-adic and 5-adic valuations of x, respectively. - Marco Ripà, Jul 24 2024

Examples

			For n = 3, a(3) = 3 since 3^^5 == 387(mod 10^3). Thus, (387(mod 10^3) - 387(mod 10^2))/10^2 = 3.
		

References

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

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; local m, v, w; m, w:= 10^n, n;
          do v:= n&^w mod m; if w=v then return v else w:=v fi od
        end:
    a:= n-> `if`(irem(n, 10)=0, 0, iquo(b(n), 10^(n-1))):
    seq(a(n), n=1..100);  # Alois P. Heinz, Nov 17 2021
  • Python
    def A349425(n):
        if n % 10 == 0: return 0
        m, n1, n2 = n, 10**n, 10**(n-1)
        while (k := pow(n,m,n1)) != m: m = k
        return k//n2 # Chai Wah Wu, Dec 19 2021

Formula

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

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

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}")

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.
Showing 1-10 of 20 results. Next