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.

A256704 Palindromes of the form 4n + 1 that are divisible by 5.

Original entry on oeis.org

5, 505, 525, 545, 565, 585, 5005, 5225, 5445, 5665, 5885, 50005, 50105, 50205, 50305, 50405, 50505, 50605, 50705, 50805, 50905, 52025, 52125, 52225, 52325, 52425, 52525, 52625, 52725, 52825, 52925, 54045, 54145, 54245, 54345, 54445, 54545, 54645, 54745, 54845
Offset: 1

Views

Author

John Rafael M. Antalan, Apr 08 2015

Keywords

Comments

The sequence is infinite.
Creation of the Sequence. The sequence was generated based on the following known results for primitive Pythagorean triples/triangles (PPTs).
Let c represent the hypotenuse of a PPT and a, b be its sides. Without loss of generality, let a be the odd side and b be the even side.
(a) c takes the form 4n+1.
(b) One of a,b,c is divisible by 5.
Let c be divisible by 5. Thus, this sequence represents the palindromic hypotenuse of a PPT that is divisible by 5.
With the exception of 5, the last two digits of each term of this sequence are 05, 25, 45, 65 or 85. Thus, since the terms are palindromes, the first two digits of each term of the sequence are 50, 52, 54, 56 or 58.
Proof. If k is an element of the sequence, then its form must be 4n+1 for some integer n. This means that k-1=4n that is, k-1 is divisible by 4. Since an integer is divisible by 4 if and only if the number composed of its last two digits is divisible by 4, it must be that the number composed of the last two digits of k-1 is divisible by 4. With this we get the desired result.
Except for the terms having one or three digits, the terms of the sequence take the following forms:
(a) 50p05
(b) 52p25
(c) 54p45
(d) 56p65
(e) 58p85
where p is a palindromic number with leading zero digit(s) allowed.

Programs

  • Mathematica
    palQ[n_] := Block[{d = IntegerDigits@ n}, d == Reverse@ d]; Select[Select[4 Range[100000] + 1, palQ], Mod[#, 5] == 0 &] (* Michael De Vlieger, Apr 08 2015 *)
    Select[5*Range[12000],PalindromeQ[#]&&Mod[#,4]==1&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jul 09 2018 *)
  • PARI
    ispal(n) = (d = digits(n)) && (Vecrev(d) == d);
    isok(n) = !(n % 5) && !((n-1) % 4) && ispal(n); \\ Michel Marcus, Apr 08 2015

Extensions

More terms from Michel Marcus, Apr 08 2015