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.

A062895 Numbers k for which d(k) = d(R(k)), where R(k) is the reversal of k and d(k) is the number of divisors of k.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 15, 17, 22, 24, 26, 31, 33, 37, 39, 42, 44, 51, 55, 58, 62, 66, 71, 73, 77, 79, 85, 88, 93, 97, 99, 101, 107, 111, 113, 115, 117, 121, 122, 123, 129, 131, 141, 143, 149, 151, 155, 157, 158, 159, 161, 165, 167, 169, 171, 177, 178, 179
Offset: 1

Views

Author

Amarnath Murthy, Jun 30 2001

Keywords

Comments

The sequence s of numbers k for which R(d(k)) = d(R(k)) first differs at s(80) = 262 while a(80) = 252. - Mohammed Yaseen, Mar 24 2023

Examples

			d(24) = 8 and also d(42) = 8, hence both are members.
		

Crossrefs

Cf. A000005 (d), A004086 (R), A002113 (palindromes: subsequence).
Cf. A350867 (subsequence of non-palindromic terms), A085329 (similar with sigma).

Programs

  • Mathematica
    Select[Range[180],DivisorSigma[0,#]==DivisorSigma[0,FromDigits[Reverse[IntegerDigits[#]]]] &] (* Jayanta Basu, May 17 2013 *)
  • PARI
    { n=0; for (m=1, 10^9, x=m; r=0; while (x>0, d=x-10*(x\10); x\=10; r=r*10 + d); if (numdiv(m) == numdiv(r), write("b062895.txt", n++, " ", m); if (n==1000, break)) ) } \\ Harry J. Smith, Aug 12 2009
    
  • PARI
    isok(k) = numdiv(fromdigits(Vecrev(digits(k)))) == numdiv(k); \\ Michel Marcus, Jul 06 2021
    
  • Python
    from sympy import divisor_count as d
    def ok(n): return d(n) == d(int(str(n)[::-1]))
    print([k for k in range(1, 180) if ok(k)]) # Michael S. Branicky, Mar 24 2023

Extensions

Corrected and extended by Vladeta Jovovic, Jun 30 2001