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 21-30 of 41 results. Next

A028504 Palindromes of form k*(k+2); or palindromes 1 less than a square.

Original entry on oeis.org

0, 3, 8, 99, 323, 575, 4224, 5775, 9999, 36863, 42024, 999999, 3055503, 3640463, 5597955, 8803088, 32855823, 99999999, 360696063, 422919224, 9999999999, 30485858403, 30536863503, 32154945123, 59080108095, 86310801368, 304816618403, 999999999999, 3490500050943
Offset: 1

Views

Author

Keywords

Comments

10^(2*m) - 1 for m > 0 are terms. - Chai Wah Wu, May 25 2017

Examples

			4224 belongs to this sequence as 4225 = 65^2.
		

Crossrefs

Programs

  • ARIBAS
    stop := 400000; m := 1; while m < stop do s := m*m - 1; if s = int_reverse(s) then write(s," "); end; inc(m); end;
  • Mathematica
    palQ[n_] := Block[{d = IntegerDigits[n]}, d == Reverse[d]]; Select[Range[10000]^2 - 1, palQ] (* Giovanni Resta, Aug 29 2018 *)
    Select[Table[n(n+2),{n,0,19*10^5}],PalindromeQ] (* Harvey P. Dale, Oct 13 2024 *)

Formula

a(n) = A028503(n) * (A028503(n) + 2) = A070253(n)^2 - 1 = A070254(n) - 1. - Giovanni Resta, Aug 29 2018

Extensions

More terms from Giovanni Resta, Aug 28 2018

A027829 Palindromic squares with an even number of digits.

Original entry on oeis.org

698896, 637832238736, 4099923883299904, 6916103777337773016196, 40460195511188111559106404, 4872133543202112023453312784, 9658137819052882509187318569, 46501623417708833880771432610564, 1635977102407987117897042017795361, 163296619873968186681869378916692361
Offset: 1

Views

Author

Keith Devlin, via Boon Leong (boon_leong(AT)hotmail.com)

Keywords

Examples

			836^2 = 698896, which is palindromic, so 698896 is in the sequence.
1001^2 = 1002001, which is palindromic, but it has an odd number of digits, so it's not in the sequence.
		

References

  • Charles Ashbacher, More on palindromic squares, J. Rec. Math. 22, no. 2 (1990), 133-135. [A scan of the first page of this article is included with the last page of the Keith (1990) scan]

Crossrefs

Programs

  • Mathematica
    Select[Range[1000000]^2, PalindromeQ[#] && OddQ[Floor[Log[10, #]]] &] (* Alonso del Arte, Oct 11 2019 *)
  • PARI
    is_A027829(n)={issquare(n)&&Vecrev(n=digits(n))==n&&!bittest(#n, 0)} \\ This is faster than first checking for even length if applied to numbers known to have an even number of digits, as should be the case for a systematic search. For this, one should only consider squares, i.e., rather use is_A016113.  - M. F. Hasler, Jun 08 2014
    
  • Python
    from math import isqrt
    from itertools import count, islice
    def A027829_gen(): # generator of terms
        return filter(lambda n: (s:=str(n))[:(t:=(len(s)+1)//2)]==s[:-t-1:-1], map(lambda n: n**2, (d for l in count(2,2) for d in range(isqrt(10**(l-1))+1,isqrt(10**l)+1))))
    A027829_list = list(islice(A027829_gen(),3)) # Chai Wah Wu, Jun 23 2022
  • Scala
    def isPalindromic(n: BigInt): Boolean = n.toString == n.toString.reverse
    val squares = ((1: BigInt) to (1000000: BigInt)).map(n => n * n)
    squares.filter(n => isPalindromic(n) && n.toString.length % 2 == 0) // Alonso del Arte, Oct 07 2019
    

Formula

a(n) = A016113(n)^2. - M. F. Hasler, Jun 08 2014

Extensions

Two new terms were recently found by Bennett from UK (communication from Patrick De Geest, Dec 1999 or before)
Edited by M. F. Hasler, Jun 08 2014

A180436 Palindromic numbers which are sum of consecutive squares.

Original entry on oeis.org

1, 4, 5, 9, 55, 77, 121, 181, 313, 434, 484, 505, 545, 595, 636, 676, 818, 1001, 1111, 1441, 1771, 4334, 6446, 10201, 12321, 14641, 17371, 17871, 19691, 21712, 40804, 41214, 42924, 44444, 44944, 46564, 51015, 65756, 69696, 81818, 94249, 97679, 99199
Offset: 1

Views

Author

Zhining Yang, Jan 19 2011

Keywords

Comments

In more than one way: 554455, 9343439, ... (A267600) - Robert G. Wilson v, May 28 2012

Examples

			1001 is in the sequence because 1001 is palindromic and it can be written as sum of consecutive squares (1001 = 4^2 + 5^2 + 6^2 + ... + 13^2 + 14^2).
		

Crossrefs

Programs

  • Mathematica
    palQ[n_Integer] := Block[{idn = IntegerDigits[n]}, idn == Reverse[idn]]; lst = {}; k = 1; While[k < 1000, AppendTo[lst, Select[ Accumulate[ Range[k, 1000]^2], palQ]]; lst = Union@ Flatten@ lst; k++]; Select[lst, # < 10^6 &] (* Robert G. Wilson v, May 28 2012 *)

A186080 Fourth powers that are palindromic in base 10.

Original entry on oeis.org

0, 1, 14641, 104060401, 1004006004001, 10004000600040001, 100004000060000400001, 1000004000006000004000001, 10000004000000600000040000001, 100000004000000060000000400000001, 1000000004000000006000000004000000001, 10000000004000000000600000000040000000001, 100000000004000000000060000000000400000000001
Offset: 1

Views

Author

Matevz Markovic, Feb 11 2011

Keywords

Comments

See A056810 (the main entry for this problem) for further information, including the search limit. - N. J. A. Sloane, Mar 07 2011
Conjecture: If k^4 is a palindrome > 0, then k begins and ends with digit 1, all other digits of k being 0.
The number of zeros in 1x1, where the x are zeros, is the same as (the number of zeros)/4 in (1x1)^4 = 1x4x6x4x1.

Crossrefs

Programs

  • Magma
    [ p: n in [0..10000000] | s eq Reverse(s) where s is Intseq(p) where p is n^4 ];
  • Mathematica
    Do[If[Module[{idn = IntegerDigits[n^4, 10]}, idn == Reverse[idn]], Print[n^4]], {n, 100000001}]

Formula

a(n) = A056810(n)^4.

Extensions

a(11)-a(13) using extensions of A056810 from Hugo Pfoertner, Oct 22 2021

A263617 Number of numbers with at most n digits whose square is a palindrome.

Original entry on oeis.org

4, 7, 15, 20, 31, 37, 56, 70, 95, 113, 162, 193, 264, 310, 415, 486, 640, 741, 950, 1082, 1374, 1556, 1940, 2176, 2673, 2975, 3611, 3994, 4793, 5268, 6249, 6827, 8028, 8729
Offset: 1

Views

Author

N. J. A. Sloane, Oct 23 2015

Keywords

Crossrefs

Partial sums of A263616.

Programs

  • Mathematica
    Table[Length[Select[Range[ 0, 10^n - 1], PalindromeQ[#^2] &]], {n, 6}] (* Robert Price, Apr 26 2019 *)

Extensions

a(9)-a(10) from Chai Wah Wu, Oct 25 2015
a(11)-a(12) from Michael S. Branicky, May 23 2021
a(13)-a(22) (using A002778) from Chai Wah Wu, Sep 16 2021
a(23)-a(34) from Max Alekseyev, Apr 08 2025

A263619 Number of palindromic squares with at most n digits.

Original entry on oeis.org

4, 4, 7, 7, 14, 15, 20, 20, 31, 31, 36, 37, 56, 56, 69, 70, 95, 95, 113, 113, 161, 162, 193, 193, 263, 264, 308, 310, 415, 415, 485, 486, 639, 640, 738, 741, 950, 950, 1082, 1082, 1373, 1374, 1555, 1556, 1940, 1940, 2174, 2176, 2672, 2673, 2974, 2975, 3611, 3611, 3994, 3994, 4792, 4793, 5267, 5268, 6249, 6249, 6827, 6827, 8026, 8028, 8729
Offset: 1

Views

Author

N. J. A. Sloane, Oct 23 2015

Keywords

Crossrefs

Partial sums of A263618.

Programs

  • Mathematica
    Table[Length[Select[Range[0, Floor[Sqrt[10^n]]], PalindromeQ[#^2] &]], {n, 10}] (* Robert Price, Apr 26 2019 *)

Extensions

a(13)-a(19) from Chai Wah Wu, Oct 24 2015
a(20) from Robert Price, Apr 26 2019
a(21)-a(44) using A263618 from Chai Wah Wu, Jun 14 2024
a(45)-a(67) added by Max Alekseyev, Apr 08 2025

A307717 Number of palindromic squares, k^2, of length n such that k is also palindromic.

Original entry on oeis.org

4, 0, 2, 0, 5, 0, 3, 0, 8, 0, 5, 0, 13, 0, 9, 0, 22, 0, 16, 0, 37, 0, 27, 0, 60, 0, 43, 0, 93, 0, 65, 0, 138, 0, 94, 0, 197, 0, 131, 0, 272, 0, 177, 0, 365, 0, 233, 0, 478, 0, 300, 0, 613, 0, 379, 0, 772, 0, 471, 0, 957, 0, 577, 0, 1170, 0, 698, 0, 1413, 0
Offset: 1

Views

Author

Robert Price, Apr 23 2019

Keywords

Examples

			There are only two palindromic squares of length 3 whose root is also palindromic. 11^2=121 and 22^2=484. Thus, a(3)=2.
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Range[If[n == 1, 0, Ceiling[Sqrt[10^(n - 1)]]], Floor[Sqrt[10^n]]], # == IntegerReverse[#] && #^2 == IntegerReverse[#^2] &]], {n, 15}]

Formula

From Christoph Koutschan, Feb 19 2022: (Start)
a(2n-1) = A218035(n).
a(n) is given by a quasi-polynomial (for a proof, see A218035):
a(1) = 4;
a(2n) = 0;
a(4n+1) = (n^3-3*n^2+11*n+6)/3 (n > 0);
a(4n+3) = (n^3+5*n+12)/6 (n >= 0). (End)

Extensions

a(16)-a(20) from Robert Price, Apr 25 2019
a(21)-a(70) from Giovanni Resta, Apr 28 2019

A065378 Primes p such that p^2 is a palindromic square.

Original entry on oeis.org

2, 3, 11, 101, 307, 30001253, 100111001, 110111011, 111010111, 111091111, 1011099011101, 1100011100011, 1100101010011, 1101010101011, 100110101011001, 100110990111001, 101000010000101, 101011000110101, 101110000011101
Offset: 1

Views

Author

Patrick De Geest, Nov 03 2001

Keywords

Comments

Record prime base number of a sporadic palindromic square is 13661181333262459.

Examples

			E.g. a(6) = 900075181570009 = p^2 with p = 30001253 and prime.
		

Crossrefs

Programs

  • Mathematica
    t={}; Do[p=Prime[n]; If[FromDigits[Reverse[IntegerDigits[p^2]]]==p^2,AppendTo[t,p]],{n,10^7}]; t (* Jayanta Basu, May 11 2013 *)

Extensions

Corrected by Jayanta Basu, May 11 2013

A263620 Number of nonzero palindromic squares with at most 2n digits.

Original entry on oeis.org

3, 6, 14, 19, 30, 36, 55, 69, 94, 112, 161, 192, 263, 309, 414, 485, 639, 740, 949, 1081, 1373, 1555
Offset: 1

Views

Author

N. J. A. Sloane, Oct 23 2015

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Range[1, Floor[Sqrt[10^(2 n)]]], PalindromeQ[#^2] &]], {n, 6}] (* Robert Price, Apr 26 2019 *)
  • Python
    def ispal(n): s = str(n); return s == s[::-1]
    def a(n):
      c, k, kk = 0, 1, 1
      while kk < 10**(2*n): c, k, kk = c + (ispal(kk)), k+1, kk + 2*k + 1
      return c
    print([a(n) for n in range(1, 8)]) # Michael S. Branicky, Mar 06 2021

Formula

Equals A263619(2n)-1.

Extensions

a(7)-a(10) from Chai Wah Wu, Oct 25 2015
More terms using A263618 from Chai Wah Wu, Jun 14 2024

A028817 Palindromic squares with an odd number of digits.

Original entry on oeis.org

1, 4, 9, 121, 484, 676, 10201, 12321, 14641, 40804, 44944, 69696, 94249, 1002001, 1234321, 4008004, 5221225, 6948496, 100020001, 102030201, 104060401, 121242121, 123454321, 125686521, 400080004, 404090404, 522808225, 617323716, 942060249, 10000200001
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    id[n_] := IntegerDigits[n]; palQ[n_] := FromDigits[Reverse[id[n]]] == n; t = {}; Do[If[palQ[x = n^2] && OddQ[Length[id[x]]], AppendTo[t, x]],{n, 101000}]; t (* Jayanta Basu, May 13 2013 *)
    Select[Range[100000]^2, PalindromeQ[#] && EvenQ[Floor[Log[10, #]]] &] (* Alonso del Arte, Oct 11 2019 *)
  • Scala
    def isPalindromic(n: BigInt): Boolean = n.toString == n.toString.reverse
    val squares = ((1: BigInt) to (1000000: BigInt)).map(n => n * n)
    squares.filter(n => isPalindromic(n) && n.toString.length % 2 == 1) // Alonso del Arte, Oct 07 2019
Previous Showing 21-30 of 41 results. Next