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 21-30 of 35 results. Next

A135624 Perfect numbers written backwards.

Original entry on oeis.org

6, 82, 694, 8218, 63305533, 6509689858, 823196834731, 8212599318003485032, 6712483595162964564471389651995548562, 612961845123799031836303480873397492701632806249165191
Offset: 1

Views

Author

Omar E. Pol, Feb 17 2008

Keywords

Examples

			a(3)=694 because the 3rd perfect number is 496.
		

Crossrefs

A162704 Numbers that are the sum of two reversed consecutive primes.

Original entry on oeis.org

5, 8, 12, 18, 42, 48, 54, 86, 87, 92, 93, 102, 105, 108, 109, 111, 123, 124, 130, 134, 135, 136, 162, 177, 180, 246, 258, 282, 294, 303, 372, 402, 426, 434, 450, 456, 468, 470, 492, 504, 528, 542, 564, 576, 582, 588, 774, 812, 816, 828, 846, 852, 862, 866
Offset: 1

Views

Author

Claudio Meller, Jul 11 2009

Keywords

Comments

Subsequence of A162706.
Numbers of the form A004087(j)+A004087(j+1), any j. - R. J. Mathar, Jul 11 2009

Examples

			109 is in the list because it is the sum of R(47)+R(53)=74+35=109.
		

Crossrefs

Programs

  • Mathematica
    Take[Union[Total[IntegerReverse[#]]&/@Partition[Prime[Range[500]],2,1]],100] (* The program is not suitable for more than 100 or so terms. *) (* Harvey P. Dale, Apr 26 2022 *)

Extensions

4 removed, keyword:base added by R. J. Mathar, Jul 13 2009

A162705 Numbers that are the sum of two reversed consecutive primes in more than one way.

Original entry on oeis.org

582, 1026, 1032, 1038, 1092, 1122, 1128, 1134, 1152, 1296, 1644, 1716, 4152, 4344, 4602, 4932, 5068, 5562, 5808, 8706, 8862, 8988, 9012, 9036, 9066, 9264, 9726, 10110, 10308, 10326, 10342, 10398, 10638, 10698, 10764, 10794, 10806, 10866, 10912, 10944, 10998
Offset: 1

Views

Author

Claudio Meller, Jul 11 2009

Keywords

Comments

Subsequence of A162704. - R. J. Mathar, Jul 13 2009

Examples

			582 = R(191) + R(193) = 191 + 391 and R(683) + R(691) = 386 + 196.
1032 = R(113) + R(127) = 311 + 721 = R(613) + R(617) = 316 + 716.
		

Crossrefs

Programs

  • Maple
    read("transforms") ; A055642 := proc(n) max(1, ilog10(n)+1) ; end:
    A004087 := proc(n) option remember; digrev(ithprime(n)) ; end:
    isA162705 := proc(n) c := 0 ; for i from 1 do p := ithprime(i) ; if A055642(p) > A055642(n) then break; fi; if A004087(i)+A004087(i+1) = n then c := c+1; fi; od: RETURN(c > 1); end:
    for n from 1 to 10000 do if isA162705(n) then printf("%d,",n) ; fi; od: # R. J. Mathar, Jul 13 2009
  • Mathematica
    Sort[Transpose[Select[Tally[FromDigits[Reverse[IntegerDigits[#[[1]]]]] + FromDigits[Reverse[IntegerDigits[#[[2]]]]]&/@Partition[Prime[Range[ 2000]],2,1]],Last[#]>1&]][[1]]] (* Harvey P. Dale, Nov 14 2012 *)

Extensions

Keyword:base plus more terms from R. J. Mathar, Jul 13 2009
Typo in first example corrected by R. J. Mathar, Jul 22 2009
More terms from Sean A. Irvine, Nov 14 2010

A171444 Sum of three consecutive reversed primes.

Original entry on oeis.org

10, 15, 23, 49, 113, 193, 194, 215, 137, 178, 100, 121, 122, 143, 204, 146, 187, 109, 130, 151, 172, 233, 215, 278, 481, 1103, 1903, 1913, 1933, 1163, 1583, 1793, 2603, 2023, 1843, 1263, 1873, 1493, 2103, 1523, 1343, 763, 1373, 2173, 1894, 1425
Offset: 1

Views

Author

Vincenzo Librandi, Dec 09 2009

Keywords

Examples

			(from primes 11, 13, and 17): 11 + 31 + 71 = 113;
(from primes 13, 17, and 19): 31 + 71 + 91 = 193;
(from primes 173, 179, and 181): 371 + 971 + 181 = 1523.
		

Crossrefs

Programs

  • Mathematica
    r[n_] := FromDigits[Reverse[IntegerDigits[n]]]; Table[r[Prime[n]] + r[Prime[n+1]] + r[Prime[n+2]], {n, 50}]

Formula

a(n) = r(p(n)) + r(p(n+1)) + r(p(n+2)) where p(n) is the n-th prime number and r(n) is the number obtained by the reversal of the digits of n (e.g., r(1230) = 321).

Extensions

More terms from Matthew Conroy, Dec 28 2010

A210625 Least semiprime dividing digit reversal of n, or 0 if no such factor.

Original entry on oeis.org

0, 0, 0, 4, 0, 6, 0, 4, 9, 0, 0, 21, 0, 0, 51, 0, 0, 9, 91, 0, 4, 22, 4, 6, 4, 62, 4, 82, 4, 0, 0, 0, 33, 0, 0, 9, 0, 0, 93, 4, 14, 4, 34, 4, 6, 4, 74, 4, 94, 0, 15, 25, 35, 9, 55, 65, 15, 85, 95, 6, 4, 26, 4, 46, 4, 6, 4, 86, 4, 0, 0, 9, 0, 0, 57, 0, 77, 87
Offset: 1

Views

Author

Jonathan Vos Post, Mar 24 2012

Keywords

Comments

Roughly the analog of A209190 (least prime factor of reversal of digits), but with semiprimes (A001358) instead of primes (A000040).

Examples

			a(12) = min {k such that k|R(12) and k = p*q for primes p and q (not necessarily distinct)} = min {k, k|21 and k semiprime} = 21 = 3*7.
a(42) = min {k, k|24 and k semiprime} = min {4,6} = 4 = 2*2.
		

Crossrefs

Programs

  • Maple
    r:= proc(n) option remember; local q;
          `if`(n<10, n, irem(n, 10, 'q') *10^(length(n)-1)+r(q))
        end:
    a:= proc(n) local m, k;
          m:= r(n);
          for k from 4 to m do
             if irem(m, k)=0 and not isprime(k) and
                add(i[2], i=ifactors(k)[2])=2 then return k fi
          od; 0
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Mar 26 2012
  • Mathematica
    spd[n_]:=Module[{sps=Select[Divisors[FromDigits[Reverse[ IntegerDigits[n]]]], PrimeOmega[#] == 2&,1]},If[sps=={},0,First[sps]]]; Array[spd,80] (* Harvey P. Dale, Aug 12 2012 *)

Formula

a(n) = A210615(R(n)) = A210615(A004086(n)).
a(p) = 0 iff p in (A004087 union A011557). - Alois P. Heinz, Mar 28 2012

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

Original entry on oeis.org

5, 13, 19, 103, 139, 181, 193, 271, 277, 313, 379, 433, 577, 619, 631, 853, 859, 883, 1093, 1117, 1123, 1237, 1279, 1321, 1741, 1873, 1933, 1987, 2659, 2707, 2713, 2719, 2767, 2791, 3163, 3217, 3271, 3331, 3469, 3529, 3547, 3631, 3637, 3727, 3907, 3943, 4129, 4177
Offset: 1

Views

Author

K. D. Bajpai, Nov 27 2013

Keywords

Examples

			a(2)= 13, it is prime: n= 6, prime(6)= 13: reversal(13^2+13)= 281, which is also prime.
a(4)= 103, it is prime: n= 27, prime(27)= 103: reversal(103^2+103)= 21701, which is also prime.
a(6)= 181, it is prime: n= 42, prime(42)= 181: reversal(181^2+181)= 24923, which is also prime.
		

Crossrefs

Cf. A004087 (primes written backwards).
Cf. A061783 (primes p: p+(p reversed)is also prime).
Cf. A232446 (primes p: reversal(p^2)+p is also prime).

Programs

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

A264815 Semirps: a semirp (or semi-r-p) is a semiprime r*p with r and p both reversed primes.

Original entry on oeis.org

4, 6, 9, 10, 14, 15, 21, 22, 25, 26, 33, 34, 35, 39, 49, 51, 55, 62, 65, 74, 77, 85, 91, 93, 111, 119, 121, 142, 143, 146, 155, 158, 169, 185, 187, 194, 202, 213, 214, 217, 219, 221, 226, 237, 259, 262, 289, 291, 298, 302, 303, 314, 321, 334, 339, 341, 355
Offset: 1

Views

Author

Danny Rorabaugh, Nov 25 2015

Keywords

Comments

A semiprime (A001358) is the product of two prime, not necessarily distinct. A semiprime is in this list if those two primes (A000040) are reversed primes (A004087).
Since A007500 is the intersection of A000040 and A004087, this sequence is also the sorted list of all r*p with r and p in A007500.

Examples

			9 is in the list because 9 = 3*3 is a semiprime and reverse(3) = 3 is prime.
143 is in the list because 143 = 11*13 is a semiprime and both reverse(11) = 11 and reverse(13) = 31 are prime.
		

Crossrefs

Programs

  • Mathematica
    With[{nn=250},Take[Union[Times@@@Select[Tuples[IntegerReverse/@Prime[Range[nn]],2],AllTrue[#,PrimeQ]&]],60]] (* Harvey P. Dale, Apr 27 2025 *)
  • Sage
    reverse = lambda n: sum([10^i*int(str(n)[i]) for i in range(len(str(n)))])
    def is_semirp(n):
      F = factor(n)
      if sum([f[1] for f in F])==2:
        r, p = F[0][0], F[-1][0]
        if is_prime(reverse(r)) and is_prime(reverse(p)): return True
    [a for a in range(1,356) if is_semirp(a)] # Danny Rorabaugh, Nov 25 2015

Formula

[A007500]^2, sorted.

A273092 a(n) = 2^n - 1 written backwards.

Original entry on oeis.org

0, 1, 3, 7, 51, 13, 36, 721, 552, 115, 3201, 7402, 5904, 1918, 38361, 76723, 53556, 170131, 341262, 782425, 5758401, 1517902, 3034914, 7068838, 51277761, 13445533, 36880176, 727712431, 554534862, 119078635, 3281473701, 7463847412, 5927694924, 1954399858
Offset: 0

Views

Author

Vincenzo Librandi, May 15 2016

Keywords

Comments

Reverse primes in this sequence (3, 7, 31, 127, 2047, 8191, 131071, 524287, 8388607 etc) are Mersenne primes.

Examples

			For n = 8, 2^n - 1 = 255, so 552 is in the sequence. - _Michael B. Porter_, Jul 02 2016
		

Crossrefs

Programs

  • Magma
    [Seqint(Reverse(Intseq(2^n-1))): n in [0..40]];
    
  • Mathematica
    Table[FromDigits[Reverse[IntegerDigits[2^n-1]]], {n, 0, 75}]
  • PARI
    a(n) = eval(concat(Vecrev(Str(2^n-1)))) \\ Felix Fröhlich, Jul 03 2016

Formula

a(n) = A004086(A000225(n)).

A381245 Numbers that are partial sums of the reverses of the sequence of primes and are reverses of primes.

Original entry on oeis.org

2, 5, 17, 358, 775, 3145, 7813, 10277, 13978, 15232, 19478, 32324, 36056, 70042, 71396, 72893, 76856, 102374, 141982, 155585, 301291, 331357, 332588, 354643, 717817, 763586, 791641, 799532, 922981, 931705, 935117, 940241, 952975, 993551, 1020461, 1028383, 1060075, 1094099, 1126831, 1145257
Offset: 1

Views

Author

Robert Israel, Feb 17 2025

Keywords

Comments

Intersection of A071602 (in that order) and A004087.

Examples

			a(4) = 358 is a term because 358 = A071602(11) is the sum of the reverses of the first 11 primes, and is the reverse of the prime 853.
A071602(7) = 130 is not a term, because 130 is not the reverse of a prime, even though the reverse of 130 is a prime.
		

Crossrefs

Programs

  • Maple
    rev:= proc(n) local L,i;
      L:= convert(n,base,10);
      add(L[-i]*10^(i-1),i=1..nops(L))
    end proc:
    PR:= map(rev, select(isprime, [$1..10000]):
    SPR:= ListTools:-PartialSums(PR):
    select(t -> t mod 10 <> 0 and isprime(rev(t)),SPR);

A118495 Chen primes written backwards.

Original entry on oeis.org

2, 3, 5, 7, 11, 31, 71, 91, 32, 92, 13, 73, 14, 74, 35, 95, 76, 17, 38, 98, 101, 701, 901, 311, 721, 131, 731, 931, 941, 751, 761, 971, 181, 191, 791, 991, 112, 722, 332, 932, 152, 752, 362, 962, 182, 392, 703, 113, 713, 733, 743, 353, 953, 973, 983, 104, 904
Offset: 1

Views

Author

Jani Melik, May 05 2006

Keywords

Crossrefs

Programs

  • Maple
    # Check if number is Chen prime ischenprime:=proc(n); if (isprime(n) = 'true') then if (isprime(n+2) = 'true' or numtheory[bigomega](n+2) = 2) then return 'true' else return 'false' fi fi end: #Reverse digits 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_chen_pra:= proc(n) local i, trens, ans; trens:= [ ]; ans:=[ ]; for i from 1 to n do if (ischenprime( i ) = 'true') then ans:=[op(ans),obrni_stev(i)] fi: od: return ans end: ts_inv_chen_pra(2000);
  • Mathematica
    psp=Take[Union[Join[Union[Times@@@Tuples[Prime[Range[100]],{2}]],Prime[Range[PrimePi[250000]]]]],200];
    FromDigits[Reverse[IntegerDigits[#]]]&/@(Select[Prime[Range[PrimePi[1000]]],MemberQ[psp,#+2]&])  (* Harvey P. Dale, Feb 08 2011 *)
Previous Showing 21-30 of 35 results. Next