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.

A084194 Even numbers n such that the sum of the digits is prime and the sum of the digits of n/2 is also prime.

Original entry on oeis.org

14, 32, 50, 58, 76, 94, 98, 104, 122, 140, 148, 166, 184, 188, 212, 230, 238, 256, 274, 278, 292, 296, 302, 320, 328, 346, 364, 368, 382, 386, 410, 418, 436, 454, 458, 472, 476, 490, 494, 500, 508, 526, 544, 548, 562, 566, 580, 584
Offset: 1

Views

Author

Patrick Capelle, Jun 20 2003

Keywords

Comments

Sometimes n/2 is prime.

Examples

			3+2=5 for n=32 and 1+6=7 for n/2=16;
5+8=13 for n=58 and 2+9=11 for n/2=29;
2+1+2=5 for n=212 and 1+0+6=7 for n/2=106;
2+5+6=13 for n=256 and 1+2+8=11 for n/2=128.
		

Crossrefs

Cf. A084201.

Programs

  • Maple
    filter:= proc(n)
      isprime(convert(convert(n,base,10),`+`)) and isprime(convert(convert(n/2,base,10),`+`))
    end proc:
    select(filter, [seq(i,i=2..1000,2)]); # Robert Israel, Sep 04 2019
  • PARI
    isok(n) = {if (n % 2, return (0)); dn = digits(n); dh = digits(n/2); isprime(sum(i=1, #dn, dn[i])) && isprime(sum(i=1, #dh, dh[i]));} \\ Michel Marcus, Aug 12 2013

Extensions

More terms from Michel Marcus, Aug 12 2013