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.

A346206 Primes p, with k digits, such that the Sum_{i=1..k} (p without its i-th digit)/(its i-th digit) is a prime.

This page as a plain text file.
%I A346206 #16 Jun 03 2022 11:17:54
%S A346206 11,21673,27367,32611,33311,41141,48821,82781,171263,211441,243433,
%T A346206 323443,343243,449699,632623,663661,727271,772127,847871,882881,
%U A346206 944969,1129699,1192699,1193939,1262633,1334341,1342433,1343423,1361441,1388641,1399193,1461883,1613441
%N A346206 Primes p, with k digits, such that the Sum_{i=1..k} (p without its i-th digit)/(its i-th digit) is a prime.
%H A346206 Michel Marcus, <a href="/A346206/b346206.txt">Table of n, a(n) for n = 1..441</a>
%H A346206 Carlos Rivera, <a href="http://www.primepuzzles.net/puzzles/puzz_1045.htm">Puzzle 1045. One nice puzzle from Paolo Lava</a>, The Prime Puzzles and Problems Connection.
%e A346206 21673 gives 1673/2 + 2673/1 + 2173/6 + 2163/7 + 2167/3 = 4903; so 21673 is a term.
%o A346206 (PARI) subs(d, j) = {my(x=""); for (k=1, #d, if (j != k, x = concat(x, d[k]));); eval(x);}
%o A346206 isok(p) = {my(d=digits(p), res);  if (isprime(p) && vecmin(d), res = sum(j=1, #d, subs(d, j)/d[j]); (denominator(res)==1) && isprime(res););}
%o A346206 (Python)
%o A346206 from sympy import isprime, primerange
%o A346206 from fractions import Fraction
%o A346206 def ok(p):
%o A346206     s = str(p)
%o A346206     if '0' in s or len(s) == 1: return False
%o A346206     f = sum(Fraction(int(s[:i]+s[i+1:]), int(s[i])) for i in range(len(s)))
%o A346206     return f.denominator == 1 and isprime(f.numerator)
%o A346206 def aupto(lim): return [p for p in primerange(1, lim+1) if ok(p)]
%o A346206 print(aupto(1620000)) # _Michael S. Branicky_, Jul 11 2021
%Y A346206 Subsequence of A038618 (zeroless primes).
%K A346206 nonn,base
%O A346206 1,1
%A A346206 _Michel Marcus_, Jul 10 2021