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

A046942 Numbers k such that k and prime(k) are both palindromes.

Original entry on oeis.org

1, 2, 3, 4, 5, 8114118, 535252535, 4025062605204
Offset: 1

Views

Author

Keywords

Comments

Previous name: Indices of primes appearing in A046941.
Also, intersection of A002113 and A075807. - Ivan Neretin, Jun 02 2016

Crossrefs

Programs

  • Mathematica
    NextPalindrome[n_] := Block[ {l = Floor[ Log[10, n] + 1], idn = IntegerDigits[n]}, If[ Union[ idn] == {9}, Return[n + 2], If[l < 2, Return[n + 1], If[ FromDigits[ Reverse[ Take[ idn, Ceiling[l/2]]]] FromDigits[ Take[ idn, -Ceiling[l/2]]], FromDigits[ Join[ Take[ idn, Ceiling[l/2]], Reverse[ Take[ idn, Floor[l/2]]] ]], idfhn = FromDigits[ Take[ idn, Ceiling[l/2]]] + 1; idp = FromDigits[ Join[ IntegerDigits[ idfhn], Drop[ Reverse[ IntegerDigits[ idfhn]], Mod[l, 2]]]] ]]]];
    p = 0; Do[p = NextPalindrome[p]; While[ !PrimeQ[p], p = NextPalindrome[ p]]; q = IntegerDigits[ PrimePi[ p]]; If[Reverse[q] == q, Print[{p, FromDigits[q]}]], {n, 10^4}] (* Robert G. Wilson v, Feb 03 2005 *)
    ParallelDo[If [PalindromeQ @ i && PalindromeQ @ Prime @i, Print @i], {i, 6*10^8}] (* Mikk Heidemaa, May 24 2024 *)

Extensions

a(7) from Giovanni Resta, May 14 2003
New name and offset by Ivan Neretin, Jun 02 2016
a(8) from Giovanni Resta, Aug 10 2019

A103357 Numbers n such that n and pi(n) (A000720) are palindromic.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 33, 262, 323, 393, 525, 535, 555, 666, 818, 878, 949, 2002, 3773, 5775, 6116, 13031, 19591, 39093, 41414, 47374, 59295, 63236, 81918, 94549, 95759, 252252, 394493, 594495, 662266, 674476, 686686, 698896, 764467
Offset: 1

Views

Author

Zak Seidov, Feb 02 2005

Keywords

Crossrefs

Corresponding palindromic pi(n) in A103358.

Programs

  • Mathematica
    NextPalindrome[n_] := Block[ {l = Floor[ Log[10, n] + 1], idn = IntegerDigits[n]}, If[ Union[ idn] == {9}, Return[n + 2], If[l < 2, Return[n + 1], If[ FromDigits[ Reverse[ Take[ idn, Ceiling[l/2]]]] FromDigits[ Take[ idn, -Ceiling[l/2]]], FromDigits[ Join[ Take[ idn, Ceiling[l/2]], Reverse[ Take[ idn, Floor[l/2]]] ]], idfhn = FromDigits[ Take[ idn, Ceiling[l/2]]] + 1; idp = FromDigits[ Join[ IntegerDigits[ idfhn], Drop[ Reverse[ IntegerDigits[ idfhn]], Mod[l, 2]]]] ]]]];
    p = 0; a = {}; Do[p = NextPalindrome[ p]; q = IntegerDigits[ PrimePi[ p]]; If[ Reverse[q] == q, Print[{p, FromDigits[q]}]; AppendTo[a, p]], {n, 10^4}]; a (* Robert G. Wilson v, Feb 03 2005 *)

Formula

a(n) = P_A103358(n).

Extensions

More terms from Robert G. Wilson v, Feb 03 2005

A103358 Palindromes q derived from palindromes p such that pi(p) = q.

Original entry on oeis.org

0, 1, 2, 2, 3, 3, 4, 4, 4, 5, 8, 11, 55, 66, 77, 99, 99, 101, 121, 141, 151, 161, 303, 525, 757, 797, 1551, 2222, 4114, 4334, 4884, 5995, 6336, 8008, 9119, 9229, 22222, 33433, 48684, 53735, 54645, 55555, 56465, 61316, 64046, 72027, 72727, 84548, 89998
Offset: 1

Views

Author

Zak Seidov, Feb 02 2005

Keywords

Crossrefs

Programs

  • Mathematica
    NextPalindrome[n_] := Block[ {l = Floor[ Log[10, n] + 1], idn = IntegerDigits[n]}, If[ Union[ idn] == {9}, Return[n + 2], If[l < 2, Return[n + 1], If[ FromDigits[ Reverse[ Take[ idn, Ceiling[l/2]]]] FromDigits[ Take[ idn, -Ceiling[l/2]]], FromDigits[ Join[ Take[ idn, Ceiling[l/2]], Reverse[ Take[ idn, Floor[l/2]]] ]], idfhn = FromDigits[ Take[ idn, Ceiling[l/2]]] + 1; idp = FromDigits[ Join[ IntegerDigits[ idfhn], Drop[ Reverse[ IntegerDigits[ idfhn]], Mod[l, 2]]]] ]]]];
    p = 0; a = {}; Do[p = NextPalindrome[ p]; q = IntegerDigits[ PrimePi[ p]]; If[ Reverse[q] == q, Print[{p, FromDigits[q]}]; AppendTo[a, p]], {n, 10^4}]; PrimePi[a] (* Robert G. Wilson v, Feb 03 2005 *)

Extensions

More terms from Robert G. Wilson v, Feb 03 2005

A103402 Palindromes p such that pi(p) is a palindromic prime.

Original entry on oeis.org

3, 4, 5, 6, 11, 33, 555, 878, 5775, 6116, 919919, 58633685, 129707921, 16958285961, 867275572768, 50166722766105, 310439747934013, 4384495885944834, 5817988338897185
Offset: 1

Views

Author

Robert G. Wilson v, Feb 03 2005

Keywords

Comments

From a suggestion from Zak Seidov, Feb 02 2005.
a(16) > 32*10^12. - Donovan Johnson, Dec 03 2009

Crossrefs

Programs

  • Mathematica
    NextPalindrome[n_] := Block[ {l = Floor[ Log[10, n] + 1], idn = IntegerDigits[n]}, If[ Union[ idn] == {9}, Return[n + 2], If[l < 2, Return[n + 1], If[ FromDigits[ Reverse[ Take[ idn, Ceiling[l/2]]]] FromDigits[ Take[ idn, -Ceiling[l/2]]], FromDigits[ Join[ Take[ idn, Ceiling[l/2]], Reverse[ Take[ idn, Floor[l/2]]] ]], idfhn = FromDigits[ Take[ idn, Ceiling[l/2]]] + 1; idp = FromDigits[ Join[ IntegerDigits[ idfhn], Drop[ Reverse[ IntegerDigits[ idfhn]], Mod[l, 2]]]] ]]]];
    p = 0; a = {}; Do[p = NextPalindrome[p]; q = PrimePi[p]; If[PrimeQ[q], r = IntegerDigits[q]; If[Reverse[r] == r, Print[{p, q}]; AppendTo[a, p]]], {n, 10^6}]; a
    palQ[n_] := Reverse[x = IntegerDigits[n]] == x; t = {}; Do[If[palQ[n] && PrimeQ[x = PrimePi[n]] && palQ[x], AppendTo[t, n]], {n,10^6}]; t (* Jayanta Basu, Jun 24 2013 *)

Extensions

a(15) from Donovan Johnson, Dec 03 2009
a(16)-a(17) from Chai Wah Wu, Sep 04 2019
a(18)-a(19) from Giovanni Resta, Sep 12 2019

A103403 Palindromic primes q derived from palindromes p such that pi(p) = q.

Original entry on oeis.org

2, 2, 3, 3, 5, 11, 101, 151, 757, 797, 72727, 3485843, 7362637, 753535357, 32792329723, 1644209024461, 9600458540069, 125319848913521, 164957666759461
Offset: 1

Views

Author

Robert G. Wilson v, Feb 03 2005

Keywords

Comments

From a suggestion from Zak Seidov, Feb 02 2005.
a(16) > pi(32*10^12). - Donovan Johnson, Dec 03 2009

Crossrefs

Programs

  • Mathematica
    NextPalindrome[n_] := Block[ {l = Floor[ Log[10, n] + 1], idn = IntegerDigits[n]}, If[ Union[ idn] == {9}, Return[n + 2], If[l < 2, Return[n + 1], If[ FromDigits[ Reverse[ Take[ idn, Ceiling[l/2]]]] FromDigits[ Take[ idn, -Ceiling[l/2]]], FromDigits[ Join[ Take[ idn, Ceiling[l/2]], Reverse[ Take[ idn, Floor[l/2]]] ]], idfhn = FromDigits[ Take[ idn, Ceiling[l/2]]] + 1; idp = FromDigits[ Join[ IntegerDigits[ idfhn], Drop[ Reverse[ IntegerDigits[ idfhn]], Mod[l, 2]]]] ]]]];
    p = 0; a = {}; Do[p = NextPalindrome[p]; q = PrimePi[p]; If[PrimeQ[q], r = IntegerDigits[q]; If[Reverse[r] == r, Print[{p, q}]; AppendTo[a, q]]], {n, 10^6}]; a
    palQ[n_] := Reverse[x = IntegerDigits[n]] == x; t = {}; Do[If[palQ[n] && PrimeQ[y = PrimePi[n]] && palQ[y], AppendTo[t, y]], {n,10^6}]; t (* Jayanta Basu, Jun 24 2013 *)

Extensions

a(15) from Donovan Johnson, Dec 03 2009
a(16)-a(17) from Chai Wah Wu, Sep 04 2019
a(18)-a(19) from Giovanni Resta, Sep 12 2019

A211405 Prime numbers that in binary are palindromic and also have palindromic index.

Original entry on oeis.org

5, 17, 73, 127, 313, 1453, 22861, 28123, 296713, 309481, 2063947162127
Offset: 1

Views

Author

James G. Merickel, Feb 09 2013

Keywords

Comments

This has been searched through 2^33.
The index of a(11) is 75558337841. a(12) > 2^44. - Giovanni Resta, Feb 12 2013

Examples

			The binary representations of the first three terms and their indices are 101 and 11, 10001 and 111, and 1001001 and 10101.
		

Crossrefs

Extensions

a(11) from Giovanni Resta, Feb 12 2013
Showing 1-6 of 6 results.