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.

A380714 a(n) = n*(n-1) mod (10^m-1) where m is the number of decimal digits in n.

Original entry on oeis.org

0, 2, 6, 3, 2, 3, 6, 2, 0, 90, 11, 33, 57, 83, 12, 42, 74, 9, 45, 83, 24, 66, 11, 57, 6, 56, 9, 63, 20, 78, 39, 2, 66, 33, 2, 72, 45, 20, 96, 75, 56, 39, 24, 11, 0, 90, 83, 78, 75, 74, 75, 78, 83, 90, 0, 11, 24, 39, 56, 75, 96, 20, 45, 72, 2, 33, 66
Offset: 1

Views

Author

Giorgos Kalogeropoulos, Mar 27 2025

Keywords

Comments

a(n) = 0 if and only if n is a Kaprekar number (A053816).

Crossrefs

Programs

  • Maple
    a:= n-> n*(n-1) mod (10^length(n)-1):
    seq(a(n), n=1..67);  # Alois P. Heinz, Mar 27 2025
  • Mathematica
    Table[Mod[n(n-1), 10^IntegerLength@n - 1], {n,67}]
  • Python
    def a(n): return n*(n-1)%(10**len(str(n))-1)
    print([a(n) for n in range(1, 68)]) # Michael S. Branicky, Mar 27 2025

Formula

a(n) = A002378(n-1) mod A002283(A055642(n)).