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.

A056968 10^(n-1) modulo n.

Original entry on oeis.org

0, 0, 1, 0, 0, 4, 1, 0, 1, 0, 1, 4, 1, 10, 10, 0, 1, 10, 1, 0, 16, 10, 1, 16, 0, 10, 19, 20, 1, 10, 1, 0, 1, 10, 25, 28, 1, 10, 22, 0, 1, 40, 1, 32, 10, 10, 1, 16, 8, 0, 49, 12, 1, 46, 45, 24, 43, 10, 1, 40, 1, 10, 37, 0, 55, 10, 1, 48, 31, 20, 1, 64, 1, 10, 25, 12, 67, 4, 1, 0, 73, 10, 1
Offset: 1

Views

Author

Henry Bottomley, Jul 20 2000

Keywords

Examples

			a(6)=4 since 100000=6*16666+4
		

Crossrefs

Programs

  • Maple
    0, seq(10&^(n-1) mod n, n=2..100); # Robert Israel, Nov 25 2024
  • Mathematica
    Table[PowerMod[10,n-1,n],{n,100}] (* Harvey P. Dale, Jul 17 2021 *)

Formula

If n is of form 2^i*5^j then a(n)=0, otherwise a(n)=10^(n-1)+n-A053041(n)
From Robert Israel, Nov 25 2024: (Start)
If n is prime other than 2 or 5, then a(n) = 1.
If n = 2^i * 5^j * p where p is a prime > 10^(2^i * 5^j), then a(n) = 10^(2^i * 5^j).
If n = 2^i * 5^j * p where p is a prime and
2^(2^i * 5^j - 1 - i) * 5^(2^i * 5^j -1 - j) > p > 2^(2^i * 5^j-2 - u) * 5^(2^i * 5^j-1-j),
then a(n) = 10^(2^i * 5^j - 1) - 2^i * 5^j * p.
For example, with i = 0 and j = 1 we get a(5*p) = 10^4 - 5*p if p is a prime between 1000 and 2000.
(End)