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

A033819 Trimorphic numbers: n^3 ends with n. Also m-morphic numbers for all m > 5 such that m-1 is not divisible by 10 and m == 3 (mod 4).

Original entry on oeis.org

0, 1, 4, 5, 6, 9, 24, 25, 49, 51, 75, 76, 99, 125, 249, 251, 375, 376, 499, 501, 624, 625, 749, 751, 875, 999, 1249, 3751, 4375, 4999, 5001, 5625, 6249, 8751, 9375, 9376, 9999, 18751, 31249, 40625, 49999, 50001, 59375, 68751, 81249, 90624, 90625
Offset: 1

Views

Author

Keywords

Comments

n is in this sequence iff it occurs in one of A002283, A007185, A016090, A198971, A199685, A216092, A216093, A224473, A224474, A224475, A224476, A224477, and A224478. - Eric M. Schmidt, Apr 08 2013
Let q(n) = floor(a(n)^3 / 10^A055642(a(n))), where A055642(n) is the number of digits in the decimal expansion of n. As well, let na and nb denote the indices of the preceding and next terms that begin with a 9. Then (1/q(n)) * (a(n)^4 - a(n)^3 - a(n)^2 + a(n)) - 2*a(n)^2 + a(n) + q(n) + 1 = a(na+nb-n)^2 - a(na+nb-n) - q(na+nb-n). - Christopher Hohl, Apr 08 2019

Examples

			376^3 = 53157376 which ends with 376.
		

References

  • S. Premchaud, A class of numbers, Math. Student, 48 (1980), 293-300.

Crossrefs

Cf. A074194, A215558 (cubes of the terms).

Programs

  • Magma
    [n: n in [0..10^5] | Intseq(n^3)[1..#Intseq(n)] eq Intseq(n)]; // Bruno Berselli, Apr 04 2013
  • Mathematica
    Do[x=Floor[N[Log[10, n], 25]]+1; If[Mod[n^3, 10^x] == n, Print[n]], {n, 1, 10000}]
    Select[Range[100000],PowerMod[#,3,10^IntegerLength[#]]==#&](* Harvey P. Dale, Nov 04 2011 *)
    Select[Range[0, 10^5], 10^IntegerExponent[#^3-#, 10]>#&] (* Jean-François Alcover, Apr 04 2013 *)

A318960 One of the two successive approximations up to 2^n for 2-adic integer sqrt(-7). This is the 1 (mod 4) case.

Original entry on oeis.org

1, 5, 5, 21, 53, 53, 181, 181, 181, 181, 181, 181, 181, 16565, 49333, 49333, 49333, 49333, 573621, 1622197, 1622197, 1622197, 10010805, 10010805, 10010805, 77119669, 211337397, 479772853, 479772853, 479772853, 2627256501, 6922223797, 15512158389, 15512158389
Offset: 2

Views

Author

Jianing Song, Sep 06 2018

Keywords

Comments

a(n) is the unique number k in [1, 2^n] and congruent to 1 (mod 4) such that k^2 + 7 is divisible by 2^(n+1).
The 2-adic integers are very different from p-adic ones where p is an odd prime. For example, provided that there is at least one solution, the number of solutions to x^n = a over p-adic integers is gcd(n, p-1) for odd primes p and gcd(n, 2) for p = 2. For odd primes p, x^2 = a is solvable iff a is a quadratic residue modulo p, while for p = 2 it's solvable iff a == 1 (mod 8). If gcd(n, p-1) > 1 and gcd(a, p) = 1, then the solutions to x^n = a differ starting at the rightmost digit for odd primes p, while for p = 2 they differ starting at the next-to-rightmost digit. As a result, the formulas and the program here are different from those in other entries related to p-adic integers.

Examples

			The unique number k in [1, 4] and congruent to 1 modulo 4 such that k^2 + 7 is divisible by 8 is 1, so a(2) = 1.
a(2)^2 + 7 = 8 which is not divisible by 16, so a(3) = a(2) + 2^2 = 5.
a(3)^2 + 7 = 32 which is divisible by 32, so a(4) = a(3) = 5.
a(4)^2 + 7 = 32 which is divisible by 64, so a(5) = a(4) + 2^4 = 21.
a(5)^2 + 7 = 448 which is divisible by 128, so a(6) = a(5) + 2^5 = 53.
...
		

Crossrefs

Cf. A318962.
Expansions of p-adic integers:
this sequence, A318961 (2-adic, sqrt(-7));
A268924, A271222 (3-adic, sqrt(-2));
A268922, A269590 (5-adic, sqrt(-4));
A048898, A048899 (5-adic, sqrt(-1));
A290567 (5-adic, 2^(1/3));
A290568 (5-adic, 3^(1/3));
A290800, A290802 (7-adic, sqrt(-6));
A290806, A290809 (7-adic, sqrt(-5));
A290803, A290804 (7-adic, sqrt(-3));
A210852, A212153 (7-adic, (1+sqrt(-3))/2);
A290557, A290559 (7-adic, sqrt(2));
A286840, A286841 (13-adic, sqrt(-1));
A286877, A286878 (17-adic, sqrt(-1)).
Also expansions of 10-adic integers:
A007185, A010690 (nontrivial roots to x^2-x);
A216092, A216093, A224473, A224474 (nontrivial roots to x^3-x).

Programs

  • PARI
    a(n) = truncate(-sqrt(-7+O(2^(n+1))))

Formula

a(2) = 1; for n >= 3, a(n) = a(n-1) if a(n-1)^2 + 7 is divisible by 2^(n+1), otherwise a(n-1) + 2^(n-1).
a(n) = 2^n - A318961(n).
a(n) = Sum_{i=0..n-1} A318962(i)*2^i.

Extensions

Offset corrected by Jianing Song, Aug 28 2019

A318961 One of the two successive approximations up to 2^n for 2-adic integer sqrt(-7). This is the 3 (mod 4) case.

Original entry on oeis.org

3, 3, 11, 11, 11, 75, 75, 331, 843, 1867, 3915, 8011, 16203, 16203, 16203, 81739, 212811, 474955, 474955, 474955, 2572107, 6766411, 6766411, 23543627, 57098059, 57098059, 57098059, 57098059, 593968971, 1667710795, 1667710795, 1667710795, 1667710795, 18847579979
Offset: 2

Views

Author

Jianing Song, Sep 06 2018

Keywords

Comments

a(n) is the unique number k in [1, 2^n] and congruent to 3 (mod 4) such that k^2 + 7 is divisible by 2^(n+1).
The 2-adic integers are very different from p-adic ones where p is an odd prime. For example, provided that there is at least one solution, the number of solutions to x^n = a over p-adic integers is gcd(n, p-1) for odd primes p and gcd(n, 2) for p = 2. For odd primes p, x^2 = a is solvable iff a is a quadratic residue modulo p, while for p = 2 it's solvable iff a == 1 (mod 8). If gcd(n, p-1) > 1 and gcd(a, p) = 1, then the solutions to x^n = a differ starting at the rightmost digit for odd primes p, while for p = 2 they differ starting at the next-to-rightmost digit. As a result, the formulas and the program here are different from those in other entries related to p-adic integers.

Examples

			The unique number k in [1, 4] and congruent to 3 modulo 4 such that k^2 + 7 is divisible by 8 is 3, so a(2) = 3.
a(2)^2 + 7 = 16 which is divisible by 16, so a(3) = a(2) = 3.
a(3)^2 + 7 = 16 which is not divisible by 32, so a(4) = a(3) + 2^3 = 11.
a(4)^2 + 7 = 128 which is divisible by 64, so a(5) = a(4) = 11.
a(5)^2 + 7 = 128 which is divisible by 128, so a(6) = a(5) = 11.
...
		

Crossrefs

Cf. A318963.
Expansions of p-adic integers:
A318960, this sequence (2-adic, sqrt(-7));
A268924, A271222 (3-adic, sqrt(-2));
A268922, A269590 (5-adic, sqrt(-4));
A048898, A048899 (5-adic, sqrt(-1));
A290567 (5-adic, 2^(1/3));
A290568 (5-adic, 3^(1/3));
A290800, A290802 (7-adic, sqrt(-6));
A290806, A290809 (7-adic, sqrt(-5));
A290803, A290804 (7-adic, sqrt(-3));
A210852, A212153 (7-adic, (1+sqrt(-3))/2);
A290557, A290559 (7-adic, sqrt(2));
A286840, A286841 (13-adic, sqrt(-1));
A286877, A286878 (17-adic, sqrt(-1)).
Also expansions of 10-adic integers:
A007185, A010690 (nontrivial roots to x^2-x);
A216092, A216093, A224473, A224474 (nontrivial roots to x^3-x).

Programs

  • PARI
    a(n) = if(n==2, 3, truncate(sqrt(-7+O(2^(n+1)))))

Formula

a(2) = 3; for n >= 3, a(n) = a(n-1) if a(n-1)^2 + 7 is divisible by 2^(n+1), otherwise a(n-1) + 2^(n-1).
a(n) = 2^n - A318960(n).
a(n) = Sum_{i=0..n-1} A318963(i)*2^i.

Extensions

Offset corrected by Jianing Song, Aug 28 2019

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.

A181539 Smallest number m > 1 such that m^2 == 1 (mod 10^n).

Original entry on oeis.org

9, 49, 249, 1249, 18751, 218751, 781249, 24218751, 74218751, 1425781249, 13574218751, 163574218751, 163574218751, 19836425781249, 19836425781249, 2480163574218751, 12519836425781249, 12519836425781249, 487480163574218751, 15487480163574218751, 215487480163574218751, 215487480163574218751
Offset: 1

Views

Author

Kevin Batista (kevin762401(AT)yahoo.com), Oct 29 2010

Keywords

Comments

a(n) > 10^floor(n/2).
All terms have last digit 1 or 9.
Squares of terms are listed in A085877.
Decimal representation of each term is formed by the reverse concatenation of initial terms of either A063006 or A091661.
Except for 3, there are no solutions for n>1 and m^2 == -1 (mod 10^n). See comment in A063006 under extensions. - Robert G. Wilson v, Jan 26 2013
If a(n)<(10^n)/2 then (10^n-a(n))^2 is also congruent (modulo 10^n), it is just not the least. - Robert G. Wilson v, Jan 26 2013

Examples

			1249^2 = 1560001 == 1 (mod 10^4), and there is no smaller m > 1 such that m^2 == 1 (mod 10^4). Hence a(4) = 1249.
		

Crossrefs

Cf. A063006, A091661 (the two nontrivial 10-adic square roots of 1).
Cf. A224473, A224474 (approximation of the two nontrivial 10-adic square roots of 1 up to powers of 10).

Programs

  • PARI
    install(Zn_quad_roots, GGG);
    a181539(n) = vecsort(Zn_quad_roots(10^n,0,-1)[2])[2]; \\ Max Alekseyev, Oct 13 2024

Formula

Let b(n) = A224474(n) (or equivalently b(n) = A224473(n)), then for n >= 3, there are eight solutions in [0,10^n) to x^2 == 1 (mod 10^n), namely x = 1, 5*10^(n-1) - 1, 5*10^(n-1) + 1, 10^n - 1, b(n), 10^n - b(n), |b(n) - 5*10^(n-1)|, and 10^n - |b(n) - 5*10^(n-1)|, so a(n) = min{b(n), |b(n) - 5*10^(n-1)|, 10^n - b(n)} < 25*10^(n-2). - Jianing Song, Sep 23 2024

Extensions

a(2) through a(4), a(7) through a(11) corrected, comment added, example replaced by Klaus Brockhaus, Nov 01 2010
Edited by N. J. A. Sloane, Oct 29 2010, Nov 09 2010
Definition to avoid the constant sequence a(n)=1 constrained by R. J. Mathar, Nov 18 2010
a(1) corrected, terms a(13) onward added by Max Alekseyev, Dec 10 2012

A181607 Numbers n with k digits such that n^2 == 1 (mod 10^k).

Original entry on oeis.org

1, 9, 49, 51, 99, 249, 251, 499, 501, 749, 751, 999, 1249, 3751, 4999, 5001, 6249, 8751, 9999, 18751, 31249, 49999, 50001, 68751, 81249, 99999, 218751, 281249, 499999, 500001, 718751, 781249, 999999, 4218751, 4999999, 5000001, 5781249, 9218751
Offset: 1

Views

Author

Robert G. Wilson v, Nov 01 2010

Keywords

Comments

Least term of n digits: 1, 49, 249, 1249, 18751, 218751, 4218751, ..., .
If n of k digits is present then 10^k-n is present.
The union of A002283, A198971, A199685, A224473, A224474, A224475, and A224476 (except that this sequence omits 0, 4, and 6). - Eric M. Schmidt, Jan 26 2016

Crossrefs

Programs

  • Mathematica
    Table[ Select[ Range[10^(k - 1), 10^k - 1], Mod[ #^2, 10^k] == 1 &], {k, 7}] // Flatten
Showing 1-6 of 6 results.