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

A075807 Numbers n such that n-th prime is palindromic.

Original entry on oeis.org

1, 2, 3, 4, 5, 26, 32, 36, 42, 43, 65, 71, 74, 76, 129, 134, 138, 139, 157, 158, 1263, 1285, 1293, 1367, 1377, 1483, 1519, 1528, 1583, 1635, 1647, 1682, 1726, 1805, 1814, 1867, 1897, 1917, 1928, 2009, 2060, 2083, 2117, 2196, 2250, 2260, 3255, 3267, 3285
Offset: 1

Views

Author

Jani Melik, Oct 13 2002

Keywords

Examples

			26th prime is 101, which is palindromic.
		

Crossrefs

Programs

  • Magma
    [n: n in [1..3500] | Intseq(NthPrime(n), 10) eq Reverse(Intseq(NthPrime(n), 10))]; // Vincenzo Librandi, Mar 24 2019
    
  • Maple
    test := proc(n) local d; d := convert(ithprime(n),base,10); return ListTools[Reverse](d)=d; end; a := []; for n from 1 to 4000 do if test(n) then a := [op(a),n]; end; od; a;
  • Mathematica
    Rest[Flatten[Position[Prime[Range[4000]],?(IntegerDigits[#] == Reverse[ IntegerDigits[#]]&)]]] (* _Harvey P. Dale, Jan 26 2014 *)
  • PARI
    isok(n) = my(d=digits(prime(n))); Vecrev(d) == d; \\ Michel Marcus, Mar 24 2019

Formula

a(n) = A000720(A002385(n)). - David A. Corneth, Mar 24 2019

Extensions

Edited by Dean Hickerson, Oct 21 2002

A071251 Squarefree palindromes.

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 11, 22, 33, 55, 66, 77, 101, 111, 131, 141, 151, 161, 181, 191, 202, 222, 262, 282, 303, 313, 323, 353, 373, 383, 393, 434, 454, 474, 494, 505, 515, 535, 545, 555, 565, 595, 606, 626, 646, 707, 717, 727, 737, 757, 767, 777, 787, 797, 818, 838
Offset: 1

Views

Author

Amarnath Murthy, May 21 2002

Keywords

Crossrefs

Intersection of A002113 and A005117.

Programs

  • Maple
    ffpal := proc(n) local i,j,k,s,aa,nn,bb,flag; s := n; aa := convert(s,string); nn := length(aa); bb := ``; for i from nn by -1 to 1 do bb := cat(bb,substring(aa,i..i)); od; flag := 0; for j from 1 to nn do if substring(aa,j..j)<>substring(bb,j..j) then flag := 1 fi; od; RETURN(flag); end: ts_ndk_pal := proc(i) if ffpal((i)) = 0 then if (numtheory[issqrfree](i) = 'true' ) then RETURN((i)) fi fi end: andkpal := [seq(ts_ndk_pal(i), i=1..10000)]: andkpal;
  • Mathematica
    Select[ Range[ 1000], # == FromDigits[ Reverse[ IntegerDigits[ # ]]] && Max[ Transpose[ FactorInteger[ # ]] [[2]]] < 2 &]
    Select[Range[1000],PalindromeQ[#]&&SquareFreeQ[#]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Dec 17 2018 *)

Extensions

Edited by Robert G. Wilson v, Jun 03 2002

A075799 Palindromic numbers which are products of an even number of distinct primes.

Original entry on oeis.org

1, 6, 22, 33, 55, 77, 111, 141, 161, 202, 262, 303, 323, 393, 454, 505, 515, 535, 545, 565, 626, 707, 717, 737, 767, 818, 838, 858, 878, 898, 939, 949, 959, 979, 989, 1111, 1441, 1661, 1991, 2002, 2442, 3003, 3113, 3223, 3443, 3883, 4774, 5005, 5115, 6666, 7117, 7447
Offset: 1

Views

Author

Jani Melik, Oct 13 2002

Keywords

Examples

			1, 111=3*37 and 858=2*3*11*13 are palindromic and products of an even number of distinct primes.
		

Crossrefs

Cf. A046392, A002385, A069217, A032350, A030229, A075800, A075805 (first differences).

Programs

  • Maple
    test := proc(n) local d; d := convert(n,base,10); return ListTools[Reverse](d)=d and numtheory[mobius](n)=1; end; a := []; for n from 1 to 7000 do if test(n) then a := [op(a),n]; end; od; a;
  • Mathematica
    Select[Range[10000], PalindromeQ[#] && MoebiusMu[#] == 1 &] (* Paolo Xausa, Mar 10 2025 *)

Extensions

Edited by Dean Hickerson, Oct 21 2002

A075800 Palindromic numbers which are products of an odd number of distinct primes.

Original entry on oeis.org

2, 3, 5, 7, 11, 66, 101, 131, 151, 181, 191, 222, 282, 313, 353, 373, 383, 434, 474, 494, 555, 595, 606, 646, 727, 757, 777, 787, 797, 919, 929, 969, 1001, 1221, 1551, 1771, 2222, 2882, 3333, 3553, 4334, 4994, 5335, 5555, 5665, 5885, 5995, 6006, 6226, 6446, 6886
Offset: 1

Views

Author

Jani Melik, Oct 13 2002

Keywords

Examples

			191 is palindromic and prime, 222=2*3*37 is palindromic and a product of 3 distinct primes.
		

Crossrefs

Cf. A002385, A069217, A032350, A030059, A075799, A075806 (first differences).

Programs

  • Maple
    test := proc(n) local d; d := convert(n,base,10); return ListTools[Reverse](d)=d and numtheory[mobius](n)=-1; end; a := []; for n from 1 to 7000 do if test(n) then a := [op(a),n]; end; od; a;
  • Mathematica
    Select[Range[10000], PalindromeQ[#] && MoebiusMu[#] == -1 &] (* Paolo Xausa, Mar 10 2025 *)

Extensions

Edited by Dean Hickerson, Oct 21 2002

A083139 Primes in A083137.

Original entry on oeis.org

2, 3, 5, 7, 11, 101, 131, 151, 181, 191, 313, 353, 373, 383, 727, 757, 787, 797, 919, 929, 10301, 10501, 10601, 11311, 11411, 12421, 12721, 12821, 13331, 13831, 13931, 14341, 14741, 15451, 15551, 16061, 16361, 16561, 16661, 17471, 17971, 18181
Offset: 1

Views

Author

Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Apr 25 2003

Keywords

Comments

Conjecture: sequence is infinite.
Does this coincide with A002385? It seems possible that the answer is no, since some palindromic primes may be missed in A083137. - Andrew S. Plewe and N. J. A. Sloane, May 14 2007

Crossrefs

Cf. A069217. - R. J. Mathar, Sep 17 2008

Extensions

More terms from Reinhard Zumkeller, May 05 2003

A076611 Palindromic primes with prime middle digit.

Original entry on oeis.org

2, 3, 5, 7, 131, 151, 353, 373, 727, 757, 929, 10301, 10501, 11311, 12721, 13331, 14341, 14741, 15551, 16361, 16561, 19391, 30203, 30703, 31513, 32323, 33533, 34543, 35353, 35753, 36263, 36563, 37273, 37573, 38783, 39293, 70207, 70507
Offset: 1

Views

Author

Jani Melik, Oct 21 2002

Keywords

Comments

There are no such numbers with an even number of digits. This sequence is quite similar to the sequence A071119 up to 12th term.

Examples

			a(12)=10301 is palindromic prime and its middle digit 3 is prime, a(13)=10501 is palindromic prime and its middle digit 5 is prime, a(14)=11311 is palindromic prime and its middle digit 3 is prime, ...
		

Crossrefs

Programs

  • Maple
    ts_numprapal := proc(n) local ad,adr,midigit; ad := convert(n,base,10): adr := ListTools[Reverse](ad): if nops(ad) mod 2 = 0 then return 1; fi; midigit := op( (nops(ad)+1)/2,ad ): if (isprime( midigit )='true' and adr=ad) then return 0; else return 1; fi end: ts_pra_num_pal := proc(n) local p1; p1 := ithprime(n): if ts_numprapal(p1) = 0 then return (p1) fi end: apranumpal := [seq(ts_pra_num_pal(i), i=1..100000)]: apranumpal;

A076613 Palindromic primes with nonprime middle digit.

Original entry on oeis.org

101, 181, 191, 313, 383, 787, 797, 919, 10601, 11411, 12421, 12821, 13831, 13931, 15451, 16061, 16661, 17471, 17971, 18181, 18481, 19891, 19991, 30103, 30403, 30803, 31013, 32423, 34843, 35053, 35153, 38083, 38183, 70607, 71917, 73037
Offset: 1

Views

Author

Jani Melik, Oct 21 2002

Keywords

Examples

			a(12)=12821 is palindromic prime and its middle digit 8 is not prime, a(13)=13831 is palindromic prime and its middle digit 8 is not prime, a(14)=13931 is palindromic prime and its middle digit 9 is not prime, ...
		

Crossrefs

Programs

  • Maple
    ts_num_midpal := proc(n) local ad,adr,midigit; ad := convert(n,base,10): adr := ListTools[Reverse](ad): if nops(ad) mod 2 = 0 then return 1; fi; midigit := op( (nops(ad)+1)/2,ad ): if (isprime( midigit )='false' and adr=ad) then return 0; else return 1; fi end: ts_pra_n_pal := proc(n) local p1; p1 := ithprime(n): if ts_num_midpal(p1) = 0 then return (p1) fi end: apranpal := [seq(ts_pra_n_pal(i), i=1..100000)]: apranpal;
Showing 1-7 of 7 results.