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.

Previous Showing 11-13 of 13 results.

A288669 Numbers n such that n * x/(x-1) produces a rotation of the digits in n for some value of x.

Original entry on oeis.org

45, 162, 243, 324, 405, 486, 567, 648, 729, 891, 2223, 4446, 4455, 4545, 4950, 5445, 6669, 7767, 8892, 8910, 10701, 18819, 19512, 21402, 22212, 26829, 32103, 37638, 39024, 42804, 43434, 44424, 53505, 53658, 56457, 56556, 58536, 64206, 66636, 70731, 74907, 75276, 77778, 78048
Offset: 1

Views

Author

Doug Bell, Jun 13 2017

Keywords

Comments

Numbers n where n * x/(x-1) produces a rotation that would have a first digit of zero are omitted.
Where n * x/(x-1) produces a rotation, (x-1) is a factor of n.
The first term where more than one value of x produces a rotation for a(n) * x/(x-1) is a(44) = 78048: 78048 * 9/8 = 87804 and 78048 * 33/32 = 80487.
The first term where a(n) * x/(x-1) produces a rotation that itself appears in this sequence is a(3) = 243: 243 * 4/3 = 324 = a(4).
If all of the digits in a(n) <= 4, then a(n)*2 also appears; if all of the digits in a(n) <= 3, then a(n)*3 also appears; if all of the digits in a(n) <= 2, then a(n)*4 also appears. Similarly, if each of the digits in a(n) are a multiple of some number k, then a(n)/k also appears.
Where ABC represents the digits in a(n), then ABCABC, ABCABCABC, ... also appear in the sequence with the same value(s) of x.

Examples

			a(1) = 45, 45 * 6/5 = 54;
a(11) = 2223, 2223 * 248/247 = 2232.
		

Crossrefs

Programs

  • Mathematica
    ok[n_] := Block[{d = IntegerDigits[n], m, trg, t}, m = Length[d]; trg = FromDigits /@ Select[ RotateLeft[d, #] & /@ Range[m-1], First[#] > 0 &];{} != Select[ trg, (t = n/#; Numerator[t] + 1 == Denominator[t]) &]]; Select[ Range[10^5], ok] (* Giovanni Resta, Jun 14 2017 *)

A256005 Numbers m such that the result of prepending a zero digit to m, removing the least significant digit D, and prepending D, is divisible by m.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 27, 37, 101, 202, 303, 404, 505, 606, 707, 808, 909, 1084, 1355, 1626, 1897, 2168, 2439, 10101, 10582, 10989, 11583, 11655, 12987, 13986, 15444, 15873, 16317, 18648, 19305, 20202, 20979, 21164, 23166, 25641, 26455, 27027, 30303, 30888
Offset: 1

Views

Author

Paolo P. Lava, May 06 2015

Keywords

Comments

For palindromic numbers the ratio is equal to 10.

Examples

			37 is in the sequence because prepending a 0 gives 037, removing the least significant digit 7 then gives 03, and finally prepending the 7 gives 703, which is divisible by 37.
25641 is in the sequence because prepending a 0 gives 025641, removing the least significant digit 1 then gives 025641, and finally prepending the 1 gives 102564, which is divisible by 25641.
		

Crossrefs

Cf. A034089.

Programs

  • Maple
    P:=proc(q) local a,n; for n from 1 to q do
    a:=(n mod 10)*10^(ilog10(n)+1)+trunc(n/10);
    if not a=n then if type(a/n,integer) then print(n);
    fi; fi; od; end: P(10^7);
  • Mathematica
    Select[Range@31000,IntegerQ[FromDigits[RotateRight[Insert[IntegerDigits[#],0,1]]]/#]&] (* Ivan N. Ianakiev, May 28 2015 *)
  • PARI
    is(n)=my(k=n%10*10^#digits(n)+n\10); k>n && k%n==0 \\ Charles R Greathouse IV, May 08 2015

Extensions

'Name' and 'Examples' sections reworded by Ivan N. Ianakiev, Aug 05 2015 (following the suggestion of Jon E. Schoenfield)

A360423 Positive integers n (with k digits) such that if a positive integer m with k+1 digits is divisible by n, then all the rotations of m are divisible by n.

Original entry on oeis.org

1, 3, 9, 27, 37, 101, 303, 909, 2439, 10101, 10989, 12987, 15873, 25641, 27027, 30303, 37037, 47619, 76923, 90909, 1010101, 1369863, 3030303, 9090909, 12345679, 27027027, 37037037, 101010101, 243902439, 303030303, 909090909, 10101010101, 10989010989, 12987012987, 15873015873
Offset: 1

Views

Author

Robert C. Lyons, Feb 14 2023

Keywords

Comments

John D. Cook's blog (see link below) provides a proof that "if a three-digit number is divisible by 37, it remains divisible by 37 if you rotate its digits."

Examples

			For a(4)=27, 405 is a 3-digit multiple of 27, and the two rotations of 405 (i.e., 54 and 540) are also multiples of 27.
For a(5)=37, 185 is a 3-digit multiple of 37, and the two rotations of 185 (i.e., 851 and 518) are also multiples of 37.
For a(9)=2439, 12195 is a 5-digit multiple of 2439, and the four rotations of 12195 (i.e., 21951, 19512, 95121 and 51219) are also multiples of 2439.
		

Crossrefs

Programs

  • Python
    def rotate(str):
        first_char = str[0 : 1]
        remaining_chars = str[1 :]
        return (remaining_chars + first_char)
    def get_rotations(n):
        n_as_str = str(n)
        rotations = []
        rotation_as_str = n_as_str
        for i in range(len(n_as_str) - 1):
            rotation_as_str = rotate(rotation_as_str)
            rotations.append(int(rotation_as_str))
        return rotations
    seq = []
    max_n = 9999999
    for n in range(1, max_n + 1):
        n_len = len(str(n))
        factor = 2
        while True:
            prod = n * factor
            prod_len = len(str(prod))
            if prod_len < n_len + 1:
                factor = factor + 1
            elif prod_len > n_len + 1:
                seq.append(n)
                break
            else:
                # prod_len == n_len + 1
                rotations = get_rotations(prod)
                if all(rotation % n == 0 for rotation in rotations):
                    factor = factor + 1
                else:
                    break
    print(seq)

Extensions

a(25)-a(35) from Chai Wah Wu, Feb 24 2023
Previous Showing 11-13 of 13 results.