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.

A371354 Primes p such that p, q and p + q but not q - p have distinct digits, where q is the next prime after p.

Original entry on oeis.org

21067, 46279, 46831, 47659, 62017, 124853, 241567, 347629, 410257, 428093, 456901, 476059, 528719, 638179, 685471, 789631, 869521, 1024357, 2014357, 2146853, 2354167, 3268549, 3407659, 3682457, 3825649, 4021357, 4026571, 4180679, 4213567, 4562791, 7685401, 8602417, 20418637, 41870293, 76820453, 390465721
Offset: 1

Views

Author

Zak Seidov and Robert Israel, Mar 19 2024

Keywords

Comments

Primes p = prime(k) such that p, prime(k+1) and p + prime(k+1) are in A010784 but p is not in A356196 (as prime(k+1) - p is not in A010784).

Examples

			a(3) = 46831 is a term because it is prime, the next prime is 46853, and 46831, 46853 and 46831 + 46853 = 93684 have distinct digits but 46853 - 46831 = 22 does not.
		

Crossrefs

Programs

  • Maple
    isdd:= proc(n) local L;
      L:= convert(n,base,10);
      nops(L) = nops(convert(L,set))
    end proc:
    Res:= NULL:
    for d from 1 to 9 do
      for t in combinat:-permute([$0..9],d) do
        if t[1] = 0 then next fi;
        p:= add(t[i]*10^(d-i),i=1..d);
        if isprime(p) then
          q:= nextprime(p);
          if not(isdd(q-p)) and isdd(q) and isdd(p+q) then
             Res:= Res,p;
          fi
        fi
    od od:
    Res;