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.

A089695 Numbers m such that placing as many possible '+' signs anywhere in between the digits yields a prime in every case. Let abcd... be the digits of m; then abcd, a + bcd, ab + cd, abc + d, a + b + cd, a + bc + d, ab + c + d, a + b + c + d, ... are all prime.

This page as a plain text file.
%I A089695 #20 Oct 29 2021 09:40:04
%S A089695 2,3,5,7,11,23,29,41,43,47,61,67,83,89,101,227,229,281,401,443,449,
%T A089695 467,601,607,647,661,683,809,821,863,881,4001,4463,4643,6007,6067,
%U A089695 6803,8009
%N A089695 Numbers m such that placing as many possible '+' signs anywhere in between the digits yields a prime in every case. Let abcd... be the digits of m; then abcd, a + bcd, ab + cd, abc + d, a + b + cd, a + bc + d, ab + c + d, a + b + c + d, ... are all prime.
%C A089695 Though the first 27 terms match those of A089392, the next term of A089392 (2221) is not a member of this sequence. Conjecture: sequence is finite.
%C A089695 No more terms < 10^8. - _David Wasserman_, Oct 04 2005
%e A089695 863 is a member 863, 8 + 63, 86 + 3, 8 + 6 + 3 are all prime.
%p A089695 with(combinat): ds:=proc(s) local j: RETURN(add(s[j]*10^(j-1),j=1..nops(s))):end: for d from 1 to 6 do sch:=[seq([1,op(i),d+1],i=choose([seq(j,j=2..d)]))]: for n from 10^(d-1) to 10^d-1 do sn:=convert(n,base,10): fl:=0: for s in sch do m:=add(j,j=[seq(ds(sn[s[i]..s[i+1]-1]),i=1..nops(s)-1)]): if not isprime(m) then fl:=1: break fi od: if fl=0 then printf("%d, ",n) fi od od: # C. Ronaldo
%p A089695 # second Maple program:
%p A089695 b:= proc(s) option remember; (n-> {s, seq(seq(seq(""||x||"+"||y,
%p A089695         y=b(s[i+1..n])), x=b(s[1..i])), i=1..n-1)})(length(s))
%p A089695     end:
%p A089695 q:= n-> andmap(isprime, map(parse, b(""||n))):
%p A089695 select(q, [$1..10000])[];  # _Alois P. Heinz_, Oct 29 2021
%t A089695 Select[Prime@Range@1010,And@@PrimeQ[n=#;Total/@(FromDigits/@#&/@Union[DeleteCases[SplitBy[#,#==-1&],{-1}]&/@(Insert[IntegerDigits@n,-1,#]&/@(List/@#&/@Rest@Subsets[Range@IntegerLength@n]))])]&] (* _Giorgos Kalogeropoulos_, Oct 29 2021 *)
%Y A089695 Cf. A089696.
%K A089695 base,nonn,more
%O A089695 1,1
%A A089695 _Amarnath Murthy_, Nov 10 2003
%E A089695 Corrected and extended by C. Ronaldo (aga_new_ac(AT)hotmail.com), Dec 25 2004