A027580 Palindromes of the form n^2 + (n+1)^2 + (n+2)^2 + (n+3)^2 + (n+4)^2.
55, 51015, 554455, 51488415, 510151015, 55883648705050784638855, 531578379527444725973875135
Offset: 1
Links
- P. De Geest, Palindromic Sums of Squares of Consecutive Integers
Crossrefs
Cf. A027579.
Programs
-
Mathematica
Select[Table[n^2 + (n + 1)^2 + (n + 2)^2 + (n + 3)^2 + (n + 4)^2, {n, 10^7}], # == Reverse@ # &@ IntegerDigits@ # &] (* Michael De Vlieger, Jan 24 2016 *) Select[Table[5x^2+20x+30,{x,11000}],PalindromeQ] (* The program generates the first 5 terms of the sequence. To generate more, increase the x constant but the program may take a long time to run. *) (* Harvey P. Dale, Sep 16 2023 *)
-
Python
A027580_list = [] for i in range(1,10**8,2): s = str(5*(i*(i+4)+6)) if s == s[::-1]: A027580_list.append(int(s)) # Chai Wah Wu, Jan 18 2016
Extensions
a(6) from Chai Wah Wu, Jan 18 2016
a(7) from Giovanni Resta, Aug 04 2019
Comments