login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A340296 a(n) is the first number whose digit sequence can be partitioned into primes in exactly n ways. 1

%I #29 Jan 15 2021 01:57:35

%S 2,23,223,373,2237,2337,19373,22337,22373,23773,31373,23373,37337,

%T 223737,223773,223373,233137,233373,237337,1137337,1937337,1373373,

%U 2233733,2233137,373373,2233373,2337313,2237337,2237373,2337353,3733313,2331373,3137337,3137373,3373373,2337373,2337337,2373373

%N a(n) is the first number whose digit sequence can be partitioned into primes in exactly n ways.

%H Robert Israel, <a href="/A340296/b340296.txt">Table of n, a(n) for n = 1..93</a>

%e For n=4, a(4) = 373 can be partitioned into primes in four ways: 3|7|3, 3|73, 37|3 and 373.

%p f:= proc(n) option remember; local i,t;

%p if isprime(n) then t:= 1 else t:= 0 fi;

%p for i from 1 to ilog10(n) do

%p if isprime(n mod 10^i) then t:= t + procname(floor(n/10^i)) fi

%p od;

%p t

%p end proc:

%p f(0):= 0:

%p V:= Vector(38):

%p for n from 2 to 10^7 do

%p v:= f(n);

%p if v > 0 and v <= 38 and V[v] = 0 then V[v]:= n fi

%p od:

%p convert(V,list);

%K nonn,base

%O 1,1

%A _J. M. Bergot_ and _Robert Israel_, Jan 14 2021

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 17 07:15 EDT 2024. Contains 375200 sequences. (Running on oeis4.)