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.

A048343 Total number of distinct palindromes of form 'n-digit number' x 'n-digit number_reversed' (n-digit number not palindromic).

Original entry on oeis.org

0, 1, 3, 10, 19, 44, 86, 171, 308, 551, 920
Offset: 1

Views

Author

Patrick De Geest, Feb 15 1999

Keywords

Examples

			E.g., 3 solutions for 3-digit numbers: 102 * 201 = 20502; 112 * 211 = 23632; 122 * 221 = 26962.
		

Crossrefs

Cf. A048344.

Programs

  • Python
    def A048343(n):
        y, plist = 0, []
        for i in range(10**(n-1),10**n):
            s1 = str(i)
            s2 = s1[::-1]
            if s1 != s2:
                p = i*int(s2)
                if not p in plist:
                    sp = str(p)
                    if sp == sp[::-1]:
                        plist.append(p)
                        y += 1
        return y # Chai Wah Wu, Sep 05 2014

Extensions

More terms from Sam Handler (sam_5_5_5_0(AT)yahoo.com), Aug 18 2006
Offset changed and two terms added by Lars Blomberg, Nov 25 2011

A062936 Numbers n such that n*R(n) is a palindrome, where R(n) (A004086) = digit reversal.

Original entry on oeis.org

1, 2, 3, 11, 12, 21, 22, 101, 102, 111, 112, 121, 122, 201, 202, 211, 212, 221, 1001, 1002, 1011, 1012, 1021, 1022, 1101, 1102, 1111, 1112, 1121, 1201, 1202, 1211, 2001, 2002, 2011, 2012, 2021, 2101, 2102, 2111, 2201, 10001, 10002, 10011, 10012
Offset: 1

Views

Author

Amarnath Murthy, Jul 05 2001

Keywords

Examples

			122*221 = 26962 hence 122 belongs to the sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[100000], Reverse[IntegerDigits[ #*FromDigits[Reverse[IntegerDigits[ # ]]]]] == IntegerDigits[ #*FromDigits[Reverse[IntegerDigits[ # ]]]] &] (* Tanya Khovanova, Jun 17 2009 *)
    Select[Range[11000],PalindromeQ[# IntegerReverse[#]]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 21 2020 *)
  • PARI
    lista(nn) = for(n=1, nn, my(d=digits(n*eval(concat(Vecrev(Str(n)))), 10)); if(d == Vecrev(d), print1(n, ", "))); \\ Altug Alkan, Mar 26 2016
    
  • Python
    A062936_list = []
    for n in range(1,10**5):
        s = str(n*int(str(n)[::-1]))
        if s == s[::-1]:
            A062936_list.append(n) # Chai Wah Wu, Sep 08 2014

Formula

Includes integers not ending in 0 with sum of squares of digits < 10. - David W. Wilson, Jul 06 2001

Extensions

Corrected and extended by Dean Hickerson and Patrick De Geest, Jul 06 2001
Showing 1-2 of 2 results.