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

A338128 a(n) is the least k > 1 such that the base n representation of k^k ends with that of k.

Original entry on oeis.org

3, 4, 3, 6, 3, 4, 3, 4, 5, 12, 3, 5, 4, 5, 5, 9, 4, 7, 5, 4, 11, 12, 3, 6, 5, 10, 4, 17, 5, 16, 9, 11, 9, 13, 4, 10, 7, 5, 5, 9, 4, 7, 11, 9, 12, 24, 5, 8, 6, 9, 5, 54, 10, 11, 7, 7, 17, 60, 5, 13, 16, 4, 9, 5, 11, 37, 9, 12, 13, 36, 7, 37, 10, 6, 7, 16, 5, 27
Offset: 2

Views

Author

Rémy Sigrist, Oct 11 2020

Keywords

Examples

			a(10) = A082576(2) = 5.
		

Crossrefs

Programs

  • PARI
    a(n) = for (k=2, oo, if (Mod(k, n^#digits(k,n))^k==k, return (k)))

Formula

a(n) <= n+1 with equality iff n belongs to A065296.

A371048 Numbers formed by the rightmost decimal digits of n that are the same as those n^n, where -1 indicates that n <> n^n (mod 10).

Original entry on oeis.org

0, 1, -1, -1, -1, 5, 6, -1, -1, 9, 0, 11, -1, 3, -1, 5, 16, 7, -1, 9, 0, 21, -1, -1, -1, 25, 6, -1, -1, 9, 0, 31, -1, 3, -1, 5, 36, 7, -1, 9, 0, 41, -1, -1, -1, 5, 6, -1, -1, 49, 0, 51, -1, 3, -1, 5, 56, 57, -1, 9, 0, 61, -1, -1, 5, 6, -1, -1, 9, 0, 71, -1, 3
Offset: 0

Views

Author

Marco Ripà, Mar 10 2024

Keywords

Comments

The common digits might include leading 0's (such as at n = 51 or n = 57) and they are discarded (in particular, a(0) = 0 indicates that the corresponding zero digit term results in a 0 integer entry).
Assuming that c > 0 is an integer not a multiple of 10, then a(c*10^k) = 0 for every positive integer k, since (c*10^k) and (c*10^k)^(c*10^k) have in common only their rightmost k digits.
a(n) is equal to -1 if and only if n == 2,4,8 (mod 10) or n == 3,7 (mod 20).
A082576 is a subsequence of the present one.

Examples

			For n = 51, 51^51 = 1219211305094648479473193481872927834667576992593770717189298225284399541977208231315051 and 51^51 == 5051 (mod 10^4), so there might be three common final digits by including a leading 0 that should instead be disregarded. Consequently, a(51) = 51.
		

Crossrefs

Formula

If n <> 2,4,8 (mod 10) or n <> 3,7 (mod 20), then a(n) = n (mod 10^k), where k is such that n == n^n (mod 10^k) and n <> n^n (mod 10^(k+1)), whereas a(n) = -1 otherwise.

A371074 Number of the rightmost decimal digits of n that are the same as those of n^n.

Original entry on oeis.org

0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 2, 0, 1, 0, 1, 2, 1, 0, 1, 1, 2, 0, 0, 0, 2, 1, 0, 0, 1, 1, 2, 0, 1, 0, 1, 2, 1, 0, 1, 1, 2, 0, 0, 0, 1, 1, 0, 0, 2, 1, 3, 0, 1, 0, 1, 2, 3, 0, 1, 1, 2, 0, 0, 0, 1, 1, 0, 0, 1, 1, 2, 0, 1, 0, 2, 2, 1, 0, 1, 1, 2, 0, 0, 0, 1, 1
Offset: 0

Views

Author

Marco Ripà, Mar 10 2024

Keywords

Comments

The common digits might include leading 0's (such as at n = 51 or n = 57) and they are included in the total.
Let c be a positive integer and assume that k is a positive integer that is not a multiple of 10. If n = k*10^c, then a(n) = c which is all the rightmost 0's of n.
For every n >= 0, a(n) is the congruence speed of n at height 1 by Definitions 1.1 and 1.3 of the paper entitled "Number of stable digits of any integer tetration" (see Links).

Examples

			a(0) = 0 since 0^0 = 1 so that 0 and 0^0 have no digits in common.
For n = 51, a(n) = 3 since 51^51 == 5051 (mod 10^4).
		

Crossrefs

Formula

For any n >= 2, a(n) is such that n == n^n (mod 10^(a(n))) and n <> n^n (mod 10^(a(n)+1)).

A373206 Numbers m such that m^m == m (mod 10^(len(m) + 2)), where len(m) is the number of digits of m (A055642).

Original entry on oeis.org

1, 751, 1001, 2001, 2751, 3001, 4001, 5001, 5376, 6001, 6751, 7001, 8001, 9001, 10001, 18751, 20001, 30001, 40001, 50001, 58751, 60001, 69376, 70001, 80001, 90001, 98751, 100001, 110001, 120001, 130001, 138751, 140001, 150001, 160001, 170001, 180001, 190001
Offset: 1

Views

Author

Marco Ripà, May 28 2024

Keywords

Comments

By definition, this sequence is a subsequence of A082576 and also a subsequence of A373205.
For each integer r >= 3 the sequence contains 10^r + 1.
All terms > 9001 end in 0001 (e.g., 10001), 0625 (e.g., 390625), 1249 (e.g., 781249), 8751 (e.g., 18751), 9376 (e.g., 69376), and possibly in 4193, 7057, or 9375.

Examples

			751 is a term since 751 is a 3-digit number and 751^751 == 500751 (mod 10^6) and thus 751^751 == 751 (mod 10^(3 + 2)).
		

Crossrefs

Programs

  • Mathematica
    Select[Range[200000],PowerMod[#,#,10^(IntegerLength[#]+2)]==#&] (* Harvey P. Dale, Dec 05 2024 *)
  • PARI
    for (len_m = 1, 5, for (m = 10^(len_m - 1), 10^len_m - 1, if (m == Mod(m, 10^(len_m + 1))^m, print1(m, ", "))));
    
  • Python
    from itertools import count
    def A373206_gen(): # generator of terms
        yield from (1, 751, 1001, 2001, 2751, 3001, 4001, 5001, 5376, 6001, 6751, 7001, 8001, 9001)
        for i in count(10000,10000):
            for j in (1,625,1249,4193,7057,8751,9375,9376):
                m = i+j
                if pow(m,m,100*10**(len(str(m)))) == m:
                    yield m
    A373206_list = list(islice(A373206_gen(),20)) # Chai Wah Wu, Jun 02 2024

Formula

For all terms m, m^m == m (mod 10^(floor(log_10(m)) + 3)).

A338129 Positive numbers k such that the binary representation of k^k ends with that of k.

Original entry on oeis.org

1, 3, 5, 7, 9, 13, 15, 17, 25, 31, 33, 41, 49, 57, 63, 65, 81, 97, 113, 127, 129, 145, 161, 177, 193, 209, 225, 241, 255, 257, 289, 321, 353, 385, 417, 449, 481, 511, 513, 545, 577, 609, 641, 673, 705, 737, 769, 801, 833, 865, 897, 929, 961, 993, 1023, 1025
Offset: 1

Views

Author

Rémy Sigrist, Oct 11 2020

Keywords

Comments

This sequence is infinite as it contains the positive terms of A000225.
All terms are odd.
Run lengths in first differences appear to be regular and suggest a simple procedure to generate the sequence.

Examples

			The binary representation of 3^3 ("11011") ends with that of 3 ("11"), so 3 is a term.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[1200],Take[IntegerDigits[#^#,2],-IntegerLength[ #,2]] == IntegerDigits[ #,2]&] (* Harvey P. Dale, Jan 12 2022 *)
  • PARI
    is(n, base=2) = Mod(n, base^#digits(n, base))^n==n

A338130 Positive numbers k such that the ternary representation of k^k ends with that of k.

Original entry on oeis.org

1, 4, 7, 10, 19, 28, 37, 46, 55, 64, 73, 82, 109, 136, 163, 190, 217, 244, 271, 298, 325, 352, 379, 406, 433, 460, 487, 514, 541, 568, 595, 622, 649, 676, 703, 730, 811, 892, 973, 1054, 1135, 1216, 1297, 1378, 1459, 1540, 1621, 1702, 1783, 1864, 1945, 2026
Offset: 1

Views

Author

Rémy Sigrist, Oct 11 2020

Keywords

Comments

All terms are of the form 3*m + 1 for some m >= 0.
The first differences appear to contain only powers of 3 and to be weakly increasing.
Run lengths in first differences appear to be regular and suggest a simple procedure to generate the sequence.

Examples

			The ternary representation of 4^4 ("100111") ends with that of 4 ("11"), so 4 is a term.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[2100],Take[IntegerDigits[#^#,3],-IntegerLength[#,3]] == IntegerDigits[ #,3]&] (* Harvey P. Dale, Feb 13 2022 *)
  • PARI
    is(n, base=3) = Mod(n, base^#digits(n, base))^n==n

A373205 Numbers m such that m^m == m (mod 10^(len(m) + 1)), where len(m) is the number of digits of m (A055642).

Original entry on oeis.org

1, 51, 57, 101, 151, 176, 201, 301, 351, 401, 501, 551, 576, 601, 625, 701, 751, 801, 901, 951, 976, 1001, 1376, 2001, 2057, 2751, 3001, 4001, 4193, 4751, 5001, 5376, 6001, 6249, 6751, 7001, 8001, 8751, 9001, 9375, 9376, 10001, 10751, 11001, 12001, 13001
Offset: 1

Views

Author

Marco Ripà, May 27 2024

Keywords

Comments

By definition, the present sequence is a subsequence of A082576.
For each integer r >= 2 this sequence contains 10^r + 1.
All terms > 1 end in 01, 25, 49, 51, 57, 75, 76, or 93.

Examples

			51 is a term since 51 is a 2-digit number and 51^51 == 5051 (mod 10^4) and thus 51^51 == 51 (mod 10^(2 + 1)).
		

Crossrefs

Programs

  • PARI
    for (len_m = 1, 5, for (m = 10^(len_m - 1), 10^len_m - 1, if (m == Mod(m, 10^(len_m + 1))^m, print1(m, ", "))))
    
  • Python
    from itertools import count
    def A373205_gen(): # generator of terms
        for i in count(0,100):
            for j in (1, 25, 49, 51, 57, 75, 76, 93):
                m = i+j
                if pow(m,m,10*10**(len(str(m)))) == m:
                    yield m
    A373205_list = list(islice(A373205_gen(),20)) # Chai Wah Wu, Jun 02 2024

A358348 Numbers k such that k == k^k (mod 9).

Original entry on oeis.org

1, 4, 7, 9, 10, 13, 16, 17, 18, 19, 22, 25, 27, 28, 31, 34, 35, 36, 37, 40, 43, 45, 46, 49, 52, 53, 54, 55, 58, 61, 63, 64, 67, 70, 71, 72, 73, 76, 79, 81, 82, 85, 88, 89, 90, 91, 94, 97, 99, 100, 103, 106, 107, 108, 109, 112, 115, 117, 118, 121, 124, 125, 126
Offset: 1

Views

Author

Ivan Stoykov, Nov 11 2022

Keywords

Comments

Each multiple of 9 is in the sequence. Additionally, the squares are also present.

Examples

			4 is a term since 4^4 = 256 == 4 (mod 9).
		

References

  • M. Fujiwara and Y. Ogawa, Introduction to Truly Beautiful Mathematics. Tokyo: Chikuma Shobo, 2005.

Crossrefs

Programs

  • Maple
    A358348 := proc(n)
        2*(n+1)-op(modp(n,9)+1,[2,3,2,1,1,2,1,0,1]) ;
    end proc:
    seq(A358348(n),n=1..50) ; # R. J. Mathar, Mar 29 2023
  • Mathematica
    Select[Range[130], MemberQ[{0, 1, 4, 7, 9, 10, 13, 16, 17}, Mod[#, 18]] &] (* Amiram Eldar, Nov 12 2022 *)
  • PARI
    isok(k) = k == Mod(k,9)^k; \\ Michel Marcus, Nov 22 2022
    
  • Python
    def A358348(n):
        return ((0, 1, 4, 7, 9, 10, 13, 16, 17)[m := n % 9]
             + (n - m << 1))  # Chai Wah Wu, Feb 09 2023

Formula

G.f.: x*(x+1)*(x^7+3*x^5+x^3+x^2+2*x+1)/((1-x)^2*(1+x^3+x^6)*(1+x+x^2)). - Alois P. Heinz, Feb 08 2023
a(n) = 2*(n+1) - b(n) where b(n>=0) = 2,3,2,1,1,2,1,0,1,2,3,2,... has period 9. - Kevin Ryde, Mar 26 2023

A373386 Smallest integer m > 1 such that m == m^m (mod 10^(len(m) + n)), where len(m) is the number of digits of m.

Original entry on oeis.org

5, 51, 751, 10001, 100001, 1000001, 10000001, 100000001, 1000000001
Offset: 0

Views

Author

Marco Ripà, Jun 02 2024

Keywords

Comments

By definition, this sequence is a subsequence of A082576.
It is not known if a(n) = 10^(n + 1) + 1 holds for all n >= 3.

Examples

			a(2) = 751 since m = 751 is the smallest integer satisfying m == m^m (mod 10^(len(m) + 2)), given the fact that 751 is a 3-digit number and 751^751 == 500751 (mod 10^6) and thus 751^751 == 751 (mod 10^(3 + 2)).
		

Crossrefs

Programs

  • PARI
    a(n) = my(im); for (len_m = 1, oo, if (len_m==1, im=2, im=10^(len_m - 1)); for (m = im, 10^len_m - 1, if (m == Mod(m, 10^(len_m + n))^m, return(m)))); \\ Michel Marcus, Jun 03 2024

Extensions

a(7)-a(8) from Michel Marcus, Jun 03 2024
Showing 1-9 of 9 results.