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.

A384597 Integers k such that k + 1 has a divisor that is an anagram of k, which must have the same number of digits as k.

Original entry on oeis.org

1, 41, 73, 631, 793, 6031, 6391, 6733, 7412, 7520, 7993, 8627, 9710, 25147, 37112, 43916, 49316, 51427, 60031, 60391, 60733, 62314, 63214, 63991, 66331, 67393, 67933, 70211, 71132, 72101, 74102, 74912, 75020, 75290, 78260, 79993, 81103, 85712, 86927, 89627
Offset: 1

Views

Author

Gonzalo Martínez, Jun 04 2025

Keywords

Comments

This sequence has infinitely many terms, since 60*10^m + 31 is a term for all positive integers m, as (60*10^m + 31) + 1 = 2*(30*10^m + 16).
A100412 is a subsequence of a(n), since if m is in A100412, then m + 1 = 2*reversal(m).

Examples

			73 is in this sequence since 73 + 1 = 37*2, where 37 is an anagram of 73.
		

Crossrefs

Cf. A100412.

Programs

  • Mathematica
    {1}~Join~Select[Range[100000],ContainsAny[IntegerDigits/@Divisors[#+1],Complement[Permutations[IntegerDigits[#]],{IntegerDigits[#]}]]&] (* James C. McMahon, Jun 10 2025 *)
  • PARI
    isok(k) = my(s=vecsort(digits(k))); fordiv(k+1, d, if (vecsort(digits(d)) == s, return(1))); \\ Michel Marcus, Jun 04 2025
  • Python
    def ok(k):
        return any((k+1)%d==0 and sorted(str(d))==sorted(str(k)) and len(str(d))==len(str(k)) for d in range(1,k+2))
    print(", ".join(map(str, [k for k in range(1, 100000) if ok(k)])))