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.

Previous Showing 11-20 of 35 results. Next

A135623 Mersenne primes written backwards.

Original entry on oeis.org

3, 7, 13, 721, 1918, 170131, 782425, 7463847412, 1593963129003485032, 111265944731096246910079816, 721882010875193363312928672952261, 727501488517303786137132964064381141071
Offset: 1

Views

Author

Omar E. Pol, Feb 17 2008

Keywords

Examples

			a(3)=13 because the 3rd Mersenne prime is 31.
		

Crossrefs

Programs

  • Mathematica
    IntegerReverse[2^MersennePrimeExponent[Range[15]]-1] (* Harvey P. Dale, Feb 26 2023 *)

A162706 Numbers that are the sum of two reversed primes.

Original entry on oeis.org

4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81
Offset: 1

Views

Author

Claudio Meller, Jul 11 2009

Keywords

Formula

a(n) = A004087(j)+A004087(k) for any pair (j,k). - R. J. Mathar, Jul 13 2009

Extensions

Edited, entries checked by R. J. Mathar, Jul 13 2009

A228355 Write the primes backwards in base 10 and juxtapose their digits.

Original entry on oeis.org

2, 3, 5, 7, 1, 1, 3, 1, 7, 1, 9, 1, 3, 2, 9, 2, 1, 3, 7, 3, 1, 4, 3, 4, 7, 4, 3, 5, 9, 5, 1, 6, 7, 6, 1, 7, 3, 7, 9, 7, 3, 8, 9, 8, 7, 9, 1, 0, 1, 3, 0, 1, 7, 0, 1, 9, 0, 1, 3, 1, 1, 7, 2, 1, 1, 3, 1, 7, 3, 1, 9, 3, 1, 9, 4, 1, 1, 5, 1, 7, 5, 1, 3, 6, 1, 7, 6
Offset: 0

Views

Author

Vincenzo Librandi, Aug 21 2013

Keywords

Comments

Also, decimal expansion of the constant 0.235711317191329213731434743595...
The same sequence, but with different indexing, would arise for the table whose n-th row lists the A097944(n) digits of the n-th prime A000040(n) from right to left. - M. F. Hasler, Oct 24 2019

Crossrefs

Programs

  • Mathematica
    Reverse[IntegerDigits//@ Reverse@Prime@Range@50//Flatten]
  • PARI
    fromdigits( A=concat(apply( row(n)=Vecrev(digits(prime(n))), [1..default(realprecision)])))*.1^#A \\ Result = the constant, A = sequence of digits, row(n) = n-th row of the table. - M. F. Hasler, Oct 24 2019

A072385 Primes which can be represented as the sum of a prime and its reverse.

Original entry on oeis.org

383, 443, 463, 787, 827, 887, 929, 1009, 1049, 1069, 1151, 1171, 1231, 1373, 1453, 1493, 1777, 30203, 30403, 31013, 32213, 32413, 32423, 33023, 33223, 34033, 34843, 35053, 36263, 36653, 37273, 37463, 37663, 38083, 38273, 38873, 39293, 39883
Offset: 1

Views

Author

Shyam Sunder Gupta, Jul 20 2002

Keywords

Comments

This set is the image under the "reverse and add" operation (A056964) of the Luhn primes A061783 (which remain prime under that operation). Those have always an odd number of digits, and start with an even digit. Therefore this sequence has its terms in intervals [3,20]*100^k with k = 1, 2, 3.... - M. F. Hasler, Sep 26 2019

Examples

			383 is a term because it is prime and it is the sum of prime 241 and its reverse 142.
		

Crossrefs

Cf. A004086 (reverse), A004087 (primes reversed), A056964 (reverse & add), A061783 (Luhn primes), A086002 (similar, using "rotate" instead of "reverse").

Programs

  • Mathematica
    f@n_:=(Select[# + IntegerReverse[#] & /@ Prime[Range[n]], PrimeQ@# && # <= Prime[n] &] // Union); f@3000 (* Harvey P. Dale, Jul 18 2018; corrected by Hans Rudolf Widmer, Aug 15 2024 *)
  • PARI
    is_A072385(p)={isprime(p)&&forprime(q=p\10,p*9\10,A056964(q)==p&&return(1))} \\ A056964(n)=n+fromdigits(Vecrev(digits(n))). It is much faster to produce the terms as shown below, rather than to "select" them from a range of primes. - M. F. Hasler, Sep 26 2019
    
  • PARI
    A072385=Set(apply(A056964, A061783)) \\ with, e.g.: A061783=select(is_A061783(p)={isprime(A056964(p))&&isprime(p)}, primes(8713)) - M. F. Hasler, Sep 26 2019

Formula

a(n) = A056964(A061783(n)). - M. F. Hasler, Sep 26 2019

Extensions

Cross-references added by M. F. Hasler, Sep 26 2019

A074895 Primes written backwards and sorted.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 14, 16, 17, 31, 32, 34, 35, 37, 38, 71, 73, 74, 76, 79, 91, 92, 95, 97, 98, 101, 104, 106, 107, 112, 113, 118, 119, 124, 125, 128, 131, 133, 134, 136, 142, 145, 146, 149, 151, 152, 157, 164, 166, 167, 172, 175, 179, 181, 182, 188, 191, 194
Offset: 1

Views

Author

Jason Earls, Sep 14 2002

Keywords

Crossrefs

Programs

  • Mathematica
    Take[Sort[FromDigits[Reverse[IntegerDigits[#]]]&/@Prime[Range[500]]],60] (* Harvey P. Dale, Nov 08 2011 *)
    Take[Sort[IntegerReverse[Prime[Range[500]]]],60] (* Harvey P. Dale, Mar 26 2025 *)

Extensions

Offset changed by Andrew Howroyd, Sep 18 2024

A104154 For each natural number n: if the last digit of n is not zero and A004086(n) is prime, append A004086(n) to the sequence.

Original entry on oeis.org

2, 3, 5, 7, 11, 31, 41, 61, 71, 13, 23, 43, 53, 73, 83, 17, 37, 47, 67, 97, 19, 29, 59, 79, 89, 101, 401, 601, 701, 211, 311, 811, 911, 421, 521, 821, 131, 331, 431, 631, 241, 541, 641, 941, 151, 251, 751, 461, 661, 761, 271, 571, 971, 181, 281, 881
Offset: 1

Views

Author

Cino Hilliard, Mar 09 2005

Keywords

Comments

Equivalently, these are the prime numbers ordered by their reversal. - Rémy Sigrist, Feb 13 2022

Examples

			The last digit of 13 is not '0' and 31 is prime, therefore we append 31.
		

Crossrefs

Cf. A004087.

Programs

  • Mathematica
    a = Select[Range[196], IntegerDigits[ # ][[ -1]] != 0 && PrimeQ[FromDigits[Reverse[ IntegerDigits[ # ]]]] &]; b = {}; For[n = 1, n < Length[a] + 1, n++, AppendTo[b, FromDigits[Reverse[IntegerDigits[a[[n]]]]]]]; b
  • PARI
    left(str, n) = { my(v, tmp, x); v =""; tmp = Vec(str); ln=length(tmp); if(n > ln, n=ln); for(x=1, n, v=concat(v, tmp[x]); ); return(v) } \\ Get the left n characters from string str
    rev(str) = { local(tmp, s, j); tmp = Vec(Str(str)); s=""; forstep(j=length(tmp), 1, -1, s=concat(s, tmp[j])); return(s) } \\ Get the reverse of the input string
    rprime(n) = { local(x, y, v); for(x=1, n, y=rev(x); v=Vec(y); if(left(y, 1)<> "0"&&isprime(eval(y)), print1(y", ")) ) }
    
  • Python
    from itertools import count, islice
    from sympy import primerange
    def A104154_gen(): # generator of terms
        yield from (int(d[::-1]) for l in count(1) for d in sorted(str(m)[::-1] for m in primerange(10**(l-1),10**l)))
    A104154_list = list(islice(A104154_gen(),20)) # Chai Wah Wu, Feb 17 2022

Extensions

Edited by Stefan Steinerberger, Aug 01 2007

A232446 Primes p such that reversal( p^2 ) + p is also prime.

Original entry on oeis.org

7, 151, 787, 1549, 1579, 2029, 2083, 2179, 2833, 2971, 4549, 4591, 4801, 4999, 5077, 5167, 5179, 5209, 5227, 5407, 6343, 6529, 6547, 6553, 6577, 6679, 7027, 7753, 7867, 7873, 7927, 7963, 7993, 8167, 8191, 8311, 9091, 9103, 9151, 9283, 14251, 14281, 14389, 14437
Offset: 1

Views

Author

K. D. Bajpai, Nov 24 2013

Keywords

Examples

			a(1)= 7, it is prime: prime(4)= 7: reversal(7^2)+7= reversal(49)+7= 94+7= 101 which is also prime.
a(2)= 151, it is prime: prime(36)= 151: reversal(151^2)+151= reversal(22801)+151=10822+151= 10973 which is also prime.
		

Crossrefs

Cf. A061783 (primes p: p+(p reversed) is also prime).
Function reversal is given by A004086. Cf. also A004087.

Programs

  • Maple
    with(StringTools): KD:= proc() local a,p; p:=ithprime(n);a:= parse(Reverse(convert((p^2), string)))+p; if isprime(a) then RETURN (p): fi; end: seq(KD(), n=1..3000);
  • Mathematica
    Select[Prime[Range[3000]], PrimeQ[# + FromDigits[Reverse[IntegerDigits[#^2]]]] &]

A062018 a(n) = n^n written backwards.

Original entry on oeis.org

1, 4, 72, 652, 5213, 65664, 345328, 61277761, 984024783, 1, 116076113582, 6528440016198, 352295601578203, 61085552860021111, 573958083098398734, 61615590737044764481, 771467633688162042728, 42457573569257080464393
Offset: 1

Views

Author

Amarnath Murthy, Jun 01 2001

Keywords

Examples

			a(5) = 5213, as 5^5 = 3125.
		

Crossrefs

Programs

  • Maple
    with(numtheory):for n from 1 to 50 do a := convert(n^n,base,10):b := add(10^(nops(a)- i)*a[i],i=1..nops(a)):printf(`%d,`,b); od:
  • Mathematica
    Table[IntegerReverse[n^n],{n,20}] (* Harvey P. Dale, Jul 31 2022 *)
  • PARI
    a(n) = { fromdigits(Vecrev(digits( n^n )))} \\ Harry J. Smith, Jul 29 2009

Formula

a(n) = A004086(n^n).

Extensions

More terms from Jason Earls and Vladeta Jovovic, Jun 01 2001

A098922 Reverse digits of largest primes, append to sequence if result is larger prime then previous one with reverse digits.

Original entry on oeis.org

2, 3, 5, 7, 11, 31, 71, 73, 97, 101, 701, 941, 971, 991, 9001, 9601, 9721, 9931, 9941, 9967, 70001, 90001, 93001, 96001, 97001, 99401, 99611, 99721, 99881, 99923, 99989, 940001, 972001, 973001, 996001, 997001, 999101, 999331, 999431, 999631, 999931
Offset: 1

Views

Author

Jani Melik, Oct 18 2004

Keywords

Examples

			The prime 37 in reverse is 73. 73 is prime and is larger than previous prime (17), written with reverse digits 71.
		

Crossrefs

Programs

  • Maple
    obrni_stev:=proc(n) local i, tren, tren1, st, ans; ans:=[ ]: tren:=n: tren1:=0: for i while (tren>0) do st:=round( 10*frac(tren/10) ): ans:=[ op(ans), st ]: tren:=trunc(tren/10): od; for i from 0 to nops(ans)-1 do tren1:= tren1 + op(nops(ans)-i, ans)*10^(i); od: RETURN(tren1); end: ts_inv_prav_pra:= proc(n) local i, tren, ans; tren:=0: ans:=[ ]: for i from 1 to n do if ( isprime( i ) = 'true' and isprime( obrni_stev (i) )='true' and obrni_stev(i) > tren ) then ans:=[ op(ans),obrni_stev(i) ]; tren:=obrni_stev(i); fi: od: RETURN(ans); end: ts_inv_prav_pra(200000);

A103163 a(n) = gcd(reverse(prime(n)), reverse(prime(n+1))).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 2, 2, 1, 5, 1, 4, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 14, 2, 2, 2, 4, 2, 2, 8, 2, 2, 2, 4, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 8, 2, 2, 2, 2, 2, 2, 8, 2, 2, 4, 4, 2, 2, 2, 2, 1, 5, 5, 25, 5, 5, 5, 5, 5, 5, 25, 5, 5, 5, 1, 2, 2, 4, 4, 4
Offset: 1

Views

Author

Labos Elemer, Jan 27 2005

Keywords

Comments

Greatest common divisor of two consecutive primes after each prime is written backward.

Examples

			Neither of these common divisors are divisible by 3 or by 10 or by 11.
		

Crossrefs

Programs

  • Maple
    A103163 := proc(n)
        p := ithprime(n) ;
        q := nextprime(p) ;
        igcd(digrev(p),digrev(q)) ;
    end proc:
    seq(A103163(n),n=1..114) ; # R. J. Mathar, Sep 22 2018
  • Mathematica
    rd[x_] :=FromDigits[Reversed[IntegerDigits[x]]]; Table[GCD[rd[Prime[w]], rd[Prime[w+1]]], {w, 1, 1000}]
    GCD@@#&/@(Partition[IntegerReverse/@Prime[Range[120]],2,1]) (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jan 31 2020 *)

Formula

a(n) = gcd(A004087(n), A004087(n+1)).

Extensions

Edited by Jon E. Schoenfield, Oct 26 2019
Previous Showing 11-20 of 35 results. Next