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

A133901 Numbers in A128921 whose square is not a palindrome.

Original entry on oeis.org

33, 99, 1119111, 10110901101, 11110901111, 101109901101, 1011109011101, 1110109010111, 10111099011101, 100110090011001, 100111090111001, 101011090110101, 111001090100111
Offset: 1

Views

Author

Klaus Brockhaus and Zak Seidov, Sep 29 2007

Keywords

Comments

Also terms of A128921 that do not consist completely of digits 0, 1, 2, however excluding A128921(4) = 3.
Conjecture: Sequence is infinite.

Examples

			A128921(41) = 1119111, 1119111^2 = 1252409430321 is not a palindrome, but its reverse is also a square: 1230349042521 = 1109211^2.
		

Crossrefs

Cf. A128921 (palindromes p such that reverse of p^2 is also a square), A002113 (palindromes in base 10), A057135 (palindromes whose square is a palindrome), A057136 (palindromes whose square root is a palindrome).

A319483 a(n) = A128921(n)^2.

Original entry on oeis.org

0, 1, 4, 9, 121, 484, 1089, 9801, 10201, 12321, 14641, 40804, 44944, 1002001, 1234321, 4008004, 100020001, 102030201, 104060401, 121242121, 123454321, 125686521, 400080004, 404090404, 10000200001, 10221412201, 12102420121, 12345654321, 40000800004, 1000002000001
Offset: 1

Views

Author

Seiichi Manyama, Sep 20 2018

Keywords

Examples

			b(n) = reverse of a(n).
n | A128921(n) |   a(n) |   b(n) | Root of b(n) |
--+------------+--------+--------+--------------+
1 |         0  |     0  |     0  |           0  |
2 |         1  |     1  |     1  |           1  |
3 |         2  |     4  |     4  |           2  |
4 |         3  |     9  |     9  |           3  |
5 |        11  |   121  |   121  |          11  |
6 |        22  |   484  |   484  |          22  |
7 |        33  |  1089  |  9801  |          99  |
8 |        99  |  9801  |  1089  |          33  |
9 |       101  | 10201  | 10201  |         101  |
		

Crossrefs

Programs

  • Python
    from itertools import count, chain, islice
    from sympy.ntheory.primetest import is_square
    def A319483_gen(): # generator of terms
        return filter(lambda n:is_square(int(str(n)[::-1])),map(lambda n: n**2, chain((0,),chain.from_iterable(chain((int((s:=str(d))+s[-2::-1]) for d in range(10**l,10**(l+1))), (int((s:=str(d))+s[::-1]) for d in range(10**l,10**(l+1)))) for l in count(0)))))
    A319483_list = list(islice(A319483_gen(),20)) # Chai Wah Wu, Jun 23 2022

A057135 Palindromes whose square is a palindrome; also palindromes whose sum of squares of digits is less than 10.

Original entry on oeis.org

0, 1, 2, 3, 11, 22, 101, 111, 121, 202, 212, 1001, 1111, 2002, 10001, 10101, 10201, 11011, 11111, 11211, 20002, 20102, 100001, 101101, 110011, 111111, 200002, 1000001, 1001001, 1002001, 1010101, 1011101, 1012101, 1100011, 1101011, 1102011, 1110111, 1111111
Offset: 1

Views

Author

Henry Bottomley, Aug 12 2000

Keywords

Examples

			121 is OK since 121^2=14641 is also a palindrome.
		

Crossrefs

Programs

  • Maple
    dmax:= 7: # to get all terms with up to dmax digits
    Res:= 0,1,2,3,11,22:
    Po:= [[0],[1],[2],[3]]: Pe:= [[0,0],[1,1],[2,2]]:
    for d from 1 to dmax do
      if d::odd then
        Po:= select(t -> add(s^2,s=t) < 10, [seq(seq([i,op(t),i], t=Po),i=0..2)]);
        Res:= Res, op(map(proc(p) if p[1] <> 0 then add(p[i]*10^(i-1),i=1..nops(p)) fi end proc, Po))
      else
        Pe:= select(t -> add(s^2,s=t) < 10, [seq(seq([i,op(t),i], t=Pe),i=0..2)]);
        Res:= Res, op(map(proc(p) if p[1] <> 0 then add(p[i]*10^(i-1),i=1..nops(p)) fi end proc, Pe))
      fi;
    od:
    Res; # Robert Israel, Jun 21 2017
  • Mathematica
    PalQ[n_] := FromDigits[Reverse[IntegerDigits[n]]] == n; t = {}; Do[
    If[PalQ[n] && PalQ[n^2], AppendTo[t, n]], {n, 0, 1200000}]; t (* Jayanta Basu, May 10 2013 *)
    Select[Range[0,12*10^5],AllTrue[{#,#^2},PalindromeQ]&](* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Feb 20 2018 *)
  • PARI
    is(n) = digits(n)==Vecrev(digits(n)) && digits(n^2)==Vecrev(digits(n^2)) \\ Felix Fröhlich, Jun 21 2017

Formula

a(n) = sqrt(A057136(n))

Extensions

1001001 inserted by R. J. Mathar, Nov 04 2012
Showing 1-3 of 3 results.