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.

A029950 Odd palindromes.

Original entry on oeis.org

1, 3, 5, 7, 9, 11, 33, 55, 77, 99, 101, 111, 121, 131, 141, 151, 161, 171, 181, 191, 303, 313, 323, 333, 343, 353, 363, 373, 383, 393, 505, 515, 525, 535, 545, 555, 565, 575, 585, 595, 707, 717, 727, 737, 747, 757, 767, 777, 787, 797, 909, 919, 929, 939, 949
Offset: 1

Views

Author

Keywords

Comments

There are more odd palindromes (A328332) less than 10^K than even palindromes (A328333) because odd palindromes begin with 1, 3, 5, 7 or 9 while even palindromes begin only with 2, 4, 6 or 8. - Bernard Schott, Oct 24 2019

Crossrefs

Subsequence of A002113.
Cf. A029951 (even palindromes), A328332, A328333.

Programs

  • Mathematica
    palindromicQ[n_,b_:10]:=TrueQ[IntegerDigits[n, b]==Reverse[IntegerDigits[n, b]]];Select[Range[1, 10^4, 2], palindromicQ[#]&&Plus@@Drop[DigitCount[#], {1, 10, 1}]==0&] (* Vincenzo Librandi, Feb 07 2014 *)
    Select[Range[1,949,2],PalindromeQ] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jul 15 2017 *)
  • PARI
    lista(nn) = {forstep(n=1, nn, 2, if (is_A002113(n), print1(n, ", ")));} \\ Michel Marcus, Feb 06 2014

Extensions

Offset set to 1 and more terms from Michel Marcus, Feb 06 2014

A328332 Expansion of (1 + 4*x - 5*x^2 + 10*x^3) / ((1 - x) * (1 - 10*x^2)).

Original entry on oeis.org

1, 5, 10, 60, 110, 610, 1110, 6110, 11110, 61110, 111110, 611110, 1111110, 6111110, 11111110, 61111110, 111111110, 611111110, 1111111110, 6111111110, 11111111110, 61111111110, 111111111110, 611111111110, 1111111111110, 6111111111110, 11111111111110, 61111111111110, 111111111111110
Offset: 0

Views

Author

Ilya Gutkovskiy, Oct 12 2019

Keywords

Comments

Number of odd palindromes <= 10^n.

Crossrefs

Programs

  • Mathematica
    nmax = 28; CoefficientList[Series[(1 + 4 x - 5 x^2 + 10 x^3) / ((1 - x) (1 - 10 x^2)), {x, 0, nmax}], x]
    Join[{1}, LinearRecurrence[{1, 10, -10}, {5, 10, 60}, 28]]
  • PARI
    Vec((1 + 4*x - 5*x^2 + 10*x^3) / ((1 - x) * (1 - 10*x^2)) + O(x^30)) \\ Michel Marcus, Oct 13 2019

Formula

G.f.: (1 + 4*x - 5*x^2 + 10*x^3) / ((1 - x) * (1 - 10*x^2)).
a(n) = a(n-1) + 10*a(n-2) - 10*a(n-3). - Wesley Ivan Hurt, Aug 25 2022
Showing 1-2 of 2 results.