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

A344748 Numbers m with decimal expansion (d_k, ..., d_1) such that d_i = m * i mod 10 for i = 1..k.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 21, 26, 42, 47, 63, 68, 84, 89, 147, 284, 321, 468, 505, 642, 789, 826, 963, 2468, 2963, 4321, 4826, 6284, 6789, 8147, 8642, 50505, 52963, 54321, 56789, 58147, 208642, 258147, 406284, 456789, 604826, 654321, 802468, 852963
Offset: 1

Views

Author

Rémy Sigrist, May 28 2021

Keywords

Comments

Positive terms have no trailing zero in decimal representation (A067251), and are uniquely determined by their final digit d (A010879) and the number of digits, say k, in their decimal expansion (A055642); d*k cannot be a multiple of 10.
If m belongs to the sequence, then A217657(m) also belongs to the sequence.

Examples

			- 6 * 1 = 6 mod 10,
- 6 * 2 = 2 mod 10,
- 6 * 3 = 8 mod 10,
- 6 * 4 = 4 mod 10,
- so 4826 belongs to the sequence.
		

Crossrefs

Programs

  • PARI
    is(n) = { my (r=n); for (k=1, oo, if (r==0, return (1), (n*k)%10!=r%10, return (0), r\=10)) }
    
  • PARI
    print (setbinop((d,k) -> sum(i=1, k, 10^(i-1) * ((d*i)%10)), [1..9], [0..6]))
    
  • Python
    def ok(m):
      d = str(m)
      return all(d[-i] == str((m*i)%10) for i in range(1, len(d)+1))
    print(list(filter(ok, range(10**6)))) # Michael S. Branicky, May 29 2021
    
  • Python
    def auptod(maxdigits):
      alst = [0]
      for k in range(1, maxdigits+1):
        aklst = []
        for d1 in range(1, 10):
          d = [(d1*i)%10 for i in range(k, 0, -1)]
          if d[0] != 0: aklst.append(int("".join(map(str, d))))
        alst.extend(sorted(aklst))
      return alst
    print(auptod(6)) # Michael S. Branicky, May 29 2021

A344823 Numbers m with decimal expansion (d_1, ..., d_k) such that d_i = m ^ i mod 10 for i = 1..k.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 55, 66, 111, 464, 555, 666, 919, 1111, 5555, 6666, 11111, 24862, 39713, 46464, 55555, 66666, 79317, 84268, 91919, 111111, 555555, 666666, 1111111, 4646464, 5555555, 6666666, 9191919, 11111111, 55555555, 66666666, 111111111
Offset: 1

Views

Author

Rémy Sigrist, May 29 2021

Keywords

Comments

This sequence is infinite as it contains d * A002275(k) for any d in {1, 5, 6} and k > 0.
Also contains terms with patterns 4(64)^k, 9(19)^k, 2(4862)^k, 3(9713)^k, 7(9317)^k, 8(4268)^k for k >= 0, where ^ denotes repeated concatenation; all terms have first and last digits the same. - Michael S. Branicky, May 29 2021

Examples

			- 4^1 = 4 mod 10,
- 4^2 = 6 mod 10,
- 4^3 = 4 mod 10,
- so 464 belongs to the sequence.
		

Crossrefs

Programs

  • PARI
    is(n) = { my (d=digits(n), m=Mod(n,10)); for (k=1, #d, if (d[k] != m^k, return (0))); return (1) }
    
  • PARI
    See Links section.
    
  • Python
    def ok(m):
      d = str(m)
      return all(d[i-1] == str((m**i)%10) for i in range(1, len(d)+1))
    print(list(filter(ok, range(10**6)))) # Michael S. Branicky, May 29 2021
    
  • Python
    def auptod(maxdigits):
      alst = [0]
      for k in range(1, maxdigits+1):
        for d1 in range(1, 10):
          d = [(d1**i)%10 for i in range(1, k+1)]
          if d1 == d[-1]: alst.append(int("".join(map(str, d))))
      return alst
    print(auptod(9)) # Michael S. Branicky, May 29 2021
Showing 1-2 of 2 results.