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

A083394 Terms of A083393 such that the sum of the factorials of the digits is prime.

Original entry on oeis.org

2, 11, 101, 111, 212, 313, 515, 10001, 10101, 11111, 12121, 20102, 21112, 23132, 24142, 32123, 36163, 42124, 44144, 63136, 69196, 77177, 96169, 99199, 1000001, 1001001, 1011101, 1041401, 1101011, 1111111, 1131311, 1141411, 1221221
Offset: 1

Views

Author

Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jun 11 2003

Keywords

Examples

			E.g. 313. 3!+1!+3!=6+1+6=13. 13 is prime.
		

Crossrefs

Cf. A083393.

Extensions

More terms from Jason Earls, Jun 12 2003

A082806 Palindromes which are prime and the sum of the digits is also prime.

Original entry on oeis.org

2, 3, 5, 7, 11, 101, 131, 151, 191, 313, 353, 373, 757, 797, 919, 10301, 10501, 11311, 12721, 13331, 13931, 14341, 14741, 15551, 16361, 16561, 18181, 19391, 19991, 30103, 30703, 31513, 32323, 33533, 34543, 35153, 35353, 35753, 36563, 38183
Offset: 1

Views

Author

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

Keywords

Comments

Most of the initial palindromic primes are members.
11 is the only member of even length since the sum of the digits of such palindromes is even and 2 is the only even prime. For the members of odd length the middle digit is odd (except for 2). - Chai Wah Wu, Aug 12 2014

Examples

			E.g. 12721 is a palindromic prime and 1+2+7+2+1 = 13 is also prime.
		

Crossrefs

Cf. A002385.
Subsequence of A083393. [Arkadiusz Wesolowski, Sep 14 2011]

Programs

  • Maple
    N:= 3: # to get all terms of at most 2*N+1 digits
    revdigs:= proc(n)
    local L,d;
    L:= convert(n,base,10);
    d:= nops(L);
    add(L[i]*10^(d-i),i=1..d);
    end proc:
    pals:= proc(d)
    local x,y;
    seq(seq(x*10^(d+1)+y*10^d + revdigs(x),y=0..9),x=10^(d-1)..10^d-1)
    end proc;
    select(n -> isprime(n) and isprime(convert(convert(n,base,10),`+`)), {2,3,5,7,11,seq(pals(d),d=1..3)}); # Robert Israel, Aug 12 2014
  • Mathematica
    Select[ Range[390000], PrimeQ[ # ] && FromDigits[ Reverse[ IntegerDigits[ # ]]] == # && PrimeQ[ Plus @@ IntegerDigits[ # ]] & ] (* Robert G. Wilson v, Jun 17 2003 *)
  • Python
    from sympy import isprime
    A082806 = sorted([n for n in chain(map(lambda x:int(str(x)+str(x)[::-1]),range(1,10**5)),map(lambda x:int(str(x)+str(x)[-2::-1]), range(1,10**5))) if isprime(n) and isprime(sum([int(d) for d in str(n)]))])
    # Chai Wah Wu, Aug 12 2014

Extensions

Corrected and extended by Giovanni Resta, Feb 07 2006
Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, May 14 2007
Showing 1-2 of 2 results.