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

A121521 Least positive k such that (10^n+1)^n + k is prime.

Original entry on oeis.org

1, 2, 10, 2, 16, 12, 220, 60, 112, 222, 112, 30, 618, 348, 156, 248, 10, 290, 256, 2346, 118, 570, 738, 348, 1356, 4352, 1402, 470, 736, 300, 10428, 4962, 4882, 1382, 580, 948, 5112, 776, 358, 7158, 1458, 21056, 318, 4376, 2472, 2738, 9178, 2538, 10518, 4908, 11316
Offset: 0

Views

Author

Jason Earls, Aug 05 2006

Keywords

Comments

The 100th term is 16456; ((10^100+1)^100)+16456 is a probable prime with 10001 digits.

Crossrefs

Cf. A121520.

Programs

  • Mathematica
    lpk[n_]:=Module[{c=(10^n+1)^n},NextPrime[c]-c]; Array[lpk,40,0] (* Harvey P. Dale, Sep 04 2017 *)
  • PARI
    a(n) = nextprime(1+m=(10^n+1)^n) - m; \\ Jinyuan Wang, Jun 07 2020

Extensions

a(39)-a(46) from Jinyuan Wang, Jun 07 2020
a(47) and beyond from Michael S. Branicky, May 22 2023

A379243 a(n) = (10^(n + 1) + 10^(n - min{v_2(n), v_5(n)}) + 1)^n, where v_p(n) indicates the p-adic valuation of n.

Original entry on oeis.org

111, 1212201, 1331363033001, 146415324072600440001, 1610517320513310012100005500001, 1771561966306219615026620001815000066000001, 194871722400927338207105124350046585000254100000770000001, 2143588825589736849603708090188560102487000074536000033880000008800000001
Offset: 1

Views

Author

Marco Ripà, Dec 18 2024

Keywords

Comments

For any n, a(n) == 1 (mod 10^n), while it is not congruent to 1 modulo 10^(n + 1).
If n is not a multiple of 10, 10^(n + 1) + 10^(n - min{v_2(n), v_5(n)}) + 1 has a total of n + 2 digits and they are n - 1 0s and 3 1s. Conversely, if there is a pair of positive integers (m, k) not ending with 0 and such that n := m*10^k, then 10^(n + 1) + 10^(n - min{v_2(n), v_5(n)}) + 1 has n - k + 2 digits (three 1s and the rest are all 0s) and a(n) = (10^(n + 1) + 10^(n - k) + 1)^n.
Since a(n) == 1 (mod 5) for any n, the constant congruence speed of a(n) (i.e., V(a(n))) is guaranteed to be constant starting from height v_5(a(n) - 1) + 2 (for this sufficient condition, see “Number of stable digits of any integer tetration” in Links).
Then, for any positive integer n, a(n) is (exactly) a n-th perfect power (since, for any given n, 10^(n + 1) + 10^(n - min{v_2(n), v_5(n)}) + 1 is divisible by 3 only once) and is also characterized by a constant congruence speed of n (for a strict proof of the general formula V((10^(t + k) + 10^(t - min{v_2(n), v_5(n)}) + 1)^n) = t, holding for any chosen positive integer k as long as t is an integer above min{v_2(n), v_5(n)} + 1, see Section 3 of “On the relation between perfect powers and tetration frozen digits” in Links).

Examples

			a(3) = (10^4 + 10^3 + 1)^3 = 11001^3  = 1331363033001 is a perfect cube whose constant congruence speed is 3.
		

Crossrefs

Programs

  • Mathematica
    pAdicValuation[n_, p_] := Module[{v = 0, k = n}, While[Mod[k, p] == 0 && k > 0,k = k/p;v++;];v];
    a[n_] := Module[{v2, v5, minVal}, v2 = pAdicValuation[n, 2]; v5 = pAdicValuation[n, 5];
    minVal = Min[v2, v5];(10^(n + 1) + 10^(n - minVal) + 1)^n]; sequence = Table[a[n], {n, 1, 20}]; sequence

Formula

If n <> 0 (mod 10), then a(n) = (11...[n - 1 trailing 0s]...1)^n.

A381015 a(n) = n + (number of trailing 0's of n).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31, 31, 32, 33, 34, 35, 36, 37, 38, 39, 41, 41, 42, 43, 44, 45, 46, 47, 48, 49, 51, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 61, 62, 63, 64, 65, 66, 67, 68, 69, 71, 71, 72, 73, 74, 75, 76, 77
Offset: 1

Views

Author

Marco Ripà, Feb 11 2025

Keywords

Comments

Constant congruence speed of (10^n + 1)^n, i.e., a(n) = A373387((10^n + 1)^n).
Since 10^n + 1 is never a perfect power by Catalan's conjecture (Mihăilescu's theorem), it follows that if 10 does not divide n, then (10^n + 1)^n is exactly an n-th perfect power with a constant congruence speed of a(n) = n.
Moreover, for any positive integer n, the congruence speed of (10^n + 1)^n equals 2*a(n) at height 1 and then becomes stable at height 2.

Examples

			a(10) = 11 since A373387((10^10 + 1)^10) = 11.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=n+IntegerExponent[n,10]; Array[a,77] (* Stefano Spezia, Feb 13 2025 *)
  • PARI
    a(n) = n + valuation(n, 10); \\ Michel Marcus, Feb 13 2025

Formula

a(n) = n + A122840(n).
a(n) = A373387(A121520(n)).
Showing 1-3 of 3 results.