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

A030150 Palindromic primes in which parity of digits alternates.

Original entry on oeis.org

2, 3, 5, 7, 101, 181, 383, 727, 787, 929, 10301, 10501, 12721, 14341, 14741, 16361, 16561, 18181, 30103, 30703, 32323, 34543, 36563, 38183, 38783, 70507, 72727, 74747, 76367, 78787, 90709, 94349, 94949, 96769, 98389, 1074701
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    altQ[n_] := n < 10 || Union[Total /@ Partition[ Mod[ IntegerDigits@ n, 2], 2, 1]] == {1}; palQ[n_] := Block[{d = IntegerDigits[n]}, d == Reverse@ d]; Select[ Prime@ Range@ 10000, palQ[#] && altQ[#] &] (* Giovanni Resta, Aug 16 2018 *)
    Join[{2,3,5,7},Select[Prime[Range[85000]],PalindromeQ[#]&&Union[Total/@Partition[ Boole[ EvenQ/@IntegerDigits[#]],2,1]]=={1}&]] (* Harvey P. Dale, Jul 10 2023 *)
Showing 1-1 of 1 results.